Make your DSPy metric return text, not just a score, to unlock GEPA prompt optimization
DSPy·medium signal
GEPA (Genetic-Pareto) is the 2026 gold-standard DSPy optimizer: a reflective LM reads your metric's textual feedback and mutates instructions and few-shots, beating MIPROv2 on complex tasks with far fewer rollouts. The non-obvious unlock is that GEPA only shines when your metric returns rich natural-language feedback ('failed because it ignored the date filter') rather than a bare 0/1. Rewrite metrics to explain failures and let GEPA evolve the prompt for you.