DSPy
Framework for programming, not prompting, language models with automatic prompt optimization
DSPy is an open-source framework from Stanford NLP for building LLM-powered systems through composable Python code rather than manual prompt engineering. It provides three core abstractions: signatures (input/output specs), modules (reusable components), and optimizers that automatically synthesize effective prompts and few-shot examples. DSPy can also fine-tune model weights. It supports building classifiers, RAG pipelines, agent loops, and other LLM applications while making them more reliable and maintainable than hand-crafted prompts.
Pricing: Free
Choosing an LLM framework right now?
One click, anonymous. Helps us know our visitors.
Thanks, that helps.
Choosing an LLM framework right now?
One click, anonymous. Helps us know our visitors.
Thanks, that helps.
DSPy Alternatives
Explore 49 products in the Frameworks & Stacks category. View all DSPy alternatives.
LangChain
LangChain gives developers a framework to construct LLM‑powered apps easily.
TanStack AI
Framework-agnostic TypeScript library for AI chat, streaming, tools, and structured outputs
Instructor
Structured data extraction from LLMs using Pydantic models with automatic validation and retries
LangGraph
Low-level framework for building stateful, long-running AI agents with graph-based orchestration
Vercel AI SDK
Open-source TypeScript toolkit for building AI applications with streaming, tool calling, and agents
Pydantic AI
Type-safe Python agent framework with Pydantic validation, tool calling, and dependency injection
Work on DSPy? Feature it at the top of Frameworks & Stacks.
Is your product missing?