A metric is a quantitative function that scores model output, making quality measurable and comparable across runs, models, and time.
Imagine you are grading essays. You could write comments on each one (that is a rubric), or you could assign a number out of 100 (that is a metric). The number is what lets you compare: you can say this essay scored 82 and that one scored 74, so this one is better on whatever you measured. In LLM evaluation, a metric does the same thing. BLEU counts how many word sequences match a reference translation and gives you a number between 0 and 1. ROUGE counts how many reference word sequences appear in the summary and gives you a number. F1 balances false positives and false negatives into one score. The point is that a metric always produces a number. Without numbers, you cannot track improvement, detect regressions, or compare models. Choosing the wrong metric is one of the most common eval mistakes because you end up optimizing for the wrong thing.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Concept explanation~2 min read
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Metrics are the atoms of LLM evaluation. Every eval pipeline, every benchmark, every CI gate ultimately reduces to one question: did the metric go up or down? Choosing the right metric determines what 'better' means for your product.
This deep dive covers what a metric actually is, the two major families, how to pick the right one, and what goes wrong when you pick the wrong one.
What a metric is and is not
A metric is a function that takes a model's output (and optionally a reference answer or additional context) and returns a numeric score. The score is what makes quality measurable: you can track it over time, compare it across models, and set thresholds that block merges when quality drops.
A metric is not a rubric. A rubric defines what good and bad look like in human-readable language ('Score 5 means the answer is complete, accurate, and well-structured'). A metric uses that definition (or a simpler one) to produce a number. You often need a rubric to define what the metric should be measuring, but the rubric itself is qualitative guidance, not a quantitative function.
A metric is not a benchmark. A benchmark is a standardized task set; the metric is one component of the benchmark. MMLU uses accuracy as its metric. HumanEval uses pass@k. SWE-bench uses resolved rate. Different benchmarks can use the same metric, and the same benchmark can be evaluated with different metrics if the scoring protocol allows it.
Situations where this technique stops working.
2–4 min · Everything important, quickly.
Real products, models, and research that use this idea.
- Google uses BLEU as a primary metric for its translation systems because translation has constrained valid outputs where n-gram precision tracks human preference well.
- Anthropic evaluates Claude's code generation using pass@k on HumanEval and SWE-bench, where functional correctness is the ground truth rather than textual similarity.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow do you validate that your chosen metric actually correlates with user-perceived quality?
Collect human ratings on a sample of 100-200 outputs. Compute the metric on the same outputs. Check the correlation (Spearman or Kendall) between human ratings and metric scores. If correlation is below 0.6, the metric is not measuring what you think it is.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Red flags & common mistakes
The phrases that signal junior thinking. Click to expand.
Confusing metrics with rubrics. A rubric defines what good and bad look like; a metric produces a number. You need both, but they serve different purposes.
60 second bullets to scan on the way to the call.
Define a metric as a quantitative function that scores model output
Distinguish reference-based metrics from reference-free metrics with examples
Primary sources. Browse if you want the original framing.
Same topic, related formats. Practice these next.