Natural language processing
NLP Evaluation: Metrics, Human Judgment, and Behavioral Tests
Build NLP evaluation programs that combine task metrics, slices, references, human judgment, behavioral tests, uncertainty, and product outcomes.
By the end you can
- Match classification, sequence, retrieval, generation, and dialogue metrics to their output contracts
- Design human evaluation with clear criteria, qualified raters, blinding, and disagreement analysis
- Use capability, invariance, directional, and minimum-functionality behavioral tests
- Report uncertainty, slices, examples, thresholds, and operating consequences with aggregate scores
Key idea
A score can be precise and still answer the wrong question
Natural language inference is defined over a pair. The premise is the evidence; the hypothesis is the sentence to be judged against it. In 2018 a group of researchers deleted the evidence and scored the task anyway. Gururangan and colleagues reported what came back: “Specifically, we show that a simple text categorization model can correctly classify the hypothesis alone in about 67% of SNLI (Bowman et. al, 2015) and 53% of MultiNLI (Williams et. al, 2017).” Two-thirds of a three-way benchmark survives removing the half of the input the task exists to test. Poliak and colleagues found the same degenerate result independently that year, across 10 distinct NLI datasets.
Measurement validity comes from the relationship between score, population, task, and decision. Numerical precision cannot repair a mismatched construct. The hypothesis-only number is exactly as precise as the full-input number, and it means something else entirely.
CheckList made that operational in 2020. It opens on the same mismatch: measuring held-out accuracy “often overestimates the performance of NLP models”. Ribeiro and colleagues used the suite to find “critical failures in both commercial and state-of-art models”. In a user study, “a team responsible for a commercial sentiment analysis model found new and actionable bugs in an extensively tested model”. Practitioners given the tool “created twice as many tests”. They “found almost three times as many bugs as users without it”. The tool did not make the models worse. It made the failures visible.
Before asking whether a score improved, ask which claim the score can support.
Comparison
Metric families by output contract
Different outputs produce different units of error and different ways of aggregating them. Two of these families have had their default metric measured and found wanting, in public, with the size of the evidence recorded.
Generation. BLEU was tested in 2021 against 2.3 million sentence-level human judgements covering 4,380 systems. Kocmi and colleagues at Microsoft ran that comparison, and their abstract ends on the deployment consequence: “Lastly, we show that the sole use of BLEU impeded the development of improved models leading to bad deployment decisions.” The WMT organisers reached the same verdict independently the following year, and put it in the title of their metrics report: “Stop Using BLEU – Neural Metrics Are Better and More Robust”. A reference-overlap score is not neutral bookkeeping. It selects which models get shipped.
Retrieval. “Incomplete judgments” is a measured limit, not a caveat. In 2004 Buckley and Voorhees tested the Cranfield assumption on three TREC collections and 17 progressively reduced judgment sets, thinned down to 1 percent: “We show that current evaluation measures are not robust to substantially incomplete relevance judgments.” MAP, P(10) and R-precision moved as the qrels thinned, while their new bpref-10 measure kept Kendall tau above 0.9 down to the 25 percent qrels on TREC-8. The same paper prices the instrument. On TREC-8, a MAP difference of 0.040 — 9.7 percent of the best run's score — is needed for 95 percent confidence in the conclusion. Leaderboard decimals imply something far finer than that.
The modern form is stranger. Arabzadeh and colleagues pooled the top results of MS MARCO leaderboard runs over 500-plus queries and put them to crowd assessors. The assessors preferred a neural ranker's top result to the single labelled relevant item often enough to make the ranker score “better than perfect” under MRR.
Classification metrics
Accuracy, precision, recall, F scores, calibration, and confusion.
- Threshold-dependent decisions
- Class prevalence matters
- Macro and micro differ
- Slice analysis required
Structured prediction metrics
Token, span, relation, tree, slot, and record measures.
- Boundary and type errors
- Exact or partial match
- Validity constraints
- Consumer-specific tolerance
Retrieval and ranking metrics
Recall at depth, reciprocal rank, average precision, and discounted gain.
- Candidate versus final stage
- Binary or graded relevance
- Query-level aggregation
- Incomplete judgments
Generation metrics
Reference overlap, semantic similarity, source support, human rubrics, and task success.
- Many valid outputs
- Factuality separate from style
- Attribution required
- Evaluator validation
Dialogue and system metrics
State, repair, completion, effort, latency, incidents, and downstream outcomes.
- Multi-turn dependence
- Workflow controls
- User population
- Longitudinal evidence
Visual
An evaluation evidence stack
Higher layers should not erase diagnostic component evidence below them.
The behavioral and slice layer earns its place because a single aggregate can average a population into invisibility. Five commercial speech recognisers — Amazon, Apple, Google, IBM, Microsoft — were measured on 19.8 hours of interviews with 42 white and 73 black speakers, matched on age and gender. Koenecke and colleagues published the result in PNAS on 23 March 2020: “We found that all five ASR systems exhibited substantial racial disparities, with an average word error rate (WER) of 0.35 for black speakers compared with 0.19 for white speakers.” The gap persisted on identical phrases, so it is not an artefact of what the two groups happened to say. A vendor reporting one pooled WER over that same audio would report a number that is arithmetically correct and describes no user.
The slice below the slice is linguistic. Martin and Tang worked through 100 hours of spoken African American English in 2020 and traced part of the mechanism: habitual “be” and the words around it are more error prone than non-habitual “be”. That is the level at which a fix can be specified. The aggregate never reaches it.
- 01
Unit tests and schema checks
Verify deterministic transformations, offsets, valid outputs, and protected rules.
- 02
Component task metrics
Measure labels, spans, retrieval, generation, state, and calibration.
- 03
Behavioral and slice tests
Probe phenomena, groups, languages, domains, and severe failures.
- 04
Human judgment
Assess criteria that require interpretation, expertise, or contextual evidence.
- 05
Product outcomes
Measure completion, correction, harm, effort, adoption, and long-term change.
Example
Behavioral tests that reveal hidden competence gaps
A compact suite can expose failures that thousands of average examples dilute. HANS is one. Built in 2019, it is a controlled test set constructed so that three syntactic shortcuts — lexical overlap, subsequence, constituent — are guaranteed to give the wrong answer. McCoy and colleagues state the result plainly: “We find that models trained on MNLI, including BERT, a state-of-the-art model, perform very poorly on HANS, suggesting that they have indeed adopted these heuristics.” The suite is small and adversarial by construction. It separates two systems that the held-out set scores identically.
Gardner and 25 co-authors generalised the method in 2020. They built contrast sets for 10 diverse NLP datasets by minimally perturbing test items — changing as little as possible while changing the correct label — and measured performance drops of up to 25 percent against the original test sets. The perturbed items were near-neighbours of examples the models had already answered correctly.
- Minimum functionality: simple cases the system should handle before more complex examples matter, scored separately so that a passing average cannot hide a failing floor.
- Invariance: irrelevant edits such as harmless punctuation or name substitution should not change the decision; the interesting failures are the ones a held-out set never samples.
- Directional expectation: adding negation, urgency, or contradictory evidence should move behavior predictably. Contrast sets are this test at scale, across 10 datasets, and they cost up to 25 percent of the original score.
- Capability decomposition: isolate reference, temporal scope, numeric comparison, or answerability. HANS splits one task into three named heuristics — lexical overlap, subsequence, constituent — and reports each rather than their mean.
- Metamorphic relation: transform input and verify a known relationship among outputs when no single label is available.
- Regression case: preserve incidents and high-value failures as versioned tests with ownership.
Analogy
A medical panel rather than one thermometer
A clinician combines vital signs, laboratory tests, imaging, history, and direct examination. One instrument can be accurate without describing the whole condition.
Evaluation produces no definitive diagnosis, and NLP measures carry no medical validity. Independent evidence channels still reduce blind spots.
A release decision should rest on a portfolio of validated measurements.
Human evaluation needs an experimental design
A vague instruction such as “rate quality from one to five” mixes support, completeness, clarity, style, and preference. Raters may reward fluency, or infer facts from memory instead of checking the supplied source.
Define separate criteria, anchor examples, qualifications, source access, blinded order, randomization, repeated items, adjudication, and agreement. Report uncertainty and disagreement rather than averaging them away. How much the procedure decides has been measured, twice, on the same outputs.
Microsoft claimed human parity for Chinese–English translation. In 2018 Läubli and colleagues re-ran the evaluation and changed one thing: the unit of judgement. They used 55 documents and 2x120 sentences from the WMT 2017 test set, rated by professional translators recruited on ProZ with an average of 13.7 years of experience. Judged as isolated sentences for adequacy, machine and human translation were statistically indistinguishable (x=86, n=189, p=.244). Judged as whole documents, the human translation was significantly preferred (x=104, n=178, p<.05), and preference for the machine output fell from 50 to 37 percent. Their conclusions: “Raters showed a markedly stronger preference for human translations when evaluating at the level of documents, as compared to an evaluation of single, isolated sentences.” Parity was a property of the evaluation window, not of the system. Toral and colleagues reached the same conclusion independently that year, by varying rater expertise, inter-sentential context and source-side translationese.
The second lever is the raters, and it moves the ranking too. Freitag and colleagues rescored the top WMT 2020 systems in two language pairs for Transactions of the ACL. The annotations came from professional translators “with access to full document context”. That produced “a substantially different ranking of evaluated systems from the one established by the WMT crowd workers”. It exhibited “a clear preference for human over machine output”. The same abstract holds the more awkward result: “automatic metrics based on pre-trained embeddings can outperform human crowd workers”.
Human judgment becomes evidence only when the rubric and procedure make the construct reproducible.
Key idea
A model evaluator is another measurement model
LLM-based evaluators can support scale, pairwise comparison, or structured critique. They can also show position bias, verbosity bias, prompt sensitivity, shared blind spots, and contamination with the system under test.
The first of those has a number on it. Swap the order in which two candidate answers are shown and the verdict moves: with ChatGPT as the evaluator, Vicuna-13B beats ChatGPT on 66 of 80 tested queries. Wang and colleagues measured that in 2024: “We find that the quality ranking of candidate responses can be easily hacked by simply altering their order of appearance in the context.” GPT-4 favours the first response and ChatGPT the second, even when the prompt instructs the judge to ignore order. The defect is not addressable by asking the judge not to have it. Koo and colleagues benchmarked six cognitive biases across LLM evaluators the same year, in a suite called CoBBLEr, and found bias indications in roughly 40 percent of the comparisons the models made.
Validate against qualified human judgments on the target criteria, stress test order and style changes, version the evaluator, and analyze disagreement. Do not let a system certify itself through an unexamined proxy.
Both halves of the case sit in one 2023 abstract, from Zheng and colleagues, and the defects come first. The paper examines “the usage and limitations of LLM-as-a-judge, including position, verbosity, and self-enhancement biases, as well as limited reasoning ability”. Then it measures the agreement: “strong LLM judges like GPT-4 can match both controlled and crowdsourced human preferences well”. That is “over 80% agreement, the same level of agreement between humans”. The second sentence is usable only because the first one was measured.
Automating evaluation does not remove the need to validate the evaluator.
Steps
Build a release-grade NLP evaluation program
The program should make claims, evidence, and decision thresholds traceable.
1. Write the release claims
State populations, tasks, constraints, expected benefits, and prohibited failures.
2. Map each claim to evidence
Choose metrics, slices, behavioral tests, human criteria, and outcomes.
3. Freeze representative and protected sets
Control provenance, time, overlap, repeated tuning, and access.
4. Report uncertainty and examples
Include confidence intervals, per-query variation, disagreements, and severe cases.
5. Define gates and review
Specify who can accept exceptions, how tests evolve, and what triggers rollback.
A result needs a denominator and an operating point
“Recall is 90 percent” is incomplete without the class, population, threshold, sample size, time period, and uncertainty. “NDCG improved” needs candidate depth, judgments, query mix, and index version.
The missing denominator has been priced. Card and colleagues measured the statistical power of standard NLP experiments in 2020: “For machine translation, we find that typical test sets of 2000 sentences have approximately 75% power to detect differences of 1 BLEU point.” Power of 75 percent means a real one-BLEU improvement goes unseen a quarter of the time, on the sample size the field treats as standard. The same paper reports several GLUE tasks too small for most comparisons to state of the art to be adequately powered. Mathur and colleagues showed the complementary failure that year: metric-versus-human correlations are driven by outlier systems, and they quantify the resulting type I and type II errors in pairwise system ranking.
A useful report pairs aggregates with slices, calibration, failure examples, cost, latency, coverage, and known limitations. It also states which decisions the evidence does not justify, including the differences the test set was never large enough to resolve.
Every metric should travel with the conditions under which it was measured.
Case
The random seed alone separates a state-of-the-art system from a mediocre one
Even the random seed belongs among the reported conditions. Reimers and Gurevych trained “50.000 LSTM-networks for five sequence tagging tasks” in 2017, holding architecture, data and hyperparameters fixed and changing only the seed. They found that “the seed value for the random number generator can result in statistically significant” differences “for state-of-the-art systems”. For two published NER systems the spread was “an absolute difference of one percentage point” in F1 “depending on the selected seed value, making these systems perceived either as state-of-the-art or mediocre”. Their proposal follows from the measurement: publish score distributions over repeated runs, not one number.
Figure
Turn one vague benchmark into a measurement plan
Choose a claim such as “the summarizer is more accurate” or “the multilingual router is fair.” Define the construct, population, comparison, metrics, human criteria, slices, uncertainty, and release threshold.
Then list three ways the proposed measures could be gamed or misinterpreted. A hypothesis-only shortcut, a shifted unit of judgement and a swapped candidate order are three that have already been demonstrated on published benchmarks. Add one product outcome that could contradict the benchmark result.
Evaluation design begins by making the claim falsifiable and the measurement vulnerable to criticism.
Key takeaways
- NLP evaluation should connect every score to a defined output, population, operating point, and product claim: a classifier shown only the hypothesis still labels about 67% of SNLI and 53% of MultiNLI correctly.
- Classification, structure, retrieval, generation, dialogue, and outcome metrics answer different questions, and defaults expire: BLEU alone was shown to cause bad deployment decisions, against 2.3 million human judgements over 4,380 systems.
- Behavioral tests expose minimum capability, invariance, directional change, decomposition, and regression failures that averages hide. HANS made MNLI-trained models including BERT collapse, and contrast sets over 10 datasets cost up to 25 percent.
- Human evaluation requires separated criteria, qualified raters, blinding, anchors, disagreement analysis, and uncertainty. The same translations moved from p=.244 at sentence level to a significant preference for human output at document level.
- Model-based evaluators are measurement models that need validation, stress testing, versioning, and independent comparison. An order swap alone flipped the verdict on 66 of 80 queries.
- Release reports should combine aggregates, slices, examples, calibration, uncertainty, cost, coverage, severe failures, and limitations, including power: 2000 sentences give roughly 75% power to detect 1 BLEU point.