DSPy
RAG & Memory · Free + paid
Framework for algorithmically optimizing LM prompts and pipelines
At a glance
- Made by
- Stanford NLP
- Korean
- None (English and a few others only)
- Open source
- MIT
- GitHub
- 38,624 stars · MIT
What is DSPy?
DSPy is a Python framework for building AI systems. It expresses a task as a structured signature (typed inputs and outputs) rather than a prompt, producing programs that are easier to maintain, modularize, and optimize. Modules let the same signature run with different strategies, such as direct prediction, step-by-step reasoning (ChainOfThought), or a tool-and-reasoning loop (ReAct). Optimizers take examples and a scoring function and automatically adjust prompts until quality converges, and they provide algorithms for optimizing prompts and weights. It can be used for anything from simple classifiers to RAG pipelines and agent loops, and it is installed with pip under the MIT license.
- Signatures that declare a task with typed inputs and outputs
- Modules that switch the execution strategy, such as Predict, ChainOfThought, and ReAct
- Optimizers that automatically adjust prompts based on a metric (GEPA, MIPROv2, BootstrapFewShot, etc.)
- Prompt and weight (fine-tuning) optimization
- Tool use and MCP integration
- Supports streaming, async, caching, deployment, and debugging/observability
- Save and load
Who uses DSPy and for what
- Build simple classifiers, sophisticated RAG pipelines, and agent loops
- Extract information and entities from emails and other sources
Pricing
Open source + paid cloud-managed plans
Open-source libraries are free, managed vector DB/memory services are paid based on usage
Estimate based on AI knowledge - please verify on the official site
AI tools similar to DSPy (alternatives)
DSPy vs. alternatives at a glance
| AI | Pricing | Combos on the map | Connected tools | Free | Cheapest monthly | Korean |
|---|---|---|---|---|---|---|
| DSPy | Free + paid | 0 | 5 | — | — | No |
| Haystack | Free + paid | 0 | 5 | Yes | — | No |
| LangChain | Free + paid | 18 | 5 | Yes | $39/mo | No |
| LlamaIndex | Free + paid | 18 | 5 | Yes | $50/mo | No |
| Semantic Kernel | Free + paid | 0 | 5 | — | — | Yes |
3 of these 5 tools have a free plan. Cheapest paid plan: LangChain ($39/mo).
Combo and connection counts are based on the relationships recorded on AI Galaxy Map (2026-10-26); they are not a quality ranking.
DSPy on AI Galaxy Map
- One of 21 AI tools in the RAG & Memory field.
- Connected to 5 other tools — #1 in its field.
Frequently asked questions
Can I use DSPy for free?
Open source + paid cloud-managed plans. Prices can change, so check the official site before paying.
What AI can I use instead of DSPy?
Tools that do the same job, such as Haystack, LangChain, LlamaIndex, Semantic Kernel, are connected to it on the map.
Can I use DSPy in Korean?
None (English and a few others only)
Sources (official pages)
Checked on the official pages on 2026-10-14. Prices and features can change, so check the official site again before paying.