Chapter 5 · Evaluation¶
5.1 What are the main LLM benchmarks, and what does each measure? ★★¶
One-sentence answer
LLM evaluation usually covers several dimensions: knowledge, reasoning and math, code, agents, long context, instruction following and open-ended conversation. Early benchmarks (MMLU, GSM8K, HumanEval) are saturated, and by 2026 frontier models were compared mainly on harder problems (GPQA Diamond, Humanity's Last Exam, FrontierMath), continuously refreshed problems (each year's AIME, LiveCodeBench) and real-world tasks (the SWE-bench family, Terminal-Bench, OSWorld, BrowseComp). When reading a score, besides what it measures, one should check whether the benchmark is saturated, whether it is contaminated, and whether the evaluation setup is consistent.
I will address three aspects: the representative benchmarks for each dimension, how frontier evaluation is changing, and what to watch for when reading scores.
(1) The representative benchmarks for each dimension measure different abilities.
- Knowledge: MMLU and its harder version MMLU-Pro test broad academic knowledge; GPQA Diamond consists of graduate-level, "Google-proof" multiple-choice science questions; SimpleQA consists of short factual questions designed specifically to measure whether the model makes up facts.
- Reasoning and math: GSM8K and MATH are largely saturated; AIME releases new problems every year and is commonly used as the main indicator of mathematical reasoning; FrontierMath consists of unpublished research-level math problems; Humanity's Last Exam (HLE) collects frontier-level hard questions written by experts across many fields.
- Code: HumanEval and MBPP are function-level programming problems and are saturated; LiveCodeBench continuously adds newly released contest problems; the SWE-bench family requires the model to fix issues in real GitHub repositories.
- Agents: these test a model's ability to use tools over multiple steps to complete tasks in an environment, for example Terminal-Bench (command-line tasks), τ-bench (customer-service tasks that involve talking with a simulated user and calling tools), OSWorld (operating a computer's graphical interface) and BrowseComp (web search that requires extensive browsing to find the answer).
- Long context: needle-in-a-haystack tests retrieval of a single fact and has become too easy for strong models; RULER, MRCR and similar benchmarks use multiple "needles", multi-hop tracing and information aggregation tasks to test whether the model truly uses the long context (for training methods, see Chapter 4 of the "LLM Training Pipeline" direction).
- Instruction following and open-ended conversation: IFEval uses rules to check verifiable constraints such as format, length and keywords; the quality of open-ended conversation relies on human or LLM judges (see 5.3 and 5.4).
(2) Frontier evaluation is moving from "drilling on problem sets" toward harder, fresher and more realistic tasks.
The time from a benchmark's release to its saturation keeps getting shorter (for the reasons, see 5.5), so comparisons between frontier models rely more and more on harder problems, continuously refreshed problems and real-world tasks. On difficulty, frontier models scored below 10% on HLE when it was released, and by 2026 the best scores exceeded 50%, so it still discriminates; on freshness, each year's new AIME and LiveCodeBench, which adds problems by release date, ensure that the problems did not yet exist at training time; on realism, evaluations increasingly require the model to fix code repositories, complete multi-step operations in a terminal or browser, or complete work tasks designed by experts from various occupations (such as GDPval). Real-world task evaluations age too, however: in February 2026, OpenAI announced that it would no longer report SWE-bench Verified scores, because frontier models could reproduce the reference patch on some problems and a substantial fraction of the hard problems it audited had defective tests; its subsequent audit of SWE-bench Pro also estimated that about 30% of the tasks had problems (OpenAI 2026).
(3) When reading scores, make sure the evaluation setup is consistent and account for statistical noise.
For the same model on the same benchmark, the number of few-shot examples, whether CoT is used, the chat template, the answer-extraction rules, and the sampling temperature and number of samples can each shift the score by several points. Multiple-choice questions can also be scored in two ways: base models are often scored by comparing the log-likelihood of each option, while chat models are asked to generate the option letter directly, and the two do not give the same results. For reasoning models one must also state the thinking budget and the number of samples, and for agent evaluation one must state the harness used, that is, which tools are provided, which prompt is used and how many steps are allowed at most. Scores from different technical reports therefore often cannot be compared directly, and it is best to reproduce them within the same evaluation framework. In addition, benchmarks with few problems are very noisy: AIME has only 30 problems a year, so one problem is worth 3.3 points, which is why one should average over multiple samples and report error bars (see 5.2).
In summary: choosing benchmarks means covering the capability dimensions, preferring evaluations that are unsaturated and hard to contaminate, and comparing under a consistent setup.
Overview of the main benchmarks (as of 2026):
| Dimension | Representative benchmarks | What they measure | Status |
|---|---|---|---|
| Knowledge | MMLU, MMLU-Pro, GPQA Diamond, SimpleQA | Academic knowledge, graduate-level science questions, short factual questions | MMLU is saturated; the best GPQA Diamond scores exceed 90%, close to saturation |
| Reasoning and math | AIME, HMMT, FrontierMath, HLE | Competition math, research-level math, frontier questions across fields | Older AIME years are contaminated, so the current year's problems are needed; HLE still discriminates |
| Code | HumanEval, LiveCodeBench, SWE-bench Verified and Pro | Writing functions, competitive programming, fixing real issues | HumanEval is saturated; SWE-bench Verified has been reported as contaminated, with some defective tests |
| Agents | Terminal-Bench, τ-bench, OSWorld, BrowseComp, GDPval | Terminal operations, tool-using dialogue, computer use, deep web search, occupational tasks | Results depend heavily on the harness; numbers from different vendors are often not comparable |
| Long context | Needle-in-a-haystack, RULER, MRCR | Single-point retrieval, multi-needle retrieval and multi-hop tracing | Needle-in-a-haystack is saturated |
| Instruction following | IFEval | Verifiable constraints on format, length and keywords | Scored automatically by rules |
| Open-ended conversation | Chatbot Arena, AlpacaEval 2, Arena-Hard | Preferences of human or LLM judges | See 5.3 and 5.4 |
Going deeper: how several key benchmarks are constructed
| Benchmark | Construction | Details worth remembering |
|---|---|---|
| GPQA (Rein et al. 2023) | Graduate-level multiple-choice questions written by domain experts and validated in several rounds; the Diamond subset is the 198 highest-quality questions | Domain experts reach about 65% accuracy, while non-experts with unrestricted web access reach only 34% |
| HLE (Phan et al. 2025) | About 2,500 questions from experts in many fields, filtered to remove questions that frontier models of the time could answer | Frontier models scored below 10% at release; the paper also reports calibration error, and all models were severely overconfident |
| FrontierMath (Glazer et al. 2024) | New, unpublished research-level problems written by mathematicians, with automatically verifiable answers | At release, the best models solved fewer than 2% |
| SWE-bench (Jimenez et al. 2023) | 2,294 real issues collected from 12 popular Python repositories, scored with the repositories' own tests | Verified is a 500-problem subset filtered by humans at OpenAI (OpenAI 2024) |
| LiveCodeBench (Jain et al. 2024) | Continuously collects new problems from LeetCode, AtCoder and Codeforces, labeled with release dates | One can evaluate only on problems released after the model's cutoff, thereby avoiding contamination |
| τ-bench (Yao et al. 2024) | A simulated user converses with a tool-using agent, and the final database state is checked | Introduces pass^k, measuring the reliability of succeeding in all \(k\) runs (see 5.2) |
OpenAI (2026)'s audit of SWE-bench Verified is worth remembering as a cautionary tale: it selected 138 problems that o3 failed to solve consistently over 64 runs and had each one reviewed by at least six experienced engineers, finding that 59.4% had material issues in test design or problem description, for example tests that enforced implementation details not stated in the problem and therefore rejected functionally correct solutions. This shows that the "last few points" of a benchmark often measure labeling defects rather than ability.
Follow-up questions
Follow-up 1: Which benchmarks would you choose to evaluate a new base model, and which for a chat model?
For a base model, look at knowledge and latent ability; for a chat model, look at instruction following, reasoning and real tasks. A base model does not follow the chat format, so it is usually evaluated with few-shot prompts, comparing option log-likelihoods on multiple-choice benchmarks such as MMLU and ARC, along with few-shot results on GSM8K, MATH and HumanEval and perplexity on held-out data; these metrics change smoothly during training and are well suited to monitoring during pretraining. Chat and reasoning models are evaluated zero-shot in the chat format on IFEval, Arena-Hard, AIME, GPQA, LiveCodeBench, SWE-bench and agent tasks, plus evaluations of safety and refusals.
Follow-up 2: Why are agent benchmark scores especially hard to compare?
Because the score depends on both the model and the harness. For the same model, changing the tools, prompt, maximum number of steps or retry strategy can change the score a great deal; the environment itself may also be unstable, for example web content changes or tests fail intermittently. In addition, test-time compute (the number of parallel attempts, the thinking budget) is often not standardized. When reporting agent scores, one should therefore state both the harness and the compute budget, and comparisons are best made under the same harness.
Follow-up 3: If you were to design a new benchmark, what would you pay attention to?
The difficulty must leave headroom, the answers must be verifiable, the labels must be rigorously reviewed, and the benchmark must resist contamination. The problems should leave even the current best models far from saturation; the answers should ideally be scored automatically and reliably; each problem should be reviewed independently by several experts, to avoid test defects like those in SWE-bench Verified; and a private test set should be kept or the problems refreshed regularly, to prevent contamination. Finally, the statistical error of the evaluation should be reported, so that users know how large a score difference is meaningful.
Common mistakes
- Do not draw conclusions from a single benchmark: Different benchmarks measure different abilities, and a single score cannot represent overall capability.
- Do not compare scores obtained under different setups directly: The prompting method, number of samples, thinking budget and harness all significantly affect scores.
- Do not say that a higher SWE-bench Verified score necessarily means stronger real-world software engineering ability: It has been reported as contaminated, and some of its tests are themselves defective.
- Do not say that passing needle-in-a-haystack shows good long-context ability: Single-point retrieval is too easy; multi-needle, multi-hop and aggregation tasks are needed.
5.2 What is pass@k, and how is it estimated without bias? ★★¶
One-sentence answer
pass@k is the probability that at least one of \(k\) samples for a problem is correct, averaged over all problems; it measures the model's coverage, that is, the ceiling achievable with a perfect verifier. The unbiased estimator samples \(n \ge k\) times per problem, counts the number \(c\) of correct samples, and uses \(1-\binom{n-c}{k}/\binom{n}{k}\); plugging \(c/n\) directly into \(1-(1-c/n)^k\) systematically underestimates it. pass@1 is the expected accuracy of a single sample, and for reasoning models it is usually estimated by averaging over many samples.
I will address three aspects: the definition of pass@k, the unbiased estimator and its derivation, and how pass@k differs from pass@1 and other metrics.
(1) pass@k measures the probability of "at least one correct in \(k\) samples".
The correctness of code is hard to judge by string matching, since the same functionality can be written in countless ways. HumanEval (Chen et al. 2021) therefore judges correctness with unit tests and defines pass@k: sample \(k\) programs for a problem, count the problem as solved if at least one of them passes all the tests, and average over all problems. If the model's probability of answering a problem correctly in a single sample is \(p\), then that problem's pass@k is \(1-(1-p)^k\), the complement of the probability \((1-p)^k\) that all \(k\) samples are wrong. Today, pass@k is also widely used on math and other tasks that can be scored automatically.
(2) The unbiased estimator samples \(n\) times per problem and then computes with binomial coefficients.
The most direct approach is to sample exactly \(k\) times per problem and check whether at least one is correct, but this estimate has high variance. Chen et al. (2021) instead sample \(n \ge k\) programs per problem (for example \(n=200\)), count the number \(c\) that pass the tests, and compute: if \(k\) samples are chosen at random from these \(n\), the probability that none of them passes is \(\binom{n-c}{k}/\binom{n}{k}\), i.e. the number of ways to choose \(k\) from the \(n-c\) incorrect samples divided by the number of ways to choose \(k\) from all \(n\) samples; one minus that is the probability that at least one passes. The estimator is unbiased because \(k\) samples chosen at random from \(n\) independent samples are themselves \(k\) independent samples, so the expectation of this ratio is exactly \((1-p)^k\). For example, with \(n=10\), \(c=2\) and \(k=5\): \(\binom{8}{5}/\binom{10}{5} = 56/252 \approx 0.22\), so pass@5 is about 0.78. Conversely, plugging the estimate \(\hat p = c/n\) directly into \(1-(1-\hat p)^k\) is biased: this function is concave in \(p\), so by Jensen's inequality its expectation is below the true pass@k, which means it systematically underestimates; with the same data it gives only about 0.67.
(3) pass@k, pass@1 and majority-vote accuracy measure different things.
- pass@1: for \(k=1\), the unbiased estimator equals \(c/n\) exactly, i.e. the expected accuracy of a single sample, which is what users actually experience. Reasoning models' outputs are highly random, so one usually samples many times per problem and averages rather than running a single greedy decode; for example, DeepSeek-R1 samples 4 to 64 times per problem at temperature 0.6 to estimate pass@1.
- pass@k with large \(k\): measures coverage, i.e. the ceiling if a perfect verifier picked out the correct answer, which suits settings with exact verifiers such as unit tests, and is also commonly used to analyze the boundary of a model's abilities (for the debate over whether RL extends this boundary, see 8.8 in the "LLM Training Pipeline" direction).
- Majority-vote accuracy (maj@k or cons@k): requires the model's most frequent answer to be correct, measuring the accuracy parallel sampling can reach without relying on a verifier (see 4.2).
- pass^k: the probability that all \(k\) runs succeed, used to measure the reliability of agents (Yao et al. 2024), the exact opposite of pass@k.
In summary: pass@k measures coverage, not accuracy; it should be estimated with the binomial unbiased estimator, and reports should state \(k\), \(n\) and the sampling settings.
Comparing the metrics:
| Metric | Definition | What it measures | Typical use |
|---|---|---|---|
| pass@1 | Expected probability that a single sample is correct | Accuracy in actual use | Main metric for reasoning models, averaged over many samples |
| pass@k | At least one correct in \(k\) | Coverage: the ceiling with a perfect verifier | Code evaluation, analyzing capability boundaries |
| maj@k | The majority-vote answer over \(k\) samples is correct | Accuracy of parallel sampling without a verifier | Reporting on math reasoning, e.g. cons@64 |
| pass^k | All \(k\) correct | Reliability and consistency | Agent evaluation |
Going deeper: numerically stable computation, estimating pass^k, and error bars
(1) A numerically stable way to compute it.
When \(n\) is large, the binomial coefficients become huge, so Chen et al. (2021) gave an equivalent product form:
When \(n-c<k\), any choice of \(k\) samples must include a correct one, so the result is simply 1. The product form follows from \(\binom{n-c}{k}/\binom{n}{k} = \frac{(n-c)!\,(n-k)!}{n!\,(n-c-k)!} = \prod_{i=n-c+1}^{n} \frac{i-k}{i}\).
(2) An unbiased estimator of pass^k.
Analogously to pass@k, pass^k can be estimated without bias by \(\binom{c}{k}/\binom{n}{k}\), the probability that \(k\) randomly chosen samples are all correct (Yao et al. 2024). Reusing the earlier numbers, with \(n=10\), \(c=8\) and \(k=5\), pass^5 is \(\binom{8}{5}/\binom{10}{5} \approx 0.22\): an agent with an 80% single-run success rate succeeds in all 5 runs only about 22% of the time.
(3) Error bars.
The problems in a benchmark can themselves be viewed as a sample drawn from a larger distribution of problems, so the score has sampling error (Miller 2024). For a benchmark with \(m\) problems and accuracy \(p\), the standard error is about \(\sqrt{p(1-p)/m}\). For AIME, with \(m=30\) and \(p=0.5\), the standard error is about 9.1 points. Sampling each problem several more times reduces only the randomness "within a problem" and cannot remove the error from "which problems were drawn"; when comparing two models, computing the error from paired differences on the same problems is more precise than computing each separately and subtracting.
Follow-up questions
Follow-up 1: Why should the number of samples \(n\) be much larger than \(k\)?
To reduce the variance of the estimate. When \(n=k\), the unbiased estimator reduces to "whether at least one of these \(k\) samples is correct", which can only be 0 or 1 and has the highest variance; the larger \(n\) is, the more precisely each problem's pass rate is estimated. When \(n<k\), this formula cannot be used to estimate pass@k at all. The Codex paper used \(n=200\) to estimate pass@k for \(k \le 100\).
Follow-up 2: How does the sampling temperature affect pass@k?
The higher the temperature, the more diverse the samples, so pass@k for large \(k\) goes up, but pass@1 goes down. Chen et al. (2021) found that the best temperature for pass@1 is about 0.2, whereas the best temperature for pass@100 is about 0.8: the larger \(k\) is, the more diversity is needed to cover different solutions. When comparing pass@k, one must therefore state the temperature, and ideally choose the best temperature separately for each \(k\).
Follow-up 3: Why does agent evaluation care more about pass^k?
Because real deployments require success every time, not once out of many tries. Tasks such as customer service or operating a computer cannot ask the user to retry dozens of times and then pick the successful run. τ-bench found that the strongest function-calling agents of the time (such as gpt-4o) succeeded on fewer than 50% of tasks in a single run, and in the retail domain succeeded in all 8 runs less than 25% of the time (Yao et al. 2024), showing that reliability is far worse than single-run accuracy suggests.
Common mistakes
- Do not estimate pass@k with \(1-(1-c/n)^k\): It is biased and systematically underestimates.
- Do not treat pass@k as the model's accuracy in deployment: It assumes a perfect verifier picks the answer; actual accuracy is given by pass@1 or by the selection accuracy with a real verifier.
- Do not use a single greedy decode to represent a reasoning model's pass@1: Reasoning models usually need many samples averaged, and greedy decoding can cause repetition.
- Do not confuse pass@k with pass^k: The former is "at least one success", the latter is "success every time".
5.3 What biases do LLM judges have, and how can they be mitigated? ★★¶
One-sentence answer
LLM judges have three main systematic biases: position bias (preferring the response in a particular position), length bias (preferring longer responses) and self-preference (preferring responses from themselves or their own model family). The corresponding mitigations are judging both orders, controlling for length in the rubric or statistically (as in AlpacaEval 2's length-controlled win rate), and using a judge from a different model family or several judges; in addition, one should provide a clear rubric and reference answers and check the judge against human labels on part of the data.
I will address three aspects: how LLM-as-a-judge is used, the three main biases and their mitigations, and general practices for improvement.
(1) LLM-as-a-judge uses a strong model in place of humans to evaluate open-ended responses.
Open-ended responses (writing, dialogue, explanations) cannot be scored by exact matching or unit tests, and human evaluation is slow and expensive, so strong LLMs came to be used as judges (Zheng et al. 2023). There are three common modes: pointwise scoring, rating a single response from 1 to 10 against a rubric; pairwise comparison, deciding which of two responses is better; and reference-guided judging, providing a reference answer, which suits math, code and other questions with standard answers. Zheng et al. (2023) found that GPT-4 as a judge agreed with human preferences over 80% of the time, on par with the agreement between human judges. This made LLM judges the foundation of evaluations such as MT-Bench, AlpacaEval and Arena-Hard, and they are also widely used as a source of reward in RL.
(2) LLM judges have three main systematic biases, each with a corresponding mitigation.
- Position bias: in pairwise comparison, the judge tends to prefer the response in a particular position, often the one presented first. The mitigation is to judge both orders and count a verdict only if the two agree, recording a tie otherwise; alternatively, average the scores under the two orders (Wang et al. 2023).
- Verbosity (length) bias: the judge prefers longer, more detailed responses even when the content is not better. Mitigations include telling the judge explicitly in the rubric to ignore length, or removing the effect of length statistically: AlpacaEval 2's length-controlled win rate (Dubois et al. 2024) uses a regression model to estimate the win rate "if the two responses had the same length", raising its Spearman correlation with the Chatbot Arena ranking from 0.94 to 0.98.
- Self-preference: the judge gives higher scores to responses from itself or its own model family. Panickssery et al. (2024) found that the better a model recognizes its own generations, the stronger its self-preference, suggesting that this preference may come from familiarity with its own style, i.e. those texts have lower perplexity for it. The mitigation is to use a judge from a different family than the models being evaluated, or a panel of several judges.
(3) Beyond addressing specific biases, a set of general practices is needed.
LLM judges are also swayed by formatting and tone (such as markdown layout or a confident voice), judge math and code beyond their own ability poorly, and can be misled by instructions embedded in the responses, i.e. prompt injection. The general practices are therefore: give a clear, specific rubric; have the judge write its analysis before the verdict; provide reference answers for questions with standard answers; and check the judge against human labels on a small subset, confirming that the agreement rate is high enough before using it at scale. When an LLM judge is used as an RL reward, the policy actively seeks out and exploits these biases, making the problem considerably worse (see 6.7 in the "LLM Training Pipeline" direction).
In summary: LLM judges are cheap and scalable, but their verdicts carry systematic biases; swapping the order, controlling for length, changing the judge and validating against humans are the four most basic safeguards.
Comparing the three biases:
| Bias | Symptom | Likely cause | Mitigation |
|---|---|---|---|
| Position bias | Prefers the response in a fixed position | The model is sensitive to input order | Judge both orders; record a tie or average when they disagree |
| Length bias | Prefers longer, more detailed responses | In training and preference data, "detailed" often correlates with "good" | Rubric says to ignore length; control for length with a regression |
| Self-preference | Prefers responses from itself or its family | Familiarity with its own style, lower perplexity | Use a judge from a different family or a panel |
Going deeper: how the length-controlled win rate works and how to measure a judge's reliability
(1) How the length-controlled win rate works.
AlpacaEval 2's original metric is the win rate of the evaluated model against a baseline model. Dubois et al. (2024) fit a generalized linear model (essentially a logistic regression) that simultaneously captures three factors affecting the outcome: the difference between the two models themselves, the length difference between the two responses, and the difficulty of the instruction. After fitting, they set the length-difference term to 0 and compute the predicted win rate, which gives "how often the evaluated model would win if the two responses were equally long". This is the same idea as Chatbot Arena's style control (see 5.4).
(2) How to measure a judge's reliability.
- Agreement with humans: have humans label part of the data, compute the judge's agreement rate or Cohen's kappa with them, and compare it with the agreement between human judges.
- Stability under perturbations: swap the order of the responses, pad a response with irrelevant filler, or hide or change the model's identity, and see whether the verdict changes; this directly measures the size of each bias.
- Consistency across repeated runs: judge the same pair several times and see whether the verdict is stable.
(3) Purpose-trained judge models.
Besides using a general model directly as the judge, one can train a dedicated judge model; for example, Prometheus (Kim et al. 2023) fine-tunes an open model on data with rubrics and reference answers so that, given a rubric, its scores approach those of strong proprietary models. Such models are cheap and reproducible and are also often used as generative reward models.
Follow-up questions
Follow-up 1: What are the pros and cons of pointwise scoring versus pairwise comparison?
Pairwise discriminates better and is more stable; pointwise is cheap and scalable. Pairwise comparison is closer to how humans judge, since comparing two things is easier than giving one an absolute score, so it discriminates better and gives more stable results; its downsides are position bias and a number of comparisons that grows quadratically with the number of models \(n\). Pointwise scoring is cheap and gives absolute scores, so a new model can be compared with old ones just by scoring it; its downsides are an unstable scale (the judge's sense of "a 7" drifts) and low resolution, with many responses bunched on the same score.
Follow-up 2: What if the model being evaluated is stronger than the judge?
Break the judgment down into subtasks the judge can perform reliably. For example, provide reference answers so that judging becomes comparison; split a long response into individually checkable claims and verify each one; execute tests for code and check final answers by rule for math; and bring in domain experts when necessary. This is essentially the problem of scalable oversight: as models grow stronger, relying on a single judge's direct verdict becomes less and less reliable.
Follow-up 3: How do you verify whether an LLM judge is reliable?
Compare it against human labels and actively test its biases. First have humans label a small subset and confirm that the judge's agreement with humans is close to the agreement between humans; then use perturbations such as swapping the order, adding filler and changing the model's identity to measure the size of each bias; finally check the stability of repeated judgments. Only after all these checks pass is it suitable for large-scale evaluation or as an RL reward.
Common mistakes
- Do not say that LLM judges agree with humans so often that they can fully replace human evaluation: They have systematic biases and are especially unreliable on hard questions and those beyond their own ability, so periodic human validation is needed.
- Do not run pairwise comparison in only one order: Position bias directly affects the verdict; at least judge both orders.
- Do not use the evaluated model itself or a model from the same family as the judge: Self-preference inflates its own scores.
- Do not equate "longer" with "better": Length bias rewards verbose responses and must be controlled in the rubric or statistically.
5.4 How does Chatbot Arena rank models, and what are its problems? ★¶
One-sentence answer
Chatbot Arena (now LMArena) has users ask two anonymous models a question and vote for the better response, then uses the Bradley–Terry model to fit a strength score for each model from all the votes, converts it to the Elo scale and gives confidence intervals; it also uses style control to remove the effect of length and formatting within the regression. The main problems are a question distribution skewed toward everyday conversation, voters who favor style and struggle to judge correctness, score gaps among top models that fall within the confidence intervals, and the ability of some providers to test many variants privately and publish only the best one.
I will address three aspects: how Arena collects data, how it computes rankings, and what problems it has.
(1) Arena collects real users' preferences through anonymous battles.
A user enters any question, two anonymous models each give a response, the user votes for the better one (or a tie), and only after the vote are the models' identities revealed (Chiang et al. 2024). Its strengths are that the questions come from real users and cover a wide range; new questions keep arriving, so it is hard to contaminate; it reflects genuine human preference; and it scales to a large number of models.
(2) Rankings are computed with the Bradley–Terry model, and style control removes the effect of style.
Here \(\beta_A\) and \(\beta_B\) are the strength parameters of models \(A\) and \(B\), and \(P(A \succ B)\) is the probability that \(A\) beats \(B\), which depends only on the difference in their strengths. Early on, Arena used online Elo: after each battle, the two models' scores were updated according to the outcome. However, online Elo results depend on the order of the battles, and for models that have already stabilized, the few most recent battles can cause unnecessary fluctuations. Arena therefore switched to the Bradley–Terry model: it fits all models' \(\beta\) at once by maximum likelihood (equivalent to logistic regression) over all votes, then converts them to scores on the Elo scale and uses the bootstrap to give confidence intervals. To remove the effect of style, Arena added style control in 2024: style features such as response length and the number of markdown headers and list items are added to the regression as additional variables, so that a model's score reflects its win rate "at equal style"; in 2025, style control became the default ranking.
(3) Arena's problems center on the question distribution, the quality of votes and the fairness of the leaderboard.
- Skewed question distribution: user questions lean toward casual chat and short queries, with limited difficulty and expertise, and do not represent math, code or agent abilities.
- Voters favor style and struggle to verify correctness: longer responses, more formatting and a more pleasing tone win more often; ordinary users also cannot judge whether expert answers are right and may vote for whatever "looks right". Style control can remove only style features that can be quantified.
- It can be optimized against: Singh et al. (2025) pointed out that a few providers can privately test many variants before public release and publish only the best-performing one; for example, Meta tested 27 private variants before the release of Llama 4. Statistically, "test many, pick the best" makes the published score systematically too high. In addition, providers differ in how often they are sampled for battles and in their access to battle data.
- Limited resolution at the top: score gaps among the top-ranked models are small and their confidence intervals overlap, so differences in rank often have no statistical significance.
In summary: Arena is a useful signal of real user preference, but it measures "which response users like more", not "which response is more correct", and should be used together with verifiable benchmarks.
Going deeper: fitting Bradley–Terry, the Elo scale, and the style-control formula
(1) Fitting and conversion.
Given all battle records, the Bradley–Terry model obtains each model's \(\beta\) by maximizing the log-likelihood:
Each record \((A,B,y)\) represents a battle between \(A\) and \(B\), with \(y=1\) meaning \(A\) won, and \(\sigma\) is the sigmoid function. On the Elo scale, the win probability is \(1/\left(1+10^{-(R_A-R_B)/400}\right)\), where \(R_A\) and \(R_B\) are the two models' scores: a 400-point gap corresponds to 10-to-1 odds, and a 100-point gap corresponds to a win rate of about 64%.
(2) Style control adds style features to the regression.
Here \(s_A\) and \(s_B\) are the style feature vectors of the two responses (such as normalized length, number of headers and number of list items), and \(\gamma\) holds the effects of these features on the win rate. After fitting, looking only at \(\beta\) gives a ranking with these style factors removed.
(3) Why "test many, pick the best" inflates scores.
Each variant's Arena score is a noisy estimate. Even if several variants have exactly the same true strength, the one with the highest observed score will systematically exceed its true strength; this is the "winner's curse". The more variants are tested and the fewer battles each one gets, the larger this bias. When Llama 4 was released in 2025, the version that ranked highly on Arena was an experimental version optimized for conversational experience and differed from the publicly released model, which sparked discussion about leaderboard transparency.
Follow-up questions
Follow-up 1: How do online Elo and Bradley–Terry differ?
Both are based on the same win-probability model; the difference is online updating versus fitting everything at once. Online Elo updates scores incrementally after each game, which suits human players whose strength changes over time, but the result depends on the order of games; Bradley–Terry assumes fixed strengths and computes the maximum likelihood over all the data at once, so the result does not depend on order, is more stable and makes confidence intervals easier to obtain. LLM versions are fixed, so Bradley–Terry is more appropriate.
Follow-up 2: Why might a model rank highly on Arena yet not be strong on benchmarks?
Because the two measure different things. Arena measures ordinary users' preferences on everyday questions, which are strongly affected by response style, tone and formatting; benchmarks measure whether the model reaches the correct answer on specific hard problems. A model can rank high on Arena because its responses are pleasing while being mediocre at math or code, and vice versa.
Follow-up 3: How could Arena be improved?
Mainly in three respects: the question distribution, style bias and transparency. For example, rank separately by category (hard prompts, coding, math, long queries); remove the effect of style with methods such as style control; limit private testing and make its rules public; and build cheap offline approximations using hard prompts selected from Arena together with an LLM judge, such as Arena-Hard (Li et al. 2024).
Common mistakes
- Do not say that Arena currently uses online Elo: It switched long ago to fitting the Bradley–Terry model all at once, and only converts the scores to the Elo scale.
- Do not say that Arena scores measure the correctness of responses: They measure user preference and are strongly affected by style.
- Do not over-interpret differences between adjacent ranks: The confidence intervals of top models often overlap, and differences in rank may have no statistical significance.
- Do not say that Arena cannot be manipulated: It is hard to contaminate, but it can be optimized against by privately testing many variants and tuning for user preferences.
5.5 How is data contamination detected in evaluation, and why do benchmarks saturate? ★★¶
One-sentence answer
Detecting contamination from the evaluation side relies on three main kinds of methods: detection that looks only at model behavior and needs no training data (such as Min-K% Prob, completion tests and ordering tests), comparing performance on new questions of similar difficulty or rewritten questions (such as GSM1k and GSM-Symbolic), and splitting by time to use only questions released after the model's cutoff (such as LiveCodeBench and MathArena). Benchmarks saturate because of genuine progress in capability, targeted optimization under Goodhart's law, contamination, and the real ceiling set by labeling errors; the responses are harder, dynamically refreshed and private evaluations.
I will address three aspects: how to detect contamination from the evaluation side, how dynamic benchmarks avoid contamination at the root, and why benchmarks saturate.
(1) Contamination can be detected from the evaluation side by looking only at model behavior, without access to the training data.
With access to the training data, one can directly search for n-gram overlap with the test questions and remove them before training (see 1.7 in the "LLM Training Pipeline" direction); but evaluators usually have no access to the training data and can only infer contamination from the model's behavior.
- Probability-based detection: Min-K% Prob (Shi et al. 2023) computes the average log-probability of the \(K\%\) lowest-probability tokens in a text. Unseen text always contains some surprising, very-low-probability tokens, while seen text rarely does, so a high score suggests the model may have seen the text. Oren et al. (2023) instead exploit the exchangeability of a benchmark's question order: without contamination, the original order of the questions and a shuffled order should be equally likely; if the model assigns significantly higher probability to the original order, it has seen the dataset.
- Generation-based detection: give the first half of a question and see whether the model can reproduce the second half or the original options verbatim; or mask one wrong option in a multiple-choice question and see whether the model can guess its original text (Deng et al. 2023). OpenAI (2026) found in its audit of SWE-bench Verified that frontier models could reproduce the reference patch or the original problem details on some problems.
- Comparison on equivalent new questions: construct new questions of similar difficulty, or rewrite the numbers and wording of the original questions; if the model does clearly worse on the new ones, that is a sign of overfitting or contamination. GSM1k (Zhang et al. 2024) wrote new questions in GSM8K's style and found clear accuracy drops for some model families; GSM-Symbolic (Mirzadeh et al. 2024) changed only the numbers and names in the questions and also observed lower accuracy and larger variance.
(2) Dynamic benchmarks ensure that the questions do not yet exist when the model is trained, avoiding contamination at the root.
All of the detection methods above have false positives and false negatives; a more reliable approach is to ensure the questions are not available when the model is trained. LiveCodeBench (Jain et al. 2024) labels each problem with its release date and evaluates only on problems released after the model's knowledge cutoff, and it observed sharp performance drops for some models on problems released after their cutoff; MathArena (Balunović et al. 2025) evaluates right after each math competition ends and found that AIME 2024 had been contaminated for most frontier models; LiveBench (White et al. 2024) refreshes all its questions regularly. Another approach is to keep a private test set that can only be evaluated through a controlled interface. The costs of these approaches are that the questions in a dynamic benchmark change with each release, making scores from different periods hard to compare directly, while private test sets lack transparency and cannot be reproduced by outsiders.
(3) There are four main reasons benchmarks saturate.
- Genuine progress in capability: models have grown larger and reasoning models have appeared, so many problems really are no longer hard.
- Goodhart's law: once a measure becomes a target, it stops being a good measure. Labs optimize for popular benchmarks, for example by training on data of similar style, tuning prompts and selecting checkpoints by benchmark score, so scores rise faster than general ability.
- Contamination: the longer a benchmark has been out and the more widely it has spread online, the more likely it is to enter training data.
- Labeling errors set the real ceiling: Gema et al. (2024) estimated that about 6.5% of MMLU questions contain errors, with more than half of the Virology subset affected; OpenAI (2026) audited problems in SWE-bench Verified that o3 struggled to solve consistently and found that 59.4% had material issues in their tests or problem descriptions. The true ceiling is therefore below 100%, and the last few points mainly measure noise.
Ways to respond to saturation include releasing harder benchmarks (such as HLE and FrontierMath); using dynamically refreshed and private evaluations; shifting to real-world tasks; and investing more expert review when building benchmarks to improve label quality.
In summary: contamination detection can only provide statistical evidence, and the most reliable safeguard is ensuring the questions do not yet exist at training time; saturation is the inevitable fate of any fixed benchmark, so evaluation itself must keep being renewed.
Comparing evaluation-side contamination detection methods:
| Method | What it needs | Principle | Limitation |
|---|---|---|---|
| Min-K% Prob | The model's token probabilities | Seen text rarely contains very-low-probability tokens | Sensitive to text type; common text causes false positives |
| Ordering test | The model's token probabilities | For a seen dataset, the original order has higher probability | Can only detect whether the whole dataset was seen |
| Completion and option-guessing tests | Only a generation interface | Seen questions can be reproduced verbatim | Cannot catch contamination by rewritten versions |
| Comparison on new or rewritten questions | Constructing equivalent new questions | Models that saw the originals drop on the new ones | Hard to guarantee exactly matched difficulty |
| Splitting by time | The questions' release dates | Questions released after the cutoff cannot have been seen | Needs a steady supply of new questions; scores from different periods are hard to compare |
Going deeper: the Min-K% Prob formula and the limits of membership inference
(1) The Min-K% Prob formula.
Here \(x\) is the text being tested, \(x_i\) is its \(i\)-th token, \(p(x_i \mid x_{<i})\) is the probability the model assigns to that token given the preceding text, and \(S_K\) is the set of the \(K\%\) lowest-probability tokens. The higher the score, the better the model predicts even the most "surprising" tokens, and the more likely the text appeared in the training data. In practice, a threshold must be set, or the score compared with similar text known not to have been seen.
(2) The limits of membership inference on LLMs.
Min-K% Prob is essentially a form of membership inference, i.e. deciding whether a piece of text was in the training set. Duan et al. (2024) found that on large-scale pretraining data, such methods often perform close to random guessing: the training data is enormous, each example is usually seen for only one epoch, and the distributions of text "inside" and "outside" the training set overlap heavily. Detection results on individual texts are therefore unreliable and are better aggregated at the level of a whole dataset; Oren et al. (2023)'s ordering test does exactly this, using the whole dataset to provide statistically provable conclusions.
(3) Canary strings.
Benchmarks such as BIG-bench place a special random string (a canary string) in their data files, which makes it easy for trainers to filter them out and also enables detection afterwards: if a model can complete the string, its training data contained the benchmark. However, it relies on trainers filtering proactively, and when the questions are reposted on other web pages, the canary string is often not copied along with them.
Follow-up questions
Follow-up 1: If a model's score drops on new questions, does that necessarily mean contamination?
Not necessarily. It is hard to make new questions exactly as difficult as the originals, and subtle changes in style or distribution also affect scores; moreover, the model may not have memorized the original questions but rather over-adapted to the original benchmark's question style, which is closer to overfitting than to verbatim memorization. A fairly reliable judgment therefore requires combining several kinds of evidence, such as verbatim completion tests and changes in performance when splitting by time.
Follow-up 2: How would you design an evaluation that is hard to contaminate?
The core idea is to ensure the questions are not available when the model is trained. Common practices include keeping a private test set, refreshing questions regularly, using only questions released after the model's knowledge cutoff, generating variable questions procedurally from templates (for example, substituting numbers and names), and placing canary strings in public files. In addition, technical reports should publish contamination analyses and evaluate on perturbed versions of the questions.
Follow-up 3: Are methods like Min-K% Prob reliable?
Not very reliable on individual texts, but more informative when aggregated at the dataset level. They are very sensitive to text type: common, templated text has high probability to begin with and easily causes false positives, while contamination by rewritten or translated versions goes undetected. The results of Duan et al. (2024) also show that on large-scale pretraining data, membership inference often performs close to random. These methods are therefore better used as supporting evidence, combined with methods such as splitting by time and comparison on new questions.
Common mistakes
- Do not say that n-gram deduplication eliminates contamination: Contamination in the form of paraphrases, translations and synthetic data goes undetected.
- Do not treat contamination detection results as definitive proof: These methods provide statistical evidence, and detection on individual texts is especially error-prone.
- Do not say that a saturated benchmark means the model has mastered the ability: Saturation can also come from contamination and targeted optimization, and the last few points may be nothing but label noise.
- Do not compare scores from different periods of a dynamic benchmark directly: The questions change with each release, and their difficulty is not exactly the same.
5.6 How does hallucination arise, and how can it be detected and mitigated? ★★¶
One-sentence answer
Hallucination means the model generates fluent, confident content that is unsupported or wrong. Its roots are that the pretraining objective rewards "plausible" rather than "true" continuations, so on long-tail facts seen only a few times the model is statistically bound to make errors; SFT and RLHF can teach the model to answer confidently even when it does not know; and evaluations that score only right or wrong make "guessing" always better than "I don't know". Detection relies mainly on comparison against reference sources, or on the consistency and semantic entropy of multiple samples; mitigation includes retrieval augmentation, training the model to abstain, changing how evaluations score, and verification at inference time.
I will address four aspects: the types of hallucination, its causes, detection methods, and mitigation methods.
(1) Hallucinations can be classified by "what they violate" into factuality and faithfulness hallucinations.
A common classification distinguishes factuality hallucinations from faithfulness hallucinations (Huang et al. 2023). A factuality hallucination conflicts with real-world facts, for example naming the wrong capital of a country or fabricating a paper that does not exist; a faithfulness hallucination departs from the user's instructions or the provided context, for example a summary giving a different date from the source, ignoring a given document, or reasoning that contradicts its own final conclusion. What makes hallucination dangerous is that wrong content sounds exactly as confident as correct content, so users find it hard to tell them apart.
(2) The roots of hallucination lie in the pretraining objective, post-training and evaluation incentives.
- The pretraining objective: next-token prediction rewards "plausible continuations", not "true continuations", so the model learns to produce text with the "shape" of an answer, such as a well-formatted paper citation, even when it lacks the underlying knowledge. Kalai et al. (2025) further argue that for arbitrary facts with no learnable pattern (such as a person's birthday), even if the training data is entirely correct, the model's hallucination rate is at least roughly the fraction of such facts that appear only once in the training data.
- Post-training: if SFT data contains knowledge the model does not have, it effectively teaches the model to "answer confidently even when you don't know"; Gekhman et al. (2024) found that examples introducing new knowledge are learned slowly, and once learned they make the model more prone to hallucination. RLHF may also favor confident, detailed answers over "I don't know".
- Evaluation incentives: most benchmarks score only right or wrong, so answering "I don't know" scores 0, the same as a wrong answer; guessing is therefore always the optimal strategy, and models get optimized into habitual guessers (Kalai et al. 2025).
In addition, during decoding, once the model has generated wrong content, it keeps writing in the wrong direction to stay consistent with what came before, which is the "snowballing" of hallucination (Zhang et al. 2023).
(3) Detection relies on comparison against reference sources or on the consistency of multiple samples.
With a reference source, the response can be split into atomic facts, each compared against the source or a knowledge base, for example using an NLI model to judge whether each fact is entailed by the source, or, as FActScore (Min et al. 2023) does, computing the fraction of atomic facts supported by the knowledge source. Without a reference source, consistency and uncertainty are commonly used: facts the model really knows come out essentially the same across samples, while fabricated details differ every time. SelfCheckGPT (Manakul et al. 2023) checks whether multiple sampled responses support each other; semantic entropy (Kuhn et al. 2023; Farquhar et al. 2024) first clusters responses with the same meaning into classes and then computes the entropy over these semantic classes:
Here \(x\) is the question, \(c\) is a semantic class (responses with different wording but the same meaning count as one class), and \(p(c \mid x)\) is the probability that a response falls into class \(c\). High entropy means the model is not even sure what to say, so it is likely making things up.
(4) Mitigation must address several stages: retrieval, training, evaluation and inference.
- Retrieval augmentation and tools: have the model answer from retrieved documents and cite them, or call search and code execution to obtain and check facts. This greatly reduces factuality hallucinations but cannot eliminate them, because the model may still ignore or misread what was retrieved.
- Training the model to abstain honestly: build "I don't know" training data from questions the model itself gets wrong (such as R-Tuning, Zhang et al. 2023), or make "confident errors" cost more than "abstentions" in preference optimization and RL.
- Changing how evaluations score: penalize wrong answers more than abstentions, or state an explicit confidence threshold in the instructions, so that guessing no longer pays (Kalai et al. 2025); SimpleQA, for example, reports correct, incorrect and not-attempted answers separately.
- Verification at inference time: Chain-of-Verification (Dhuliawala et al. 2023) first drafts an answer, then lists questions that need checking, answers them independently without seeing the draft, and finally revises the answer based on the results.
In summary: hallucination is not an accidental bug but the result of the training objective and evaluation incentives acting together; therefore, beyond retrieval and verification, both models and evaluations need to reward "knowing what you don't know".
Two ways of classifying hallucinations:
| Classification | Type | Definition | Example |
|---|---|---|---|
| Factuality vs faithfulness (Huang et al. 2023) | Factuality hallucination | Conflicts with real-world facts | Fabricating a paper with plausible authors and title |
| Faithfulness hallucination | Departs from the instructions or the given context | Derives 12 in the reasoning, then states 15 as the final answer | |
| Intrinsic vs extrinsic (Ji et al. 2022) | Intrinsic hallucination | Directly contradicts the given input | A summary gives a different date from the source |
| Extrinsic hallucination | Adds content that is not in the input and cannot be verified from it | A summary adds a quote the source never contained |
Going deeper: a statistical lower bound on hallucination, reasoning models and hallucination, and internal signals
(1) Why hallucinations arise even when the data is entirely correct.
Kalai et al. (2025) reduce the generation problem to a binary classification problem: deciding whether a candidate response is valid (Is-It-Valid). The intuition is that "generating a correct response" is at least as hard as "judging whether a response is correct", so the generation error rate is roughly at least twice the error rate of this classification problem. For arbitrary facts without a pattern, the model can only rely on memory; if 20% of facts of a certain kind appear only once in the training data, the model's hallucination rate on facts of that kind is at least about 20%. This shows that a well-calibrated pretrained model must hallucinate to some degree.
(2) Stronger reasoning does not mean fewer hallucinations.
OpenAI's o3 system card reports that on PersonQA (questions about public figures), o3's hallucination rate is 33% and o4-mini's is 48%, while o1's is only 16% (OpenAI 2025). OpenAI's explanation is that o3 makes more claims overall, so it makes more correct claims and more incorrect ones. This shows that hallucination needs dedicated training objectives and evaluations to constrain it; it does not disappear automatically as reasoning ability grows.
(3) The model may internally "know" that it is wrong.
Azaria & Mitchell (2023) found that a simple classifier trained on the model's hidden states can judge, to some extent, whether the statement the model is generating is true or false. This shows that the model often contains internal signals about "whether it is sure", which are just not reflected in its output; such probes can serve as a hallucination detector that needs no repeated sampling.
Follow-up questions
Follow-up 1: Can RAG eliminate hallucination completely?
No. Retrieval may fail to find relevant documents, or the documents found may themselves be wrong; even when retrieval is correct, the model may ignore or misread the documents, or stubbornly trust its own memory when the documents conflict with its parametric knowledge. Moreover, in long contexts, information placed in the middle is more easily ignored. RAG therefore greatly reduces factuality hallucinations, but citation checking and faithfulness evaluation are still needed.
Follow-up 2: Why can SFT make hallucination worse?
Because SFT on knowledge the model does not have teaches it to "answer confidently even when you don't know". SFT trains the form and style of responses, not the injection of new knowledge; if the answers in the training examples exceed what the model knows, what it learns is not the knowledge itself but "when facing this kind of question, give a specific, confident-looking answer". The experiments of Gekhman et al. (2024) show that such examples are learned slowly, and once learned, the model's overall tendency to hallucinate rises.
Follow-up 3: Why does semantic entropy cluster by meaning before computing entropy?
Because the same meaning can be phrased in many ways, so computing entropy at the token or string level overestimates uncertainty. For example, "Paris", "It's Paris" and "The capital of France is Paris" are worded differently but mean exactly the same thing; treating them as three different answers would give high entropy and make the model look very uncertain when in fact it is very sure. Clustering responses with the same meaning first, for example by checking bidirectional entailment, and then computing entropy over the classes measures "uncertainty about content" rather than "uncertainty about wording".
Common mistakes
- Do not say that hallucination comes only from errors in the training data: Even with entirely correct data, the model is statistically bound to make errors on arbitrary facts seen only a few times.
- Do not say that RAG solves hallucination completely: The model may still ignore or misread what was retrieved.
- Do not say that setting the temperature to 0 eliminates hallucination: If the model's most likely answer is itself wrong, greedy decoding hallucinates just the same.
- Do not say that models with stronger reasoning hallucinate less: o3's hallucination rate on PersonQA is higher than o1's.
5.7 What is calibration, and are LLMs well calibrated? ★¶
One-sentence answer
Calibration means the model's stated confidence matches its actual accuracy: among the answers where it says "80% sure", about 80% are actually correct; it is commonly measured with ECE (expected calibration error). Pretrained models' confidence, expressed as token probabilities on multiple-choice questions, is quite well calibrated, but after post-training such as RLHF, calibration degrades noticeably and the models become overconfident; the confidence models express verbally is also generally too high. Ways to improve it include temperature scaling, confidence based on sampling consistency, and adding calibration-encouraging rewards during training.
I will address three aspects: the definition and measurement of calibration, how well LLMs are calibrated and why, and how to obtain and improve an LLM's confidence.
(1) Calibration measures whether confidence matches accuracy, and is commonly measured with ECE.
Split the \(n\) predictions into \(M\) bins by confidence; \(B_m\) is the set of predictions in bin \(m\), \(|B_m|\) is its size, and \(\mathrm{acc}(B_m)\) and \(\mathrm{conf}(B_m)\) are that bin's actual accuracy and average confidence; ECE is the sample-weighted average of the differences between the two across bins. Calibration matters because many downstream decisions rely on confidence: whether to abstain, when to retrieve or hand off to a human, and whether best-of-N and verifier scores can be trusted. Note that calibration and discrimination are two different things: a model that gives every question a confidence equal to its average accuracy can have an ECE close to 0, yet it cannot tell right answers from wrong ones at all. AUROC (whether confidence separates right from wrong) or the Brier score is therefore usually reported as well.
(2) Pretrained models are well calibrated, and post-training makes models overconfident.
Kadavath et al. (2022) found that on multiple-choice questions, large models' confidence expressed as token probabilities closely tracks their actual accuracy, and that models can judge to some extent whether their own answers are correct (P(True)). However, the GPT-4 technical report showed that post-training significantly hurt calibration (OpenAI 2023). The reason is that the goal of preference optimization and RL is to maximize reward, not to keep probabilities consistent with frequencies: they concentrate probability mass on the preferred responses, the entropy of the output distribution drops, and token probabilities therefore stop representing real frequencies. In addition, reward models themselves favor responses that express high confidence (Leng et al. 2024), and RLVR, which rewards only right or wrong, likewise encourages guessing and discourages expressing uncertainty (Damani et al. 2025).
(3) There are several ways to obtain confidence, and calibration can be improved after the fact or during training.
- Token probability: use the probability of the answer tokens directly. It requires access to logits, suits only short answers, and becomes distorted after post-training.
- Verbalized confidence: have the model say "I'm 70% sure". It is simple and general but generally overconfident, with the stated numbers bunched between 80% and 100% (Xiong et al. 2023); for post-trained models, however, it is sometimes better calibrated than token probabilities (Tian et al. 2023).
- Sampling consistency: use the share of the top answer across multiple samples, or semantic entropy (see 5.6), as the confidence. It needs no access to the model's internals but costs more.
For improving calibration, the classic after-the-fact method is temperature scaling (Guo et al. 2017): fit a single temperature \(T\) on held-out data and divide the logits by \(T\) before the softmax. It changes only the size of the confidence, not which answer has the highest probability, so accuracy is unaffected. Calibration can also be rewarded directly during training: RLCR (Damani et al. 2025) has the model state a confidence in addition to its answer and adds a Brier-score term to the correctness reward, clearly improving calibration without losing accuracy.
In summary: base LLMs are well calibrated, while post-trained models are generally overconfident; before using confidence, one should first check its calibration on held-out data and combine it with methods such as sampling consistency.
Comparing ways to obtain confidence:
| Method | Needs logits? | Applicable to | Main problem |
|---|---|---|---|
| Token probability | Yes | Short answers, multiple choice | Distorted after post-training |
| Verbalized confidence | No | Any task | Generally overconfident, numbers bunched at high values |
| Sampling consistency or semantic entropy | No | Tasks with comparable answers | Needs multiple samples, expensive |
| Hidden-state probes | Needs model internals | Tasks with labeled data | Needs training; limited generalization across tasks |
Going deeper: the limits of ECE, the Brier score, and the formulas for two improvement methods
(1) The limits of ECE.
ECE depends on how the bins are chosen: the number of bins and whether they are equal-width or equal-mass both change its value, and bins with few samples are noisy. And as noted above, ECE measures only calibration, not discrimination. In practice, one therefore also reports a reliability diagram, which plots each bin's average confidence against its actual accuracy, along with the Brier score and AUROC.
(2) The Brier score reflects both calibration and discrimination.
Here \(q_i\) is the confidence the model gives for the \(i\)-th answer, and \(y_i\) is 1 if the answer is correct and 0 otherwise. It is a proper scoring rule: the expected score is optimal only when the model reports its true confidence honestly. Using it as a reward therefore does not induce the model to misreport its confidence.
(3) The formulas for temperature scaling and RLCR.
Temperature scaling changes the output probabilities to \(\mathrm{softmax}(z/T)\), where \(z\) is the logits and \(T\) is fit on held-out data by minimizing the negative log-likelihood; when \(T>1\) the distribution flattens and confidence drops, which suits correcting overconfidence. RLCR's reward is
where \(q\) is the confidence the model states verbally. The first term encourages correct answers, and the second is the Brier score, penalizing the gap between confidence and the actual outcome: giving high confidence to a wrong answer is penalized heavily, so the model learns to express uncertainty honestly when it is not sure.
Follow-up questions
Follow-up 1: Why does calibration get worse after RLHF?
Because the optimization goal changes from "fitting the data distribution" to "maximizing reward". The cross-entropy loss of pretraining is a proper scoring rule, which pushes the model's output probabilities toward the true frequencies; RLHF and preference optimization care only about how likely the preferred responses are to be generated, concentrating probability mass on a few responses, and the KL-regularized RL objective tends to be "mode-seeking", making the distribution sharper and lowering its entropy. Add the reward model's own preference for confident expressions, and both the model's output probabilities and its verbalized confidence end up too high.
Follow-up 2: Does a well-calibrated model never hallucinate?
No. Calibration only means the model's confidence is honest, not that it is always right. The analysis of Kalai et al. (2025) even shows that a well-calibrated pretrained model must make errors on arbitrary facts seen only once. The value of calibration is that with trustworthy confidence, the system can choose to abstain, retrieve or hand off to a human when confidence is low, thereby reducing the harm caused by hallucination.
Follow-up 3: How is calibration measured for long-form answers?
Split the long answer into individual claims and measure calibration at the claim level. A long answer contains both correct and incorrect parts, so a single overall confidence means little. The common approach is to split the answer into atomic facts, estimate a confidence for each (for example, by how often that fact appears across multiple samples), and then compute calibration from whether each fact is true. This is consistent with the approach of long-form factuality evaluations such as FActScore (see 5.6).
Common mistakes
- Do not say that a low ECE means the confidence is useful: A model that always outputs its average accuracy can have an ECE close to 0 yet cannot tell right from wrong at all; AUROC or the Brier score is also needed.
- Do not say that temperature scaling changes accuracy: It only rescales the confidence and does not change which answer has the highest probability.
- Do not trust the confidence a model states verbally at face value: Verbalized confidence is generally too high and should be checked on held-out data before use.
- Do not say that post-trained models are as well calibrated as base models: Post-training usually makes models noticeably overconfident.