
About DSPy
DSPy is a Python framework for building AI systems by declaring tasks rather than writing prompts by hand. You define typed inputs and outputs, and the framework handles how the model is asked.
What it does
Signatures describe what a step takes in and returns. Modules such as Predict, ChainOfThought and ReAct decide how the step runs. Optimizers test your program against a metric and tune its prompts automatically, which helps keep quality steady as you change the code.
Key features
- Typed signatures for tasks
- Modules for reasoning and tool use
- Optimizers scored against a metric
- Works with many language models
- Reusable program components
Who it's for
Developers and researchers who build LLM programs and want them to be easier to maintain and test. It suits teams that expect to change models often.
Pricing and good to know
DSPy is open source under the MIT license and installs with pip. Model costs depend on the provider you connect, so check their pricing for each model. Optimizers can make many model calls during a run, so budget for that before a large tuning job.
Highlights
- Typed signatures for tasks
- Modules for reasoning and tool use
- Optimizers scored against a metric
- Works with many language models
- Reusable program components












