Eval Metrics
From outputs to numbers
Metrics make quality measurable: exact-match and semantic similarity for factual tasks, rubric scores for reasoning, entailment for groundedness, and pass rates aggregated into one gated number.
What you will learn
- Choose metrics per task type
- Combine metrics into gate decisions
- Avoid metric-gaming blind spots
What is this?
Evaluation metrics convert outputs into comparable numbers. Exact match (code/classification), semantic similarity (paraphrase-tolerant), rubric scores (reasoning, multi-dimension), entailment/groundedness (does answer stay in sources), plus precision/recall over structured items. Aggregated pass rate becomes the gate; chosen per task, never one-size.
Why do you need it?
- Different tasks falsify differently — metrics must match.
- Semantic metrics catch 'right meaning, different words'.
- Groundedness metrics catch fabrication where prose looks fine.
- A single aggregate makes gating decisions legible.
Mental model
Scoring in a decathlon
Metric choice
You don't score a 100m sprint by gymnastic form; each event has a metric suited to it. Aggregate medals come from summing the right per-event scores. Your eval suite is a decathlon: exact match for the sprints, rubrics for the leaps, entailment for the throws.
How it works
- Classify the task: structured facts, prose, reasoning, extraction.
- Pick the metric: exact/match/containment, similarity, rubric, entailment.
- Define pass thresholds per dimension.
- Aggregate (pass rate, per-dimension averages) for gates.
- Track metric distribution, not just the mean.
Metric families.
In production
- Extraction tasks gate on field-level F1.
- Customer-support summaries gate on rubric + groundedness.
- Codegen gate on tests passing + exact match of key symbols.
Best practices
- Match the metric family to the failure you fear.
- Use thresholds per dimension, not a single magic number.
- Report distributions (percentiles) so outliers aren't hidden.
- Pair automated metrics with spot human review.
Common mistakes
- Exact match on prose (paraphrase-punishing).
- Rubric on factual ticks (subjectivity creep).
- Gaming a single aggregate by overfitting goldens.
Common issues
Metric contradicts human judgmentMetric/task mismatch
Re-classify the task; pick the right metric family.
Pass rate unstableModel nondeterminism
Seed/sample the evaluation n times; report confidence.
Debugging tips
- Scores high but human sees junk → metric gaming blind spot; add a rubric/human layer.
- Semantic similarity flags nonsense → threshold loose; tighten.
- Groundedness misses → entailment model too weak; sample instead.
Interview checkpoint
Quick quiz
Groundedness measurement checks…
One aggregate number captures all quality.