Hand-written prompts are fragile: they break when the model changes and are hard to maintain. DSPy, created at Stanford NLP, proposes another approach: instead of writing prompts, you program the pipeline logic and let optimizers tune the prompts on their own.
What is DSPy?
You define the logic declaratively, with Modules and Signatures, and the "optimizers" (teleprompters) compile the pipeline, generating the examples and prompts that maximize your chosen metric. In practice it treats LLM pipelines as machine-learning programs that can be tuned on data.
Key features
- Program the logic with Modules and Signatures instead of manual prompts
- Optimizers generate few-shots and prompts to maximize a metric
- Pipelines become testable programs tunable on data
- Created by Stanford NLP, with strong academic and industry adoption
- Around 24k GitHub stars
How Reche uses it
Robust AI systems need to be measured and optimized, not tweaked by eye. Reche applies that discipline, with metrics and evaluation, when building AI products, so quality does not depend on a lucky prompt.