DSPy Prompt Optimization 2026: MIPROv2, GEPA & Real Evals
DSPy prompt optimization replaces hand-tuned prompts with real evals, MIPROv2, and GEPAβlearn to program prompts that reliably transfer across models in 2026.
Chapter 1: Why Program Prompts Instead of Tuning Them: The 2026 Case for DSPy If you have shipped anything with an LLM in the last two years, you know the ritual. You write a prompt. It works on three examples. It breaks on the fourth. You add a sentence: "Be concise." Now it is too terse. You add: "But include reasoning." Now it rambles. You paste in five few-shot examples you picked by hand at midnight. Accuracy climbs four points, then a new model ships, the formatting drifts, and you start over. This is not engineering. It is superstition with...