Some links on this site may earn us a commission — how that works

Prompts · Stanford NLP

DSPy review

DSPy is a framework for programming language models rather than hand-writing prompts. You define your task as a program with modules and signatures, and DSPy optimises the prompts and few-shot examples behind it using data, so the wording improves as you test it.

Free Best for programming prompts instead of writing them Free Open source framework, free to use Free tier: Yes — open source, free

Best for: Developers who want to optimise prompts with code and data

Visit official site →

Reviewed: November 21, 2026 · Updated: November 21, 2026 · Pricing checked October 2026 on the vendor’s official site.

★★★★★Not yet rated — be the first to vote

Rate DSPy

Your vote moves this tool up or down our Top 10. One vote per tool per day — you can change it later today if you change your mind.

Who it’s for

  • Developers
  • AI researchers
  • ML engineers
  • Data scientists
  • LLM builders
  • Students

Pricing tiers

PlanPriceAnnual priceWhat you get
Open SourceFree Free free
  • Full DSPy framework
  • optimisers and modules

Key features

  • Program language models instead of hand-writing prompts
  • Automatic prompt and few-shot optimisation
  • Modules and signatures for common LM tasks
  • Optimisers that learn from your data
  • Works with many language models
  • Open source and free to use

Strengths

  • Free and open source
  • Prompts improve from data, not guesswork
  • Code-based approach fits engineering teams

Watch out for

  • Code-first, not a tool for non-developers
  • Learning curve is steep at first
  • You still pay the model provider for runs

Alternatives to DSPy

Other tools in our directory that do a similar job — each with the one thing it does best.

ToolStarting priceKey feature
Claude $20/mo Hand-write prompts in chat instead

Example: DSPy in action

A typical example for developers: Developers who want to optimise prompts with code and data. Here is how a first run goes:

  1. Program language models instead of hand-writing prompts
  2. Automatic prompt and few-shot optimisation
  3. Modules and signatures for common LM tasks

Start on the Open Source plan (Free) — Full DSPy framework, optimisers and modules.

Our verdict

For developers, the most systematic way to stop hand-tuning prompts and let data do it.

Frequently asked questions

What is DSPy?

It is an open-source framework for programming language models, where you define tasks in code and DSPy optimises the prompts behind them.

Is DSPy free?

Yes, DSPy is open source and free to use.

Do I need to write prompts by hand with DSPy?

No, that is the point. You describe the task and data, and DSPy's optimisers build and improve the prompts for you.

Pricing is the US list price in USD, checked October 2026. Always confirm the final price on the vendor's official pricing page before purchasing.

← Tool directory ← Prompts