Skip to content

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

ToolTypePricingBest for
DSPy (this)Prompt optimizationOpen sourceOptimising prompts against a metric
PromptPerfectPrompt optimizationFreemiumQuickly tightening a rough prompt
PromptLayerPrompt managersFreemiumNon-engineers editing production prompts
PromptHubPrompt managersFreemiumTeams collaborating on prompts
AgentaPrompt managersOpen sourceTeams wanting a self-hostable prompt platform
LangfuseEvaluation & observabilityOpen sourceTracing LLM apps in production
OpenAI PlaygroundPrompt playgroundsPaidPrototyping prompts for the OpenAI API