DSPy
Also called Declarative Self-improving Python.
DSPy is a framework that treats language-model pipelines as programs of declarative modules, and compiles them by automatically optimizing the prompts and few-shot demonstrations for each module against a metric.
Description
Rather than hand-tuning prompt strings, developers specify input-output signatures and let optimizers bootstrap demonstrations or search instructions, making pipelines portable across models.
Sources
- Khattab et al. (2023). DSPy: Compiling Declarative Language Model Calls into Self-Improving Pipelines.
Cite this entry
Protologue. (2026). DSPy. In Protologue: A Taxonomy of Prompting and LLM Techniques (v1.0.0, PTL-0075). https://protologue.com/t/dspy/
BibTeX
@misc{protologue_dspy,
title = {DSPy},
author = {{Protologue}},
year = {2026},
howpublished = {Protologue: A Taxonomy of Prompting and LLM Techniques, v1.0.0},
note = {Entry PTL-0075},
url = {https://protologue.com/t/dspy/}
}