dspy-evaluation-harness
Installation
SKILL.md
DSPy Evaluation Harness (3.2.x)
The metric is usually more important than the program. For dspy.GEPA especially, the quality of textual feedback in your metric determines whether optimization converges.
Two rules
- Return a
dspy.Prediction(score=..., feedback=...), not a dict.dspy.Evaluate's parallel executor aggregates scores via sum, which breaks on dict outputs (TypeError: unsupported operand type(s) for +: 'int' and 'dict').dspy.Predictionsupports__float__/__add__and is what GEPA's adapter natively unwraps. A bare float still works for puredspy.Evaluatescoring, but GEPA needs the score+feedback pair. - Separate valset. Never optimize and evaluate on the same examples. Optimizers overfit fast.
Canonical rich-feedback metric
import dspy