DSPy
Programming, not prompting — Stanford's optimizer-driven approach.
DSPy (MIT, from Stanford NLP, ~34k stars) replaces hand-tuned prompt strings with something closer to software engineering: you declare what a step takes in and produces (a Signature), compose modules, and let an optimizer compile the best prompts and few-shot examples against your own metric and data. When quality matters and you're tired of prompt whack-a-mole, DSPy turns the tuning into a reproducible build step. It's the most intellectually distinct alternative on this list.
What it does well
- +Optimizes prompts against your metric — reproducibly
- +Declarative modules stay stable as models change underneath
- +Research-grade ideas with a real production following
Where it falls short
- −A genuinely different mental model — real learning curve
- −Optimization runs cost tokens; needs a decent eval set
DSPy as an alternative to
Where DSPy shows up in our comparisons, and how it ranked.
DSPy head-to-head
Straight comparisons against the tools people weigh it against.