DSPy
Prompt optimization · Open source
About
A Stanford-born open-source framework that replaces hand-written prompts with declarative modules and automatic prompt optimisers.
Key features
- Declarative signatures and modules
- Automatic prompt and few-shot optimisers
- Works with many model providers
Best for
- — Optimising prompts against a metric
- — Developers building LLM pipelines
- Pricing
- Open source
- Platforms
- API, Linux, macOS, Windows
- Works with
- OpenAI, Anthropic
- Last checked
- 2026-10-29
- Status
- Listed, not yet tested
Our take
Powerful once you have a metric and examples. A real conceptual shift that takes time to learn.
Features and pricing change often — confirm on dspy.ai before you commit.
Alternatives to DSPy
| Tool | Type | Pricing | Best for |
|---|---|---|---|
| DSPy (this) | Prompt optimization | Open source | Optimising prompts against a metric |
| PromptPerfect | Prompt optimization | Freemium | Quickly tightening a rough prompt |
| PromptLayer | Prompt managers | Freemium | Non-engineers editing production prompts |
| PromptHub | Prompt managers | Freemium | Teams collaborating on prompts |
| Agenta | Prompt managers | Open source | Teams wanting a self-hostable prompt platform |
| Langfuse | Evaluation & observability | Open source | Tracing LLM apps in production |
| OpenAI Playground | Prompt playgrounds | Paid | Prototyping prompts for the OpenAI API |