Part of Language AI Handbook
Benchmark scores can mislead when test data leaks, metrics saturate, or systems game proxies. Covers contamination, brittleness, Goodhart's Law, and mitigation.
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
Evaluation Challenges
Modern language models achieve state-of-the-art scores on benchmark after benchmark, yet practitioners regularly encounter a troubling gap: models that ace standardized tests often stumble on real-world problems. Something is wrong with how the field measures progress. This chapter digs into four interconnected challenges that explain this gap: benchmark contamination, evaluation brittleness, metric gaming, and the practical question of what good evaluation looks like in the first place.
Understanding these challenges is not an academic exercise. If you are building, deploying, or studying language models, every decision you make about evaluation shapes what you know about your system. Flawed evaluation produces confident but wrong conclusions, and those conclusions propagate into deployment decisions, research directions, and public claims. A team that believes its model achieves 90% accuracy on a reading comprehension task because the benchmark was contaminated may ship a product that fails users at a rate far higher than expected. A researcher who reports a new technique improves performance by 5 percentage points, when the improvement disappears under different prompt formulations, sends the field down an unproductive path. Evaluation integrity is not just methodological hygiene; it is the foundation on which scientific and engineering progress rests.
The challenges in this chapter are not new to machine learning, but they are particularly acute for large language models. The scale at which these models are trained, the opacity of their training data, and the breadth of capabilities they claim to possess all amplify the standard measurement problems that any empirical science faces. We will work through each challenge systematically, explain why it occurs, and discuss practical approaches for either mitigating it or accounting for it when interpreting results.
Benchmark Contamination
Benchmark contamination occurs when the test data used to evaluate a model was present in the model's training data. The model has, in effect, memorized the answers rather than learned the underlying skill. This is the most structurally damaging problem in modern LLM evaluation, and it is also one of the hardest to fully eliminate.
The reason contamination is so structurally damaging is that it breaks the fundamental logic of held-out evaluation. When you train a model on a dataset and test it on a different dataset, you are relying on the assumption that performance on the test set reflects performance on unseen data. If the test set was in the training data, that assumption fails. The model may not have generalized at all; it may simply have retrieved memorized patterns. A high score no longer tells you what you need to know.
How Contamination Happens
The contamination problem is a direct consequence of how large language models are trained. Models like GPT-4, Claude, and LLaMA are trained on enormous corpora scraped from the internet. Popular benchmarks, including MMLU, HellaSwag, BIG-Bench, and many others, have been publicly available online for years. Their questions, answer choices, and sometimes full solutions appear on websites, in GitHub repositories, in academic papers, and in forums. A web crawl will almost certainly capture them.
There are three distinct mechanisms by which contamination enters training data:
- Direct text overlap: The exact benchmark items appear verbatim in training data. The model can retrieve the answer as a memorization fact.
- Near-duplicate overlap: Paraphrased or reformatted versions of benchmark items appear in training data. The model may not have memorized exact answers, but has seen the problem structure enough that it has an unfair advantage.
- Metadata and solutions overlap: Discussion threads, textbook solutions, or blog posts that reference benchmark problems appear in training data. Even without the benchmark question itself, the model may have seen explanations of the correct answers.
The challenge for researchers is that training corpora are rarely fully documented or publicly available. When a company trains a model on a trillion tokens of web data, they generally cannot enumerate every document in the corpus. Claiming that contamination is absent requires active deduplication and filtering, and even then, near-duplicate variants may slip through.
The near-duplicate case deserves particular attention because it is harder to detect than verbatim overlap and yet is likely very common. Consider a benchmark question that asks which element has atomic number 6. The exact question may not appear in training data. But the training corpus almost certainly contains chemistry textbooks, Wikipedia articles, educational websites, and forum discussions that explain atomic number 6 in detail. The model has not memorized this specific question, but it has been so thoroughly exposed to the underlying fact that its performance on this question reflects familiarity rather than general reasoning ability. Drawing the line between "learning a fact" and "being contaminated on a benchmark" is difficult, and reasonable researchers disagree about where that line falls.
The Difficulty of Detection
Detecting contamination after the fact requires statistical ingenuity. Several approaches exist, each with limitations.
Perplexity-based detection: If a model was trained on test items, it should assign unusually low perplexity to them (that is, it finds them very predictable). Comparing a model's perplexity on benchmark items versus similar-difficulty held-out items can reveal suspicious gaps. The limitation is that a capable model may assign low perplexity to any well-formed text, making it hard to distinguish contamination from fluent output.
Slot-filling probes: Researchers have designed tests where key tokens in benchmark items are blanked out. A contaminated model should be able to fill in the blanks from memory, while an uncontaminated model should not. This works well for multiple-choice answers, where the blank might be the correct answer letter, but is harder to apply to open-ended tasks.
N-gram overlap measurement: Automated tools scan training corpora for n-gram matches with test items. GPT-4's technical report introduced a suffix matching approach that looks for shared suffixes of a given length. This catches direct overlap but misses paraphrased contamination.
Performance degradation on reformulated benchmarks: If a model was contaminated on a benchmark, its performance should drop when the benchmark is reformulated, for instance by changing the order of answer choices, substituting synonyms, or translating to a different language. Consistent performance across reformulations is evidence against contamination. Significant drops are a red flag.
None of these methods is definitive. A model could score high on a benchmark for legitimate reasons (underlying capability) or contamination reasons, and distinguishing the two is fundamentally difficult without access to full training data. This asymmetry of information, where model developers can inspect training data but external evaluators often cannot, creates a trust problem that is difficult to resolve through technical means alone. Transparent reporting of contamination mitigation steps, along with independent verification through reformulation experiments, provides the best available evidence.
Contamination at Scale
The scale of the problem became clear as research groups began systematically studying it. In 2023, researchers studying several widely used benchmarks found substantial evidence that major models had seen test items during training. One study found that GPT-4 achieved near-perfect recall of specific benchmark items when prompted appropriately, suggesting direct memorization. Other studies found systematic performance drops when benchmarks were rephrased, indicating that scores were partially driven by text matching rather than reasoning.
This creates a perverse dynamic. Benchmarks become less useful the more widely they are used. The moment a benchmark becomes the standard way to measure some capability, it becomes a target for contamination, both accidentally (through web scraping) and intentionally (through targeted data collection). Highly competitive evaluation pressures make this worse. Research groups and companies have strong incentives to report high scores on widely-used benchmarks. The same incentives that drive researchers to work hard also drive them, consciously or not, toward evaluation choices that favor favorable results.
The problem extends beyond deliberate manipulation. Consider the typical model development cycle: a team trains a model, observes its performance on standard benchmarks, identifies weaknesses, curates additional training data to address those weaknesses, and retrains. Over multiple iterations, the training data distribution shifts toward material that improves benchmark performance. Even without ever including benchmark items directly, this process is a form of indirect contamination: the model is being trained toward the benchmark rather than toward the underlying capability.
Practical Implications
Contamination does not mean that benchmark scores are meaningless, but it means they must be interpreted with appropriate skepticism. Several practical responses are worth knowing:
- Time-based splits: New benchmarks that were not yet indexed when a model was trained provide cleaner signal. Evaluations using events or publications from after the training cutoff, sometimes called "knowledge cutoff benchmarks," exploit this property. The limitation is that only some capabilities can be tested this way.
- Dynamic benchmarks: Some evaluation frameworks generate fresh problems programmatically for each evaluation session, making contamination impossible. The Dynabench project and similar dynamic evaluation systems take this approach. The tradeoff is that dynamic generation makes it harder to ensure consistent difficulty and to compare results across sessions.
- Private holdout sets: Keeping benchmark items secret until evaluation time provides clean signal, at the cost of making evaluation difficult to replicate. Several industry evaluations use private test sets for this reason. The limitation is that secret benchmarks cannot be scrutinized for quality, fairness, or validity by the research community.
- Behavioral consistency checks: Verifying that a model's performance on rephrased variants matches its original performance provides soft evidence about contamination, even when access to training data is unavailable. A well-calibrated model with the underlying capability should perform similarly across semantically equivalent phrasings; a contaminated model may show performance cliffs when the surface form changes.
Taken together, these responses suggest a shift in evaluation practice: rather than trusting any single benchmark score as a reliable measure, build a picture from multiple sources of evidence and treat unusual gaps or inconsistencies as signals worth investigating.
Evaluation Brittleness
Even when contamination is not present, evaluation results can be surprisingly fragile. A model may score 90% on one version of a task and 65% on a semantically equivalent reformulation. This brittleness is not a quirk; it is a systematic property of how neural networks represent and process language.
The reason for brittleness lies in how language models process input. A transformer model does not extract abstract meaning from a prompt and then reason about that meaning in isolation. It processes a specific sequence of tokens, and the statistical patterns associated with those tokens influence every downstream computation. When you change the surface form of a prompt, even while preserving its logical content, you change the token sequence and thereby shift the internal activations. For a robust reasoner, these shifts would be small and well within the range where the correct answer can still be reached. For a system whose performance depends on pattern matching, even small surface changes can push the model into a different region of its parameter space where different outputs are favored.
Prompt Sensitivity
Language model performance depends heavily on how tasks are phrased. The same question, posed in slightly different ways, can produce dramatically different accuracy. This sensitivity is well-documented and has several causes.
Format effects: Models trained on instruction-following data learn associations between formatting conventions and task types. A model may perform better on multiple-choice questions when the choices are labeled A, B, C, D than when they are labeled 1, 2, 3, 4, or Option A, Option B, not because the underlying knowledge differs, but because the familiar format activates the relevant processing patterns. The model has seen many multiple-choice questions in its training data formatted in certain ways, and those formats serve as retrieval cues.
Instruction framing: "Answer in one word" versus "Provide a brief answer" versus "Reply concisely" can all produce different token distributions, which in turn affect which answer the model selects. Even apparently minor phrasing differences, like whether instructions appear before or after the question, affect performance. This sensitivity to instruction framing is a reflection of how instruction-tuned models were trained: they learned to follow certain linguistic patterns, and small deviations from those patterns may push the model toward less reliable outputs.
Few-shot example selection: When evaluations use few-shot prompting (providing example question-answer pairs before the actual question), the choice of examples matters enormously. Using easier or harder examples, or examples from a different distribution, can shift performance by 10 to 20 percentage points on some benchmarks. The model uses the few-shot examples to infer the task format and the expected response style, so examples that suggest the wrong format or calibration will lead it astray.
Chain-of-thought sensitivity: Models often perform better when prompted to reason step by step before producing an answer. But the specific incantation matters. "Let's think step by step" works differently from "First, let me reason through this" on the same model, even though the semantic intent is identical. This is partly an artifact of training data: specific phrases that appear frequently in reasoning demonstrations are more likely to trigger the reasoning behavior the model learned to associate with them.
Positional and ordering effects: The position of the correct answer among multiple-choice options affects accuracy. If a model has a bias toward selecting certain answer positions (say, "B" or "C" rather than "A" or "D"), shuffling answer choices will change its measured performance even though the underlying question and correct answer remain the same. Several studies have documented that this positional bias is substantial for some models, and that standard benchmark evaluations that fix answer positions are systematically affected.
This means that a benchmark result is more than a measure of a model's capability; it is a measure of a model's capability combined with the specific prompt format used in the evaluation. Two research papers using slightly different prompt formats may measure different things and reach different conclusions about the same model.
Evaluation Set Composition
The items included in a benchmark shape what gets measured in subtle ways. Even well-designed benchmarks have compositional properties that can be exploited or that may not generalize.
Topic and difficulty distribution: A reading comprehension benchmark might oversample texts from one domain (news articles, for example) and undersample others (scientific papers, legal documents). A model that has heavily trained on news text may outperform on such a benchmark not because it is a better reader in general, but because it is better in the evaluated domain. When aggregate scores hide domain-specific variation, they can create misleading impressions of general capability.
Label balance: In classification tasks, the distribution of correct answers matters. If a multiple-choice benchmark happens to have "B" as the correct answer 40% of the time, a model with a bias toward selecting "B" will appear more capable than it is. This has been observed in practice: some models develop positional biases in multiple-choice settings. The MMLU benchmark, for example, has unequal answer distributions across subjects, which means models with different positional biases will perform differently across subjects for reasons unrelated to knowledge.
Spurious correlations: Benchmark items sometimes contain unintended cues that allow high performance without the target skill. Natural language inference datasets have been found to contain lexical patterns (certain words appearing more often in entailment examples, for instance) that allow models to classify without performing the intended reasoning. A model can achieve high accuracy on such a benchmark by exploiting these surface cues while failing entirely on items that require the reasoning the benchmark claims to measure. The celebrated fact that BERT-style models achieved near-human performance on NLI benchmarks was followed by discovery that much of this performance came from exploiting dataset artifacts rather than reasoning about entailment.
Length and complexity biases: Items that are shorter, simpler, or more stylistically uniform may be easier to answer through pattern matching than items that require sustained attention and complex reasoning. A benchmark that inadvertently over-represents simple items will overestimate a model's capability on difficult ones. Similarly, if benchmark items share a characteristic style (because they were written by the same authors or drawn from the same source), models that encountered similar text in training will benefit from style familiarity.
Sensitivity to Answer Format
Beyond prompt format, the expected output format shapes results. Models evaluated with free-form generation often perform differently from the same models evaluated with constrained generation (selecting from a fixed list of choices). This is not surprising; these are different tasks. But it complicates comparison across evaluations that use different output formats.
Open-ended generation evaluation introduces additional brittleness through the evaluation process itself. If a model says "Paris" to a geography question and the expected answer is "Paris, France," does the model get credit? Exact match metrics will penalize this, while ROUGE or BERTScore (covered in earlier chapters of this handbook) will give partial credit. The choice of output scoring methodology becomes part of the evaluation result. Two evaluators using the same model and the same benchmark may reach different conclusions about its accuracy if they use different answer extraction and scoring heuristics.
This problem is particularly acute for open-ended generation tasks like summarization, translation, and question answering with long answers. For these tasks, no single automated metric captures all dimensions of quality, and different metrics often disagree on which outputs are best. Fluency and factual accuracy are different properties that need separate measurement; a model can produce fluent, confident summaries that are factually wrong, and no single score captures this distinction.
Gaming Metrics
When evaluation metrics become targets, they stop being good measures. This insight, often called Goodhart's Law in economics and social science, applies with particular force to machine learning benchmarks. Once a benchmark becomes the standard measure of some capability, the pressure to score well on that benchmark incentivizes behaviors that improve the score without improving the capability.
When a measure becomes a target, it ceases to be a good measure. Originally formulated in the context of monetary policy by economist Charles Goodhart, this principle has become a touchstone in AI evaluation: optimizing directly for a metric tends to decouple the metric from the underlying property it was meant to measure.
The mechanism behind Goodhart's Law is straightforward in machine learning terms. A metric is designed to correlate with a capability under the assumption that the metric's designers did not anticipate every possible way to optimize it. Once researchers start actively optimizing for the metric, they explore strategies the designers did not foresee. Some of these strategies improve capability. Others exploit idiosyncrasies of the metric: they raise the measured score without raising (and sometimes while lowering) the underlying capability. Over time, as more effort goes into metric optimization, the fraction of score improvement driven by underlying capability improvement shrinks.
Forms of Metric Gaming
Gaming can be unintentional or deliberate, and it occurs at multiple levels.
Hyperparameter tuning to benchmarks: The standard practice of selecting model checkpoints and hyperparameters based on validation performance can inadvertently select for benchmark-specific behaviors. If the same benchmarks are used for both hyperparameter tuning and final evaluation, the evaluation is no longer measuring generalization; it is measuring how well the configuration was tuned to those specific items. This is a subtle form of data leakage that is easy to commit accidentally. Every time a researcher runs an experiment, observes benchmark performance, and adjusts a hyperparameter accordingly, that benchmark is being used as a target.
Data selection and filtering: Training data curation decisions can implicitly target benchmark performance. If a researcher observes that certain types of training data improve benchmark scores, they may increase the proportion of that data. Over many iterations, training data distributions can shift to favor benchmark-correlated patterns. This process can occur without any intention to game: researchers reasonably prefer training data that improves their benchmarks. The cumulative effect is still that the model is being fit to the benchmark rather than to the underlying task.
Post-processing optimization: Some teams optimize post-processing pipelines (sampling temperatures, output filtering, answer extraction heuristics) specifically for benchmark evaluation. The resulting system may score well but behave very differently in practice where these optimizations are absent. A model evaluated with a temperature of 0 and a specific answer-extraction regex may perform quite differently when deployed with standard generation parameters.
Deliberate training on benchmark-adjacent data: More aggressively, models can be trained explicitly on data that is similar to benchmark items without including the items themselves. This is technically not contamination (the actual test items were not seen), but it optimizes for the evaluation target rather than the underlying skill. Creating training data by paraphrasing benchmark items, or by scraping every resource that covers benchmark-adjacent topics in depth, falls into this category. The distinction between "curating high-quality training data" and "gaming the benchmark" can become uncomfortably blurry.
Model selection from a large candidate pool: If many model variants are trained and only the best-performing one is reported, the reported performance reflects the upper tail of a distribution rather than the expected performance of the training procedure. This is a form of cherry-picking that is especially common when training is expensive and only a few runs can be reported. The solution is to pre-register evaluation plans before training, or to report results across all runs rather than just the best.
The Benchmark Saturation Problem
As models improve on a benchmark, the benchmark becomes less informative. Once multiple models achieve above 90% accuracy on a task, differences in the remaining items may reflect idiosyncrasies of those items rather than systematic capability differences. This is evaluation saturation.
The response is usually to create harder benchmarks. But this just moves the target: the new benchmark becomes the standard, pressure builds on it, and the cycle repeats. The field has seen this pattern with GLUE, then SuperGLUE, then BIG-Bench, with frontier model performance on each catching up faster than initially expected.
Saturation also creates a false sense of progress. When a benchmark saturates near 100%, observers may conclude that the underlying capability is solved. But the benchmark may have been an imperfect proxy for the capability in the first place, and saturation on the proxy does not mean saturation of the capability itself. Reading comprehension benchmarks, for example, have been "solved" multiple times, yet language models continue to fail on reading comprehension tasks that require common sense, temporal reasoning, or tracking entity states across long documents. The benchmark measured a slice of the capability, and saturating that slice told us only that models had mastered that particular slice.
There is also an underappreciated compositional effect: as more and more research groups evaluate on the same benchmark, the community accumulates detailed knowledge about which prompt formats, which training data characteristics, and which model architectures perform best on that benchmark specifically. This community-level optimization creates a form of collective gaming even when no individual team is acting improperly.
Goodhart's Law in Practice
The canonical example in NLP was BLEU score for machine translation. BLEU measures n-gram overlap between a generated translation and reference translations. It was an excellent diagnostic tool when first introduced. But as BLEU became the standard evaluation metric, systems began to be tuned specifically for BLEU performance, and researchers noticed that high-BLEU systems often produced translations that human evaluators found worse than lower-BLEU alternatives. Systems learned to game BLEU by overusing frequent n-grams and avoiding rare words, even when the rare word was the correct translation. A translation that used common synonyms for every term would score well despite being wooden and sometimes inaccurate.
The same dynamic has played out with:
- ROUGE scores for summarization, where systems produce summaries that match reference n-grams but may lack coherence or factual accuracy. A summary that copies the most frequent phrases from the source document will score well on ROUGE regardless of whether it makes sense as a standalone text.
- Accuracy metrics for classification, where high accuracy can be achieved by exploiting class imbalances or spurious correlations. A classifier that always predicts the majority class achieves high accuracy on an imbalanced dataset while being useless for the minority class.
- Perplexity for language modeling, where very low perplexity can result from models that are extremely good at predicting training-data-like text but struggle on out-of-distribution inputs. Optimizing perplexity on a specific domain can degrade performance on other domains even as the single reported number improves.
- Human evaluation scores obtained through crowdsourcing, where annotators can be gamed by systems that produce confident, authoritative-sounding text. Annotators who are not domain experts tend to rate fluent text as accurate even when it is not, and systems optimized for human preference scores in this setting may learn to sound confident rather than to be correct.
Each of these cases follows the same pattern: a metric captures some real aspect of quality, becomes the optimization target, and then decouples from quality as optimization pressure reveals the gap between the metric and the underlying property.
Contamination and Brittleness in Practice
To make the impact of contamination and prompt sensitivity concrete, let's build a small simulation. We will compare two models: one clean and one with contamination inflating its scores. We will also visualize how reported benchmark scores can diverge from true capability, and how benchmark saturation plays out across successive generations of benchmarks.
import numpy as np
# Six hypothetical models with different true capabilities
true_capabilities = np.array([0.55, 0.62, 0.68, 0.72, 0.78, 0.83])
model_labels = [
"Model A",
"Model B",
"Model C",
"Model D",
"Model E",
"Model F",
]
# Contamination inflates reported scores by different amounts
contamination_inflation = np.array([0.0, 0.05, 0.12, 0.18, 0.08, 0.22])
# Prompt brittleness: standard deviation of performance across prompt variants
prompt_brittleness = np.array([0.03, 0.08, 0.05, 0.12, 0.06, 0.10])
# Reported scores = true capability + contamination inflation + small noise
reported_scores = (
true_capabilities
+ contamination_inflation
+ np.random.normal(0, 0.01, len(true_capabilities))
)
# Score range across prompt variants (mean +/- 2 std)
low_scores = reported_scores - 2 * prompt_brittleness
high_scores = reported_scores + 2 * prompt_brittleness
Models D and F appear significantly more capable than their underlying capability warrants because contamination inflation boosts their reported scores. At the same time, the wide error bars on models B and D reveal high prompt brittleness: their apparent performance could be quite different depending on which prompt format an evaluator happens to use. Two evaluators using different prompt formats for Model D might reach opposite conclusions about whether it outperforms Model C.
Now let's simulate benchmark saturation: the pattern where model performance rises rapidly to match human baselines, forcing the creation of harder replacement benchmarks.
years = np.linspace(2018, 2026, 100)
def sigmoid_score(years, center, steepness, asymptote=0.98):
"""Logistic growth curve modeling rapid benchmark saturation."""
return asymptote / (1 + np.exp(-steepness * (years - center)))
# Three successive benchmark generations
glue_scores = sigmoid_score(years, center=2019.5, steepness=3.5, asymptote=0.97)
superglue_scores = sigmoid_score(
years, center=2021.0, steepness=3.2, asymptote=0.96
)
bigbench_scores = sigmoid_score(
years, center=2022.8, steepness=3.8, asymptote=0.94
)
# Approximate human performance baselines for each benchmark
glue_human = 0.87
superglue_human = 0.89
bigbench_human = 0.80
The saturation curves illustrate the treadmill dynamic. Each benchmark provides a useful window of differentiation before model performance catches up. The dotted lines show approximate human baselines, and models surpass human-level performance on each benchmark within a few years. This pattern has driven the creation of progressively harder evaluation suites and has accelerated the field's search for benchmarks that remain informative.
Notice, too, that the human baselines differ across benchmarks. BIG-Bench Hard was specifically designed to contain tasks that are difficult for humans as well as models, which is part of why its human baseline sits lower than GLUE or SuperGLUE. This design choice slows saturation but also raises questions about what "superhuman" performance means on a benchmark where humans score 80%: is the model better, or has it found patterns in the benchmark structure that humans would not exploit given enough time?
Evaluation Best Practices
Given these challenges, how should you approach evaluation? There is no perfect solution, but there are practices that substantially improve evaluation quality. The key insight is that evaluation is a design problem with tradeoffs, not a lookup problem with known answers. Good evaluation requires understanding what you want to measure, choosing instruments that are valid for that purpose, and being transparent about the gap between your instruments and your actual goals.
Diversify Your Evaluation Suite
No single benchmark captures every aspect of capability. A sound evaluation uses multiple complementary measures:
- Capability-specific benchmarks: Cover different skills (reasoning, knowledge, language understanding, generation quality) separately. Aggregate scores obscure important variation. A model might perform well on factual recall and poorly on multi-step reasoning; an average score hides this distinction.
- Prompt robustness tests: Evaluate performance on multiple formulations of each task. If scores vary widely across formulations, the measurement is unreliable. Wide variance is itself an important finding that should be reported.
- Held-out test sets: Maintain evaluation items that were not used in any model selection decision. Items used for hyperparameter tuning are not held out in any meaningful sense. The distinction between validation and test data is not just terminology; it reflects whether the evaluation provides new information about generalization.
- Adversarial items: Include examples specifically designed to test failure modes, edge cases, and known weaknesses. Benchmarks that test only typical cases miss important reliability properties. Adversarial evaluation is particularly important for safety-critical applications where failures are costly.
- Domain-specific subsets: If your application involves a specific domain (legal, medical, technical), evaluate explicitly on that domain rather than relying on general benchmarks to be representative. General-purpose evaluation results may not transfer.
Assess Prompt Sensitivity Explicitly
Rather than treating prompt format as a fixed choice, treat it as an experimental variable. Evaluate each model across a distribution of prompt formats and report the mean and variance. A model that achieves 80% with low variance is more reliable than a model that achieves 85% average with high variance. Variance across prompts is a first-class measurement, not a nuisance to be suppressed.
For comparing models, pair-wise comparisons on identical prompts are more informative than comparing numbers across papers that used different prompts. When reviewing published results, check whether evaluations used matched prompts across models. Two models evaluated with different prompts are not directly comparable, even if the prompts appear similar. Even subtle differences in phrasing, formatting, or few-shot examples can shift results substantially enough to change which model appears better.
A practical workflow is to define a canonical evaluation prompt format, run all models on that format, and then run a random sample of prompt variations to estimate robustness. Reporting both the canonical score and the robustness estimate gives readers far more information than a single number.
Use Multiple Output Metrics
For tasks with non-binary outputs, no single metric captures all relevant dimensions of quality. Consider:
- Correctness and fluency are different dimensions for generation tasks; measuring one does not measure the other. A factually wrong but fluently written response scores high on fluency metrics and may score high on automated similarity metrics if it uses the right vocabulary, even though it is useless or harmful.
- Calibration (whether the model's expressed confidence matches its actual accuracy) is important for practical use but is rarely reported in benchmark results. A model that achieves 85% accuracy while being correctly calibrated is more useful than a model that achieves 87% accuracy while being poorly calibrated and overconfident in its errors.
- Consistency across semantically equivalent inputs reveals whether high accuracy reflects understanding or fragile pattern matching. Testing whether a model answers "What is the capital of France?" and "France's capital city is?" identically provides useful information about robustness.
- Error analysis on failed items often reveals more than aggregate accuracy scores; categorizing failure modes by type gives actionable diagnostic information. Knowing that a model fails primarily on questions requiring multi-step arithmetic, rather than failing uniformly, is actionable in a way that a single accuracy number is not.
- Behavioral metrics: For production systems, metrics like response latency, refusal rate, and output length distribution matter alongside quality measures. These are not substitutes for quality metrics but are often just as important for users.
Separate Development and Evaluation
The strict separation between data used for development decisions and data used for final evaluation is a foundational principle that is frequently violated in practice. Any benchmark item that influenced a training decision, a model selection decision, or a hyperparameter choice is no longer an independent evaluation item.
Concretely, this means:
- Never tune on your test set: If you use benchmark performance to choose between model checkpoints, that benchmark has become a validation set, not a test set. The distinction is not just semantic: it changes what the benchmark score tells you. A test-set score estimates generalization performance; a score on data you tuned toward estimates how well you tuned.
- Version your evaluations: When you run a model on a benchmark, record the exact version of the benchmark, the exact prompt format, and the exact evaluation code. Subtle changes to any of these can shift results substantially. A version-controlled evaluation setup ensures that you can reproduce results and that comparisons across time are valid.
- Report all evaluation results: Selective reporting of favorable results is a form of implicit gaming. If you ran 20 evaluation configurations and report only the highest-scoring one, your reported score reflects cherry-picking rather than expected performance. Pre-registering your evaluation plan before running experiments is the most effective guard against this.
- Document what you tuned against: Even if your final evaluation is clean, documenting which benchmarks were used during development helps readers understand what the final evaluation scores represent. This transparency is increasingly expected in high-quality empirical research.
Account for Statistical Uncertainty
Benchmark scores are estimated from finite samples and carry uncertainty that is rarely reported. A model's reported accuracy of 72.3% on a 1,000-item benchmark is an estimate with a confidence interval. Two models that score 72.3% and 73.1% are not necessarily different; the difference may be within sampling noise.
For a binary outcome (correct or incorrect) with items and observed accuracy , the standard error of the estimate is:
For and , this gives:
A 95% confidence interval for the true accuracy spans roughly . Two models with scores of 72.3% and 73.1% are well within this interval of each other and are statistically indistinguishable on this benchmark. Yet papers frequently report such differences as meaningful improvements.
Statistical significance testing, confidence intervals, and bootstrap resampling are standard statistical tools that are underused in NLP evaluation. When comparing models, report whether observed differences are statistically significant. When sample sizes are small (common for expensive-to-evaluate benchmarks), report the uncertainty explicitly. The practice of reporting benchmark scores to one or two decimal places without confidence intervals creates a false impression of precision that the data do not support.
Calibrate Against Human Performance
Human performance provides a useful reference point, but requires careful interpretation. Human baselines should be collected under comparable conditions: same instructions, same time constraints, same interfaces. Comparing model performance to human performance under adversarial conditions (humans given confusing instructions, rushed time limits) is misleading. Comparing it to human performance under highly favorable conditions (domain experts with unlimited time) is also misleading in the opposite direction.
Human performance also varies substantially across humans. Reporting aggregate human accuracy masks variation. A more useful comparison is model performance versus human performance at the same demographic and expertise level as the intended use case. A medical question-answering benchmark evaluated against first-year medical students is measuring something different from the same benchmark evaluated against experienced physicians. If you want to know whether a model can help first-year medical students, the first comparison is more informative.
There is also a deeper question about what human performance comparisons mean for language models. Humans and language models are cognitively very different. A human who scores 80% on a benchmark has a model of the world that supports generalization; they can apply their knowledge in new contexts in ways that a benchmark score does not capture. A language model that scores 80% may have achieved that score through very different mechanisms, some of which generalize and some of which do not. The fact that a model matches human performance on a specific benchmark is informative, but it does not mean the model's capabilities are human-like in the ways that matter most for real-world use.
Consider Evaluation Validity
A benchmark is valid if scores on the benchmark are related in a useful way to the capability the benchmark claims to measure. Validity is distinct from reliability (whether the benchmark produces consistent scores under identical conditions). A benchmark can be very reliable (consistent scores) and completely invalid (not measuring the claimed skill at all).
Assessing validity requires answering: What capability does this benchmark claim to measure? What is the evidence that benchmark scores reflect that capability rather than something else (text memorization, prompt-format familiarity, spurious correlations in the dataset)? This question is harder to answer than it sounds, and the answer changes as models and evaluation practices evolve.
The validity of a benchmark decreases as contamination accumulates, as the benchmark format becomes familiar through training, and as researchers optimize systems for the benchmark specifically. A benchmark that was valid when first introduced, because it was testing novel capabilities, may become invalid over time as the field collectively learns how to exploit its structure.
Thinking carefully about validity also means resisting the temptation to equate benchmark performance with real-world utility. A model that achieves high scores on a reading comprehension benchmark may still struggle with the reading comprehension tasks your application requires if those tasks differ from the benchmark distribution. Benchmark performance is evidence about capability, but it is not a substitute for evaluation on your actual task.
Code Implementation
Let's implement a practical evaluation framework that addresses several of the challenges discussed above, including measurement of prompt sensitivity and contamination detection.
Prompt Sensitivity Measurement
We will compare two models: one clean and one with contamination inflating its scores. By evaluating both across multiple prompt formats, we can see how single-format evaluation can produce misleading rankings.
from collections import defaultdict
# Five evaluation questions with known correct answers
questions = [
{
"id": "q1",
"question": "What is the capital of France?",
"correct": "Paris",
},
{
"id": "q2",
"question": "What element has atomic number 8?",
"correct": "Oxygen",
},
{
"id": "q3",
"question": "In what year did World War II end?",
"correct": "1945",
},
{
"id": "q4",
"question": "What is the speed of light in m/s?",
"correct": "3e8",
},
{"id": "q5", "question": "Who wrote Hamlet?", "correct": "Shakespeare"},
]
# Three prompt formats for the same questions
prompt_formats = {
"direct": "Question: {q}\nAnswer:",
"polite": "Please answer the following question: {q}\nYour answer:",
"cot": "Think step by step and answer the following: {q}\nAnswer:",
}
def simulate_model_response(
prompt_format, model_capability, contamination_bias=0.0
):
"""Simulate a model response with capability, contamination, and format effects."""
effective_prob = min(model_capability + contamination_bias, 1.0)
# Different prompt formats produce slightly different accuracies
format_effects = {"direct": 0.0, "polite": -0.05, "cot": 0.08}
effective_prob += format_effects.get(prompt_format, 0.0)
effective_prob = np.clip(effective_prob, 0.0, 1.0)
return np.random.random() < effective_prob
# Two models: clean (true capability 0.70) and contaminated (true 0.65, bias +0.18)
models = {
"Model_A_clean": {"capability": 0.70, "contamination": 0.0},
"Model_B_contaminated": {"capability": 0.65, "contamination": 0.18},
}
n_trials = 200 # Repeat each question many times for stable estimates
results = defaultdict(lambda: defaultdict(list))
for model_name, model_params in models.items():
for fmt_name in prompt_formats:
for _ in range(n_trials):
for q in questions:
correct = simulate_model_response(
fmt_name,
model_params["capability"],
model_params["contamination"],
)
results[model_name][fmt_name].append(correct)
# Summarize accuracy and standard error per model per format
accuracy_table = {}
for model_name in models:
accuracy_table[model_name] = {}
for fmt_name in prompt_formats:
scores = results[model_name][fmt_name]
accuracy_table[model_name][fmt_name] = {
"mean": np.mean(scores),
"std": np.std(scores) / np.sqrt(len(scores)),
}Evaluation Results by Model and Prompt Format ============================================================== Format Model A (Clean) Model B (Contam.) -------------------------------------------------------------- direct 0.711 ± 0.014 0.846 ± 0.011 polite 0.632 ± 0.015 0.787 ± 0.013 cot 0.771 ± 0.013 0.897 ± 0.010 Model_A_clean: avg=0.705, prompt sensitivity (range)=0.139 Model_B_contaminated: avg=0.843, prompt sensitivity (range)=0.110
The output shows that Model B's contamination gives it a higher score on the direct prompt, making it look superior. But when you average across prompt formats, Model A's higher true capability gives it a better mean score. Model B also shows greater prompt sensitivity (a larger gap between its best and worst prompt format scores), which is consistent with its performance being partly driven by matching memorized patterns that work better with one format than another.
This simulation compresses into a few lines a dynamic that plays out across the whole field. A researcher who evaluates Model B only with the direct prompt format will conclude it is the better model. A more careful evaluator who tests multiple formats will reach the opposite conclusion. The gap between these two conclusions is not about which evaluator worked harder; it is about whether evaluation was designed as a scientific measurement or as a score retrieval exercise.
Contamination Detection via N-gram Overlap
A common contamination detection strategy is measuring how many n-grams from a test item appear in the training corpus. Items with high overlap are flagged as potentially contaminated. This approach scales to large corpora and can be applied without running the model, making it a useful preprocessing step before any evaluation.
def get_ngrams(text, n):
"""Extract n-grams from a text string."""
words = text.lower().split()
return [tuple(words[i : i + n]) for i in range(len(words) - n + 1)]
def contamination_score(test_item, training_corpus, n=3):
"""
Compute the fraction of n-grams in test_item that appear in training_corpus.
Higher scores indicate potential contamination.
"""
test_ngrams = set(get_ngrams(test_item, n))
if not test_ngrams:
return 0.0
training_ngrams = set()
for doc in training_corpus:
training_ngrams.update(get_ngrams(doc, n))
overlap = test_ngrams & training_ngrams
return len(overlap) / len(test_ngrams)
# Simulated training corpus: documents covering various factual topics
training_docs = [
"The capital of France is Paris a city on the Seine river",
"Paris is the capital and most populous city of France",
"Oxygen has atomic number 8 and is essential for combustion",
"Shakespeare was an English playwright who wrote many famous works",
"The speed of light in vacuum is approximately three times ten to the eighth meters per second",
"World War II ended in nineteen forty five with the surrender of Germany and Japan",
"Some unrelated document about cooking recipes and kitchen utensils",
"Another document about programming languages and software development practices",
]
# Test items formed from our question set
test_items = [
"What is the capital of France Paris is the correct answer",
"What element has atomic number 8 it is oxygen",
"In what year did World War II end 1945 was the final year",
"What programming language was invented in the early 1990s",
"Who wrote the play Hamlet it was William Shakespeare",
]
contam_threshold = 0.30
contam_scores = [
(item[:42] + "...", contamination_score(item, training_docs, n=3))
for item in test_items
]Contamination Detection Results (3-gram overlap with training corpus) ==================================================================== Test Item (truncated) Score Status -------------------------------------------------------------------- What is the capital of France Paris is the... 0.444 FLAGGED What element has atomic number 8 it is oxy... 0.286 clean In what year did World War II end 1945 was... 0.091 clean What programming language was invented in ... 0.000 clean Who wrote the play Hamlet it was William S... 0.000 clean Flagged: 1/5 items (20%) at threshold 30%
Items about well-documented facts (Paris as capital, World War II) are flagged because the training corpus contains text about those topics. The programming language question scores low because nothing similar appears in training. In production contamination detection, this logic is applied at much larger scale, often using suffix lengths of 50 or more tokens and corpora of billions of documents.
The key insight from this detection exercise is that flagging does not tell you whether a model's correct answers on flagged items came from memorization or from learned knowledge. A model that knows the capital of France because it was trained on a document mentioning Paris is not in the same situation as a model that memorized a specific benchmark question and its answer. But from the perspective of evaluation, both situations create the same problem: the model may have an unfair advantage on those items that inflates its measured accuracy relative to its performance on truly novel questions.
Now let's visualize how prompt brittleness affects model rankings when evaluated across multiple prompt variants:
n_models = 5
n_prompt_variants = 10
true_caps = np.array([0.74, 0.70, 0.71, 0.68, 0.66])
# Brittleness: std of performance across prompt variants
brittleness = np.array([0.04, 0.14, 0.08, 0.16, 0.06])
model_names_short = [f"M{i + 1}" for i in range(n_models)]
# Structured prompt effects preserve each model's mean while making brittle models
# more likely to look unusually strong under one favorable formulation.
prompt_effects = np.array(
[
[-1.2, -0.8, -0.5, -0.3, -0.1, 0.1, 0.3, 0.5, 0.8, 1.2],
[-1.6, -1.2, -0.8, -0.5, -0.2, 0.1, 0.3, 0.6, 1.2, 2.1],
[-1.5, -1.0, -0.6, -0.3, -0.1, 0.1, 0.3, 0.5, 0.9, 1.7],
[-1.8, -1.2, -0.8, -0.4, -0.1, 0.1, 0.4, 0.8, 1.2, 1.8],
[-1.3, -0.9, -0.5, -0.2, -0.1, 0.1, 0.2, 0.5, 0.9, 1.3],
]
)
scores_by_prompt = np.clip(
true_caps[:, None] + brittleness[:, None] * prompt_effects, 0, 1
)
mean_scores = scores_by_prompt.mean(axis=1)
# Rankings: by best single-prompt score vs. mean across all prompts
rank_by_best = np.argsort(-scores_by_prompt.max(axis=1))
rank_by_mean = np.argsort(-mean_scores)
The box plots make prompt brittleness tangible. Models M2 and M4 have wide boxes and long whiskers, indicating high variance across prompt variants. Under a single favorable prompt, M2 ranks first. But its mean rank is third. A researcher who evaluated M2 on one lucky prompt would overestimate its capability. A more careful evaluator using 10 prompt variants would correctly identify M1 as the most reliable model.
The annotation showing both best-prompt rank and mean rank captures what multi-prompt evaluation adds beyond single-prompt evaluation. Selecting a model for deployment based on its best single-prompt score would lead you to choose a model that performs inconsistently in the field. Selecting based on mean rank across prompts would lead you to a more reliable choice, even though the peak score is lower.
Computing Confidence Intervals for Benchmark Scores
Let's implement the statistical uncertainty calculation described earlier in the best practices section, making it concrete with both the analytical formula and a bootstrap approach.
from scipy import stats
def analytical_ci(correct, n, confidence=0.95):
"""
Compute a confidence interval for accuracy using the Wilson score method.
Wilson score is more accurate than the normal approximation for extreme probabilities.
"""
p_hat = correct / n
z = stats.norm.ppf((1 + confidence) / 2)
denominator = 1 + z**2 / n
center = (p_hat + z**2 / (2 * n)) / denominator
margin = (
z * np.sqrt(p_hat * (1 - p_hat) / n + z**2 / (4 * n**2))
) / denominator
return center - margin, center + margin
def bootstrap_ci(correct_vector, n_boot=2000, confidence=0.95):
"""
Compute a bootstrap confidence interval for accuracy.
Resamples the binary correct/incorrect vector with replacement.
"""
boot_means = [
np.mean(
np.random.choice(
correct_vector, size=len(correct_vector), replace=True
)
)
for _ in range(n_boot)
]
alpha = (1 - confidence) / 2
return np.percentile(boot_means, [alpha * 100, (1 - alpha) * 100])
# Simulate benchmark results for two models on a 500-item benchmark
n_items = 500
model_x_correct = np.random.binomial(1, 0.72, n_items) # true p=0.72
model_y_correct = np.random.binomial(1, 0.75, n_items) # true p=0.75
model_x_acc = model_x_correct.mean()
model_y_acc = model_y_correct.mean()
# Confidence intervals using both methods
x_analytical = analytical_ci(model_x_correct.sum(), n_items)
y_analytical = analytical_ci(model_y_correct.sum(), n_items)
x_bootstrap = bootstrap_ci(model_x_correct)
y_bootstrap = bootstrap_ci(model_y_correct)Model X: accuracy = 0.730 Analytical 95% CI: (0.689, 0.767) Bootstrap 95% CI: (0.692, 0.766) Model Y: accuracy = 0.732 Analytical 95% CI: (0.692, 0.769) Bootstrap 95% CI: (0.692, 0.772) CI overlap: 0.076 The confidence intervals overlap -- the difference may not be statistically significant.

The confidence interval chart makes explicit what a single reported number hides. Model Y's accuracy appears higher than Model X's, but if the intervals overlap, that difference is consistent with sampling variation alone. Reporting only point estimates without error bars creates an illusion of precision that the data do not support and leads readers to draw conclusions that are not warranted.
Limitations and Impact
The challenges described in this chapter are not isolated problems; they are structural features of how evaluation works when the things being evaluated are large, opaque systems trained on massive and poorly documented data. Understanding this is important for calibrating how much confidence to place in published benchmark results.
Benchmark contamination has become a serious problem in the field. As training data scales increase, the probability that any given public benchmark item appears somewhere in the training corpus approaches certainty. This does not mean evaluation is useless, but it does mean that claims of state-of-the-art performance on standard benchmarks come with a built-in asterisk. The responsible interpretation of benchmark scores requires checking what contamination mitigation the team performed, whether the benchmark was held out from training and fine-tuning data, and whether reformulated variants show consistent performance. Without this information, a benchmark score tells you very little about what the model would do on novel instances of the same task.
Evaluation brittleness connects to a deeper question about what language model capabilities amount to. If a model's performance on a task varies by 20 percentage points depending on how the task is phrased, it is reasonable to ask whether the model "has" the capability in any stable sense. From a practical standpoint, brittleness matters enormously for deployment: production systems encounter prompts that differ from the carefully curated prompts used in evaluation, and high benchmark scores achieved under favorable prompt conditions do not guarantee reliable performance in the field. Users do not submit prompts in the canonical evaluation format; they ask questions in their own words with their own formatting conventions. A model that is brittle to surface form variation may deliver inconsistent experiences to different users asking for the same thing.
Metric gaming creates a trust problem for the field as a whole. When benchmark scores become the currency of competition, the incentive to optimize specifically for those benchmarks overwhelms the incentive to develop broadly capable systems. This has happened repeatedly in NLP. The appropriate response is not cynicism about benchmarks but rather methodological sophistication: using benchmarks as one input among many, understanding their limitations, and maintaining healthy skepticism about results that seem too good. Specifically, when a model achieves a large improvement on a benchmark without a corresponding improvement on related tasks or in human evaluations, the most likely explanation is gaming or contamination rather than a capability breakthrough.
The practical guidance in this chapter amounts to a simple principle: treat evaluation as a scientific practice, not a reporting exercise. This means studying whether your measurements are valid before reporting them, checking whether results replicate under different conditions, and distinguishing between what your evaluation measures and what matters for your application. It also means being honest in reporting: noting limitations, uncertainty, and conditions under which results may not hold, even when this reduces the apparent impressiveness of results. The field's ability to make real progress depends on accurate signals about where models stand, not on optimistically interpreted numbers that obscure the gap between current capability and what we need.
Summary
Evaluation challenges in modern NLP are structural, not incidental. Four challenges stand out:
- Benchmark contamination occurs when test items appear in training data, inflating scores and misrepresenting capability. Detection is possible but imperfect; the most effective defense is using evaluations that were not publicly available when training data was collected, supplemented by behavioral consistency checks and transparent reporting of contamination mitigation.
- Evaluation brittleness means that benchmark scores are sensitive to prompt format, few-shot examples, answer position, and output scoring methodology. A model's apparent performance reflects its capability and the specific evaluation configuration used. Prompt sensitivity is a measurement, not a nuisance, and should be reported alongside point estimates.
- Metric gaming, governed by Goodhart's Law, occurs when optimization pressure targets the metric directly, decoupling scores from the underlying capability they measure. This happens both unintentionally through hyperparameter tuning and intentionally through targeted data selection. The history of NLP is a history of benchmarks becoming targets and then losing validity as a result.
- Evaluation best practices include diversifying your evaluation suite across multiple tasks and formats, treating prompt sensitivity as a measured quantity, maintaining strict separation between development and evaluation data, reporting statistical uncertainty with confidence intervals, assessing evaluation validity rather than assuming it, and calibrating against human performance under comparable conditions.
The underlying theme is that evaluation is a design problem. Good evaluation requires understanding what you want to measure, choosing measurements that are valid for that purpose, and being honest about the gap between your measurements and your actual goals. As model capabilities and training scales continue to grow, maintaining rigorous evaluation practices becomes more important, not less. The models of the next decade will be even harder to evaluate well, and the field's ability to steer development toward useful capabilities will depend on building the right habits and infrastructure for measurement now.
Quiz
Ready to test your understanding? Take this quick quiz to reinforce what you've learned about evaluation challenges in language model assessment.
Evaluation Challenges Quiz
Reference
Citation details
Cite or share this article.
Continue with the full handbook
This chapter is part of Language AI Handbook. Use the handbook page to browse the complete table of contents and continue reading in sequence.
Explore Language AI HandbookStay up to date
Get articles, book updates, and news delivered to your inbox.
No spam, unsubscribe anytime.
Join the community
Sign in to remove popups, track your reading progress, and join the discussion.

Comments
No comments yet. Be the first to share your thoughts!