</>macrostackBrowse all
Tool profile · LLM & Agent Frameworks

DSPy

Programming, not prompting — Stanford's optimizer-driven approach.

88
sovereignty

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.

OPEN SOURCEMITSELF-HOSTLOCAL-FIRST
LicenseMIT
PricingFree (MIT)
Open sourceYes
Self-hostableYes
Local-first dataYes

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.

The Macrostack brief

New swaps, worth your inbox.

A short, occasional email when we add a high-intent alternative or ship a new head-to-head. No spam, no selling your address — unsubscribe in one click.