
DSPy
★★★★★4.3Dev FrameworksFreeUpdated 27 Oct 2026
Compile prompts instead of hand-tuning them
DSPy treats prompts as programs: you declare inputs and outputs, provide examples, and an optimiser finds the instructions and few-shot sets that work.

Starter prompts
Copy one into DSPy and swap the {braces} for your own details.
- Scaffold a {stack} project that does {task}, with tests and a README.
- Wire {service} into this framework and show the smallest working example.
- Explain where {framework} fits compared to {alternative} for {use case}.
Key Features
Declarative modules
Signatures define behaviour, not wording.
Optimisers
Automatic prompt and demo selection.
Model portability
Same program, different backends.
How to Use
- Define signatures and modules for your task.
- Collect a small labelled set.
- Run a teleprompter to optimise, then evaluate.
Core Advantages
- ✓Removes prompt guesswork
- ✓Portable across models
- ✓Research-backed
Who It's For
ML engineersResearchersComplex pipelines
Pricing & Free Trial
Free open sourceIndicative — not yet re-checked
Open source
$0
MIT licensed
Free tier: Library free; tokens billed separately.
Prices are indicative — check the current list on dspy.ai
Frequently asked questions
- What is DSPy?
- DSPy treats prompts as programs: you declare inputs and outputs, provide examples, and an optimiser finds the instructions and few-shot sets that work.
- Is there a free plan for DSPy?
- Library free; tokens billed separately.
- How much does DSPy cost?
- DSPy uses a free open source model — see the pricing section for the plans we have on file.
- What can DSPy do?
- Its headline capabilities: declarative modules; optimisers; model portability.
- Who is DSPy for?
- It is aimed at ML engineers, researchers, complex pipelines.
Our Verdict
Steep but worth it when prompt tuning has become the bottleneck.
Community rating
—
0 ratings
Tap a star to rate this tool
More like this
Compare DSPy with alternatives
Put DSPy next to its closest rivals — ratings, free tiers and entry prices in one table:
Ollama★ 4.6
Instructor★ 4.4
Pydantic AI★ 4.4