Pick the best definition: in LLM evaluation, a metric is _____.
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.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 min: define metric as a quantitative scoring function, distinguish reference-based from reference-free with examples, explain why metric selection determines what you optimize, give a concrete misapplication example, and close with the practice of layering multiple metrics.
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.
- Ragas, an open-source RAG evaluation framework, defines metrics like faithfulness and context recall that check whether retrieved context actually supports the generated answer.
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?
QWhat is BERTScore and when does it outperform BLEU and ROUGE?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes 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.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.