stanfordnlp/dspy
DSPy: The framework for programming—not prompting—language models observed · 2026-08-28
Health v2 · maintenance only
94/100
- Activity 99
- Release rhythm 86
- Longevity 95
How is this computed?
round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.
- gap_med: 2
- age_days: 1332
- days_rel: 12
- days_push: 7
- n_releases_24m: 98
Adoption not part of the score
37612 stars · 3261 forks observed · 2026-08-28
What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-29, confidence not recorded
DSPy is a Python framework from Stanford NLP for programming language model systems with declarative signatures and modules instead of hand-written prompts. It includes optimizers (like GEPA and MIPRO) that automatically tune prompts and weights of multi-stage LLM pipelines, RAG systems, and agents.
Use cases
- build modular LLM pipelines without hand-writing brittle prompts
- automatically optimize prompts and few-shot examples against a metric
- build RAG pipelines with retrieval and generation stages
- create tool-using agents with ReAct-style loops
- make small cheap models match hand-prompted frontier models
- swap LLM providers without rewriting prompt strings
- fine-tune and prompt-optimize multi-stage programs together
- extract structured data from text with typed signatures
When to choose
- you are building multi-stage LLM programs, RAG pipelines, or agents that need maintainability
- you want automated prompt/weight optimization instead of manual prompt tweaking
- you want provider-agnostic LLM code that works across OpenAI, Anthropic, local models, etc.
- you are an NLP researcher or practitioner exploring new pipelines and tasks
When to avoid
- you need a one-off simple LLM call where a single prompt template suffices
- you want a full application framework with UI, deployment, and chat interfaces built in
- you cannot provide evaluation examples or metrics for the optimizers to work with
Facets
framework · maturity active
agent-framework llm-inference prompt-engineering rag llm-training machine-learning large-language-models artificial-intelligence machine-learning developer-tools python cross-platform prompt-optimization signatures declarative-llm-programs llm-optimizers chain-of-thought react-agents stanford-nlp litellm ai-agents retrieval-augmented-generation natural-language-processing
10 sources
- readme: https://github.com/stanfordnlp/dspy · fetched 2026-08-28 · 5450bc9856bc
- homepage: https://dspy.ai · fetched 2026-08-29 · 999161470ba0
- site_page: https://dspy.ai/getting-started/program-dont-prompt · fetched 2026-08-29 · d08e69743c86
- site_page: https://dspy.ai/getting-started/installation · fetched 2026-08-29 · a10567bf4dd8
- site_page: https://dspy.ai/getting-started/first-program · fetched 2026-08-29 · 63833fc93ada
- site_page: https://dspy.ai/getting-started/expanding-signatures · fetched 2026-08-29 · 7327ed7954d7
- site_page: https://dspy.ai/getting-started/class-based-signatures · fetched 2026-08-29 · 0e0ec23770d9
- site_page: https://dspy.ai/getting-started/changing-modules · fetched 2026-08-29 · 86aea5f68817
- site_page: https://dspy.ai/getting-started/react-and-tools · fetched 2026-08-29 · d11d2815437b
- registry_pypi: https://pypi.org/pypi/dspy/json · fetched 2026-08-29 · 00b5aa6babdd
Member repositories
| Repository | Role | Health v2 |
|---|---|---|
| stanfordnlp/dspy | main | 94 |
For agents
markdown · JSON · MCP: product_card(name="stanfordnlp/dspy")
Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem