Abstract

Why do language models state false things fluently, and can their confidence warn us? Two questions sit underneath: why training and grading push a model to answer when it is unsure, and how reliable any measured confidence signal is. A hallucination is output that is false or unsupported by the input or the world; calibration is whether a model’s confidence matches how often it is right. On a subset of the MMLU multiple-choice test, GPT-4’s expected calibration error was 0.007 before post-training and 0.074 after.1 Theory gives lower bounds under stated assumptions: a model calibrated in a defined sense must hallucinate on arbitrary facts at a rate tied to how many such facts appear only once in its training data,2 and benchmarks that give no credit for “I don’t know” make guessing pay whenever a guess can be right.3 Semantic entropy predicted answer correctness with an average AUROC of 0.790 across 30 task and model combinations, but it misses errors a model repeats consistently.4 In 576,000 generated code samples, 19.7% of package references were classified as hallucinated.5 The practical answer is to test confidence before trusting it, score abstention, and verify what the model names.

What the word covers

A working definition

In this literature a hallucination is generated text that reads as fluent and plausible but is false, or is not supported by the material the model was given. The 2022 survey by Ziwei Ji and colleagues gives the most inclusive definition as “generated content that is nonsensical or unfaithful to the provided source content”, and notes that hallucinated text “gives the impression of being fluent and natural despite being unfaithful and nonsensical”.6 The second clause is the operational problem: wrong text that looks wrong is easy to discard, and wrong text that looks right is caught only if someone checks.

The word is borrowed from psychology, where Ji et al. gloss it as “an unreal perception that feels real”.6 The analogy is loose: a model has no perception to go wrong, and the word can suggest a malfunction where the model is doing what it was trained to do.

Intrinsic and extrinsic, faithful and factual

Ji et al. sort hallucinations by their relation to a source, following earlier work on summarisation.6

  • An intrinsic hallucination contradicts the source. In their Table 1, for a source that begins “The first vaccine for Ebola was approved by the FDA in 2019 in the US, …”, one sample summary says “The first Ebola vaccine was approved in 2021.”
  • An extrinsic hallucination cannot be verified from the source: it is neither supported nor contradicted. A separate sample output for the same source says “China has already started clinical trials of the COVID-19 vaccine”, which the source does not mention.6

The survey notes that an extrinsic addition may be true background knowledge, and is still treated with caution because nothing in the source vouches for it.

A second distinction concerns what counts as the truth. Faithfulness means consistency with the provided source. Factuality means consistency with world knowledge. The survey observes that papers use the terms differently: some define “fact” as the source input, which makes the two the same, while others define it as world knowledge. Ji et al. adopt the second usage, so a summary can be faithful to a source that is itself wrong, and a model answering from memory can be factual without any source at all.6

These distinctions decide which tool applies. Where there is a source, faithfulness can in principle be checked by comparing output to input, the problem of citation faithfulness that the reader on retrieval-augmented generation covers. A chat model answering a question from its weights has no source to compare against, and its errors are failures of factuality that need an outside reference or some internal signal of doubt.

Confabulation as a narrower target

Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn and Yarin Gal at Oxford argue that the umbrella is too wide to be useful. In their 2024 Nature paper they single out confabulations, claims that are “both wrong and arbitrary”, meaning the answer changes with irrelevant details such as the random seed. Asked “What is the target of Sotorasib?”, a model sometimes answered KRAS G12C, which is correct, and sometimes G12D, which is not, under identical instructions. They separate this from a model that is consistently wrong because its training data contained a common misconception, from a model that “lies” in pursuit of a reward, and from systematic failures of reasoning, and write that “combining these distinct mechanisms in the broad category hallucination is unhelpful”.4

Calibration from first principles

Confidence as a frequency claim

A forecaster who says “30% chance of rain” is calibrated if it rains on about 30% of the days she says so. Kalai and Vempala use this weather example, which goes back to A. P. Dawid in 1982, to introduce the idea for language models.2 Calibration is a property of a track record; a single forecast cannot be checked for it.

For a classifier the confidence is usually the probability it assigns to its chosen answer. For a language model there are several candidates: the probability of the answer tokens, the probability the model assigns to the word “True” when asked whether its answer is correct, a number it writes in words (“I am 90% sure”), or the fraction of repeated samples that agree. These need not agree, and much of the research below asks which of them carries information.

Calibration is also distinct from accuracy. A model that is right 60% of the time and always reports 60% is perfectly calibrated, yet its confidence says nothing about which answers are the right ones: it has no discrimination, or in forecasting language no resolution. Such a forecast can serve as a base rate; it cannot flag an individual error. Tilmann Gneiting and Adrian Raftery state the goal of probabilistic forecasting as maximising “the sharpness of the predictive distributions subject to calibration”, sharpness being how concentrated the forecasts are.7 For flagging errors, what is wanted is confidence that varies across questions and is calibrated where it varies.

Reliability diagrams and expected calibration error

The standard picture is the reliability diagram. Sort predictions into bins by confidence, say 0 to 0.1, 0.1 to 0.2 and so on, and plot each bin’s accuracy against its average confidence. For a perfectly calibrated model the expected accuracy in each bin equals its confidence, so in the population the points lie on the diagonal. With a finite sample the estimated points scatter around it, and a near-diagonal plot can still hide errors that cancel within a bin.8 Points below the diagonal mean the model is more confident than it is accurate: overconfidence.

Expected calibration error (ECE) compresses the diagram into one number. Chuan Guo, Geoff Pleiss, Yu Sun and Kilian Weinberger, following Naeini and colleagues, define it as a weighted average of the gap between accuracy and confidence across equally spaced bins, with each bin weighted by its share of the predictions.8 In symbols, with N predictions split into bins b:

ECE = sum over bins of (n_b / N) × |accuracy(b) − confidence(b)|

Guo et al. also define maximum calibration error (MCE), the largest gap in any bin, for settings where the worst case matters more than the average.8

A worked example

The numbers in this example are made up for illustration and the arithmetic is the author’s own. A model answers ten questions and reports a confidence for each. Use five bins of width 0.2; only three are occupied.

BinAnswersConfidencesMean confidenceCorrectAccuracyGap
0.4 to 0.620.50, 0.500.50010.5000.000
0.6 to 0.830.70, 0.70, 0.700.70020.6670.033
0.8 to 1.050.90, 0.90, 0.95, 0.95, 0.950.93030.6000.330

The weights are 2/10, 3/10 and 5/10. So ECE = 0.2 × 0.000 + 0.3 × 0.033 + 0.5 × 0.330 = 0 + 0.010 + 0.165 = 0.175. The MCE is 0.330, from the top bin. Overall accuracy is 6 out of 10, or 0.60, and the average confidence is 7.75 / 10 = 0.775. Here ECE equals average confidence minus accuracy because every bin errs in the same direction. If one bin were underconfident, its gap would still add to ECE, while the simple difference would partly cancel.

Three lessons follow. First, the damage is concentrated where the model is surest: a user who trusts anything stated at 90% or more is wrong on two of five such answers. Second, a constant forecaster that reported 0.60 for every question would score an ECE of zero on these data while telling good answers from bad not at all, so ECE has to be read beside accuracy and a measure of discrimination such as AUROC. Third, with ten points the estimate is noise; bin count and sample size both move ECE, which is why papers state their bins (Guo et al. used 15).8

A scoring rule that rewards both calibration and sharpness avoids the constant-forecaster loophole. The Brier score (squared error between confidence and the 0 or 1 outcome, a loss to minimise) and the logarithmic score are strictly proper: in Gneiting and Raftery’s definition, a forecaster gets the best expected score, here the lowest expected Brier loss or highest expected log score, only by reporting the probability it actually believes, so “proper scoring rules encourage the forecaster to make careful assessments and to be honest”.7 That property returns in the discussion of abstention.

Modern networks became overconfident

Guo et al.’s “On Calibration of Modern Neural Networks”, presented at ICML 2017, documented the problem for deep networks. Its abstract states the finding directly: “modern neural networks, unlike those from a decade ago, are poorly calibrated.”8 The opening figure compares a 5-layer LeNet with a 110-layer ResNet on the CIFAR-100 image dataset. The LeNet’s average confidence closely matched its accuracy. The ResNet was more accurate, and its confidence was substantially higher still.

Varying one factor at a time, the authors found that greater depth and width reduced error and worsened calibration, as did batch normalisation and less weight decay. They traced the mechanism to a disconnect between the two quantities training tracks: late in training, the network kept improving its classification error (test error on CIFAR-100 fell from 29% to 27%) while its negative log-likelihood, the measure that penalises misplaced confidence, got worse. In their words, “the network learns better classification accuracy at the expense of well-modeled probabilities.”8

The fix they recommended is tiny. Temperature scaling divides the network’s output scores (logits) by a single number T before the softmax. With T greater than 1 the distribution flattens and confidence falls. T is fitted on a held-out validation set by minimising negative log-likelihood. Because dividing every logit by the same positive number does not change which is largest, the predicted class and therefore the accuracy are unchanged. In their Table 1, the 110-layer ResNet on CIFAR-100 had an ECE of 16.53% uncalibrated and 1.26% after temperature scaling, with 15 bins. Across vision and text datasets the single parameter often matched or beat methods with many more parameters.8

Two cautions carry over to language models. Temperature scaling is an empirical adjustment: in Guo et al.’s experiments a temperature fitted on a validation set reduced overconfidence on comparable held-out data, and nothing guarantees that the same temperature suits data from a different distribution.8 And it needs access to logits, which not every hosted model returns.

Why a next-token model guesses

What pretraining optimises

A language model is pretrained to predict the next token of text, scored by cross-entropy, the log-likelihood penalty that Guo et al. found modern classifiers could overfit; the mechanics are in the reader on large language models and the transformer. Cross-entropy is the logarithmic score, a strictly proper scoring rule,7 so its ideal minimiser reproduces the next-token probabilities of the training distribution. That is a statement about token probabilities at the optimum. Real training has finite data, limited capacity and imperfect optimisation, and three things need to be kept apart: calibration of next-token probabilities, calibration of whether an answer is correct, and calibration of free-form generations. None implies the others without further assumptions. Two papers by Kalai and colleagues state such assumptions and derive consequences, and they make different arguments.

Kalai and Vempala, 2023: calibrated models must hallucinate

“Calibrated Language Models Must Hallucinate”, by Adam Tauman Kalai and Santosh Vempala, was posted on 24 November 2023 and appeared at the ACM Symposium on Theory of Computing (STOC) in 2024.2 It proves a statistical lower bound on how often a calibrated generative model hallucinates a certain kind of fact.

The argument rests on two ideas. The first is the arbitrary fact: a piece of information whose truth cannot be inferred from patterns in other data. The paper’s running example is the “5W” factoid, who ate what, when, where and why, as in a post saying someone had a tuna sandwich at a particular café on a particular day. There are vastly more plausible false versions of such a sentence than true ones, and nothing in the training data tells the model which unobserved ones are true.2

The second is the Good-Turing estimate of missing mass. The missing mass is the share of the true fact distribution made up of facts absent from the training data. The Good-Turing estimate of it is the number of facts observed exactly once divided by the total number of observations; Kalai and Vempala call this the monofact estimate.2 As an illustration of the estimator (not from the paper): if 30% of the birds recorded in a survey belonged to species seen only once, roughly 30% of the next birds are likely to belong to species not yet seen.

The theorem rests on explicit assumptions (Sections 4 and 5, Corollary 1): a source distribution that is itself drawn from a distribution over possible worlds, training documents drawn independently from that source, two “regularity” conditions on unseen candidate factoids (one on the posterior chance that such a candidate is true, one on its posterior expected probability mass), and far more plausible falsehoods than true facts. Under those conditions, for a model calibrated in a sense the paper defines for generative models, the hallucination rate on such factoids is, with high probability, at least the monofact estimate minus the model’s miscalibration, minus terms that are small when the training set is large and true facts are sparse among plausible candidates. The abstract’s summary: “the probability of generating a hallucination is close to the fraction of facts that occur exactly once in the training data (a ‘Good-Turing’ estimate), even assuming ideal training data without errors.”2 Under these assumptions and the paper’s calibration condition, a calibrated model must place generated probability on unseen candidates, most of which are false. The paper’s 5W illustration is hypothetical: if one imagines that half of all 5W posts occur exactly once, a calibrated model would hallucinate on about half of its 5W generations. That is a scenario, not a measured rate or a prediction for any real model.2

The paper is careful about scope. It says its result “should not be taken to mean that hallucination is inevitable”. It finds “no statistical reason” for pretraining to cause hallucination on facts that tend to appear many times, which it argues includes references to published articles and books, since papers get cross-posted and indexed repeatedly, or on systematic facts such as arithmetic. Those need other explanations, such as limited model capacity. The bound applies to the pretrained, calibrated model. Post-training can lower hallucination rates at the cost of calibration, and the authors present the GPT-4 calibration plots as consistent with that trade.2

Kalai, Nachum, Vempala and Zhang, 2025: errors as misclassification, and exams that reward bluffing

“Why Language Models Hallucinate”, posted on 4 September 2025 by Adam Tauman Kalai, Ofir Nachum and Edwin Zhang of OpenAI with Santosh Vempala, makes two separate arguments: one about pretraining, one about why post-training does not remove the problem.3

The pretraining argument is a reduction to binary classification. Define the “Is-It-Valid” (IIV) problem: label a candidate output valid or erroneous, where the examples are an even mix of valid responses drawn from the training distribution and errors whose prompts follow the same distribution and which are drawn uniformly from the errors for each prompt. Theorem 1 assumes the training distribution itself contains no errors. Under that setup the paper proves that for any base model the generative error rate is at least twice the IIV misclassification rate of the classifier obtained by thresholding the model’s own probabilities at one over the smallest error-set size, minus a worst-case ratio across prompts (the largest number of valid responses to any prompt divided by the smallest number of errors) and a miscalibration term measured at that single threshold. Hallucinations, they argue, “need not be mysterious—they originate simply as errors in binary classification.”3 The reduction imports known causes of misclassification. Some facts have no learnable pattern (birthdays absent from the data); some models are poor at a task (their example is counting letters, where DeepSeek-V3 answered “2” or “3” to “How many Ds are in DEEPSEEK?” across ten trials, and Meta AI and Claude 3.7 Sonnet gave answers as large as 6 and 7); some training data are wrong. The paper recovers the 2023 bound as a special case, phrased as a singleton rate: the number of prompts that appear exactly once among the N training examples without an abstention, divided by N. Within its “arbitrary facts” model it also proves an upper bound: an efficient algorithm that is calibrated in this sense errs at close to the singleton rate, so in that model the bound is roughly tight.3

A side result answers an obvious objection. A system that never errs on a fixed set of questions is easy to build, from a question-and-answer database and a calculator that say “I don’t know” to everything else. The paper notes that, by its lower bound, a language model that does not err must have a large miscalibration term where the other terms leave a large positive lower bound, as for unlearnable facts.3 The result concerns models judged against the training distribution under the theorem’s conditions; it is no argument against building such a system.

The post-training argument drew wider attention. Language models, the authors write, “are optimized to be good test-takers, and guessing when uncertain improves test performance.” Suppose Model A signals uncertainty correctly and never hallucinates, and Model B is identical except that it always guesses when unsure. Under 0-1 scoring, B scores at least as well as A, and strictly better whenever its guesses have some chance of being right. The paper surveys ten influential benchmarks, including GPQA, MMLU-Pro, SWE-bench and Humanity’s Last Exam (HLE), and finds that nine use binary grading with no credit for “I don’t know”; the exception, WildBench, gives partial credit through a language-model-graded rubric. HLE also reports a calibration error; the paper notes that, at the time of writing, all reported HLE accuracies were below 30% and most models’ HLE calibration error was above 70%, and that a model could hallucinate on every question with zero calibration error if it gave each wrong answer 0% confidence.3 The reader on evaluating AI systems covers accuracy-only grading, HLE’s calibration figures and how benchmarks fail.

A numerical illustration, with the author’s own arithmetic: take 100 questions. Both models know 60 answers for certain. On the other 40, a guess is right a quarter of the time. Model B guesses and scores 60 + 10 = 70 correct and 30 wrong. Model A answers the 60 and abstains on 40. Under accuracy grading, B scores 70% and A 60%, so the leaderboard ranks the bluffer higher. With one point deducted per wrong answer, B scores 70 − 30 = 40 and A scores 60.

The proposed remedy is explicit confidence targets in mainstream benchmarks rather than more specialist hallucination tests. Each question would carry an instruction such as: “Answer only if you are > t confident, since mistakes are penalized t/(1−t) points, while correct answers receive 1 point, and an answer of ‘I don’t know’ receives 0 points.”3 The penalty makes answering score better than abstaining in expectation when the probability of being right exceeds t; at exactly t the two tie. At t = 0.5 the penalty is 1 point; at t = 0.9 it is 9. The printed text has two slips: it lists a penalty of 2 for t = 0.75, where the formula gives 0.75 / 0.25 = 3, and a later sentence describes the optimal behaviour as outputting “I don’t know” where the probability of being right is greater than the target, which reverses the inequality. The correct rule is to answer above t and abstain below it. Stating the threshold in the prompt matters, the authors argue, because then a single threshold policy, answering above the stated target and abstaining below it, is optimal for every target, with either action optimal at equality. They call this behavioural calibration and note it can be audited by comparing accuracy and error rates across thresholds.3 A fixed-threshold payoff of this kind elicits a decision, not a numerical probability.

The two Kalai papers should be kept apart. The 2023 paper is a missing-mass lower bound for calibrated pretrained models on arbitrary facts. The 2025 paper recasts it, within its formal setting, as a reduction from generation errors to classification errors, and adds a separate, non-mathematical claim about evaluation incentives; one can accept the theorems and doubt the incentive story.

“Hallucination is inevitable”: what a diagonal argument proves

A third paper, by Ziwei Xu, Sanjay Jain and Mohan Kankanhalli of the National University of Singapore, first posted on 22 January 2024 and revised on 13 February 2025, argues from computability theory that “it is impossible to eliminate hallucination in LLMs”.9 It defines a formal world in which a ground truth is a computable function from strings to strings, an LLM is a total computable function on strings, and a hallucination is any input on which the two disagree. Using a diagonalisation argument, it proves that for any computably enumerable family of LLMs there is a computable ground truth on which every state of every model in the family, at every stage of training, hallucinates, and does so on infinitely many inputs. Since the formal world is “a part of the real world”, the authors conclude that hallucination is inevitable for real LLMs too.

The result is correct and narrow: no single computable system is right about every computable function. It does not say how often a model must be wrong on the questions people ask, nor that any particular error is unavoidable. Its own limitations section says it “does not account for hallucinations on problems within LLMs’ computational capabilities” and assumes a deterministic ground truth, so it “provides little insights from the probabilistic perspectives”.9 Neither this paper nor the Kalai bounds show that a deployed system cannot reduce its error rate to near zero on a given task by abstaining.

What models know about their own knowledge

P(True) and P(IK)

If a model’s confidence carries information about its correctness, errors could be flagged. “Language Models (Mostly) Know What They Know”, by Saurav Kadavath and 35 co-authors at Anthropic, posted on 11 July 2022, is the main early study.10 It used models of 800 million, 3 billion, 12 billion and 52 billion parameters, pretrained on 850 billion tokens.

The first finding is that larger models are well calibrated on multiple-choice and true/false questions “when they are provided in the right format”. Format matters a great deal: replacing one answer option with “none of the above” significantly reduced both accuracy and calibration, and even the 52B model seemed biased against choosing that option.10

The paper then tested two forms of self-assessment. P(True): the model proposes an answer and is asked whether it is true, and the probability it assigns to “True” is read off. For the 52B model, answers with P(True) above 50% were far more likely to be correct than answers in general, and showing the model several of its own samples before asking improved its judgement. P(IK), “I know”: a model with an added output head is trained to predict, from the question alone, whether it will answer correctly. Models learned this well within a task and partly generalised across tasks, for example from trivia to arithmetic and code, but “struggle with calibration of P(IK) on new tasks”.10

What post-training does to calibration

Kadavath et al. also ran what they call “a quick experiment” on a helpful-and-harmless policy trained with reinforcement learning from human feedback (RLHF). The policies “naively appear very miscalibrated, which is not surprising, since RL finetuning tends to collapse language model predictions towards behaviors that receive the most reward.” A single temperature of T = 2.5 applied to all evaluations “largely fixes” calibration on several tasks, with the caveat that “more intensive RL training might distort calibration in ways that cannot be remedied in this way”.10

OpenAI’s GPT-4 technical report, first posted on 15 March 2023, gives a public figure. On a subset of MMLU, using the probability the model assigned to each of the A to D options, the pre-trained model was “highly calibrated”, with an ECE of 0.007; the post-trained model, labelled “ppo” in the plot, had an ECE of 0.074, and the caption says “post-training hurts calibration significantly”.1 Kalai et al. use the same figure to argue that base models trained on cross-entropy tend to be calibrated and that reinforcement learning moves models away from it.3 Kadavath et al.’s explanation, quoted above, is that RL fine-tuning collapses predictions towards the most rewarded behaviours; a reward for preferred answers does not ask for the right probability.10 The same report says GPT-4 scored 19 percentage points higher than GPT-3.5 on OpenAI’s internal adversarial factuality evaluations; that is a different measurement on different tasks, and the two results together do not establish a general trade-off between factuality and calibration.1 The reader on reinforcement learning from human feedback covers what that objective rewards, including sycophancy.

Both measurements are on multiple-choice questions and say little directly about free-form generation, where there is no fixed list of options.

Verbalised confidence

Some hosted models do not return token probabilities (GPT-4 did not in the configuration Farquhar et al. used for their biography test, described below), so the alternative is to ask for a confidence in words. Stephanie Lin, Jacob Hilton and Owain Evans showed in 2022 that a GPT-3 model fine-tuned for the task could express calibrated uncertainty in words, such as “90% confidence”, on their CalibratedMath suite, and remained moderately calibrated under distribution shift.11

Without such training, verbalised confidence tends to be inflated. Miao Xiong and colleagues benchmarked prompting, sampling and aggregation strategies on five models including GPT-4 and LLaMA 2 Chat, and found that models “tend to be highly overconfident when verbalizing their confidence”, with stated values mostly between 80% and 100% and typically in multiples of 5, “similar to how humans talk”.12 OpenAI’s SimpleQA benchmark, announced on 30 October 2024 with 4,326 short fact-seeking questions,13 asked models for a confidence percentage alongside each answer. Stated confidence correlated positively with accuracy; in the paper’s Figure 2, o1-preview was better calibrated than o1-mini and GPT-4o better than GPT-4o-mini, though the study did not isolate model size; and accuracy sat well below the diagonal, meaning “models consistently overstate their confidence”. The same paper measured calibration a second way, by asking each question 100 times at temperature 1, grouping answers by exact string match, and comparing the frequency of the most common answer with its accuracy; on that measure o1-preview’s answer frequency roughly matched its accuracy.14

The court record in Mata v. Avianca shows the failure in practice. When the lawyer asked ChatGPT “Is Varghese a real case” and “Are the other cases you provided fake”, it replied that it had supplied “real” authorities that could be found through Westlaw, LexisNexis and the Federal Reporter.15 Asking a model whether it is sure produces more text from the same process that produced the error.

Detecting hallucinations

SelfCheckGPT: sampling consistency

Potsawee Manakul, Adian Liusie and Mark Gales proposed SelfCheckGPT in March 2023 (EMNLP 2023). The idea: when a model knows a fact, repeated samples tend to repeat it; when it is making a fact up, samples “are likely to diverge and may contradict one another” (Section 1). The method needs only text outputs, so it works on black-box systems, and needs no external database.16

The test set was 238 Wikipedia-style articles about people from the WikiBio dataset, generated by GPT-3 (text-davinci-003) and annotated sentence by sentence: of 1,908 sentences, 39.9% were labelled major-inaccurate, 33.1% minor-inaccurate and 27.0% accurate. For each passage the authors drew N = 20 extra samples at temperature 1.0 and scored each original sentence by how well the samples supported it, in five variants of SelfCheckGPT that differ in the comparison used, including a natural language inference (NLI) classifier and prompting an LLM with “Is the sentence supported by the context above?”. For detecting non-factual sentences, measured by area under the precision-recall curve (AUC-PR, on a 0 to 100 scale), a random baseline scored 72.96; the average negative log probability of GPT-3’s own tokens scored 83.21; the NLI variant scored 92.50 and the prompting variant 93.42.16 A cheap unigram variant, which scores a sentence by its least likely token under a unigram model fitted to the samples, reached 85.63; in this study, tokens that rarely recurred across samples were a useful sentence-level signal of non-factual content.16

The paper lists its limits: mostly biographical data, sentence-level judgements although a sentence can mix true and false claims, and cost that grows with the number of samples.16

Semantic entropy

The obvious measure of a model’s uncertainty is the entropy of its outputs: low if samples agree, high if they vary. For free text this fails because one meaning has many phrasings. Lorenz Kuhn, Yarin Gal and Sebastian Farquhar made the point in a paper at ICLR 2023: a model unsure whether to write “France’s capital is Paris” or “Paris is France’s capital” “is not uncertain in any important sense”.17

Their method, semantic entropy, clusters sampled answers by meaning before computing entropy. Two answers go in the same cluster if each entails the other, judged by an NLI model (DeBERTa-large in the 2023 paper). The probabilities of the answers in each cluster are summed, and entropy is computed over clusters.17 An illustration with made-up numbers and the author’s arithmetic, using sample counts in place of the model’s sequence probabilities (closer to the later “discrete” variant than to the 2023 estimator): ten samples to “What is the capital of France?” give “Paris” six times, “It’s Paris” three times and “Lyon” once. Over the three distinct strings, entropy is −(0.6 ln 0.6 + 0.3 ln 0.3 + 0.1 ln 0.1) ≈ 0.90 nats. Over the two meanings, Paris (0.9) and Lyon (0.1), it is −(0.9 ln 0.9 + 0.1 ln 0.1) ≈ 0.33 nats. The semantic measure correctly reports that the model is fairly sure.

In the 2023 paper, using OPT models up to 30 billion parameters without fine-tuning, semantic entropy predicted whether an answer was correct with an AUROC of 0.83 on closed-book TriviaQA and 0.77 on open-book CoQA, beating plain and length-normalised entropy, a lexical-similarity baseline and P(True). AUROC is the probability that a random correct answer gets a lower uncertainty score than a random incorrect one, counting ties as half; 0.5 is chance. Incorrectly answered TriviaQA questions produced on average 3.89 distinct meanings among ten samples, against 1.89 for correctly answered ones. The authors hand-labelled 300 generations per dataset to check the entailment clustering and found 92.7% accuracy on TriviaQA; for CoQA the main text reports 95.5% and the appendix 95.3%.17

The 2024 Nature paper, by Farquhar, Kossen, Kuhn and Gal and published on 19 June 2024, extended the evaluation to LLaMA 2, Falcon and Mistral models from 7 to 70 billion parameters and to five datasets, including life-sciences questions (BioASQ) and real search queries (NQ-Open), with context passages withheld to induce errors. Averaged over 30 combinations of task and model, semantic entropy’s AUROC for predicting whether an answer was correct, used as a proxy for confabulation, was 0.790, against 0.691 for naive entropy, 0.698 for P(True) and 0.687 for a supervised embedding-regression baseline, and stayed between 0.78 and 0.81 across model families and sizes. They used ten generations per question. For GPT-4, which did not provide output probabilities in the configuration the authors used, a “discrete” variant worked from answer counts alone. On 150 factual claims from biographies of 21 people, it had higher AUROC than a self-check baseline and a paragraph version of P(True), and better rejection accuracy until about 20% of claims were rejected, at which point P(True) had a narrow edge.4

Three limits bear on deployment. First, semantic entropy only sees confabulation. The paper says plainly that it “does not guarantee factuality because it does not help when LLM outputs are systematically bad”: a model that confidently repeats a misconception produces ten agreeing samples and low entropy.4 Second, cost: ten generations plus pairwise entailment checks for every answer. A follow-up by Kossen and colleagues puts the overhead at a “5-to-10-fold increase in computation cost” and proposes semantic entropy probes, small classifiers that predict semantic entropy from the hidden states of a single generation, at almost no extra cost, if you have access to the model’s internals.18 Third, for long answers the Methods decompose each paragraph into claims, generate questions for each claim and resample answers to them, which adds model calls and failure points.4

FActScore: atomic facts against a knowledge source

Detection by self-consistency asks the model about itself. FActScore, by Sewon Min and colleagues (EMNLP 2023), measures factual precision against an outside source.19 A long generation is split into atomic facts, short statements each carrying one piece of information, and each is checked against a knowledge source. The score is the fraction of atomic facts supported.

The benchmark asked for biographies with the prompt “Tell me a bio of <entity>” for 183 people sampled from Wikidata, and had human annotators check each atomic fact against English Wikipedia, at about $4 per generation. InstructGPT scored 42.5%, ChatGPT 58.3%, and PerplexityAI, which uses a commercial search engine, 71.5%. ChatGPT and PerplexityAI often declined to answer, which the authors suggest raised their precision; InstructGPT almost never did. Error rates were higher for rarer people and for facts later in a generation: even PerplexityAI’s score fell by 50% in relative terms at the atomic-fact level as entities got rarer.19 The gradient is consistent with the missing-mass account if facts about rarer people appear less often in training data; that link is a hypothesis, since the study used a rarity proxy and did not count training occurrences or test the bound.

The authors also built automated estimators using retrieval and a language model; for each of the three human-annotated systems, the best-performing variant (which differed by system) came within two percentage points of the human aggregate FActScore. An estimator was then used on 6,500 generations from 13 subjects (12 language models and human-written biographies), a job the authors estimate would have cost $26,000 with humans.19 FActScore measures precision and ignores completeness, so a model can raise its score by saying less. It also inherits the coverage and errors of its knowledge source.

Reducing hallucination

Grounding

Retrieval-augmented generation fetches documents at question time and conditions the answer on them. That adds a checkable relationship, whether the answer is supported by the retrieved passages, without making the passages correct or complete; their own errors and gaps still matter. The reader on retrieval-augmented generation covers the evidence, which is for specific tasks and baselines, including how often generative search engines’ citations support their sentences. Kalai and Vempala note that their analysis “justifies the mitigation of consulting a fact database at generation time”.2 FActScore shows the limit. PerplexityAI, which searches the web, scored higher than the two systems without search, but that is a comparison between different systems and does not isolate the effect of retrieval; 11.1% of its atomic facts were still unsupported, and the authors found it often copied search results that were irrelevant to the prompt.19

Abstention and scoring rules

If guessing is rewarded because “I don’t know” scores zero and a wrong answer also scores zero, the direct remedy is a negative score for wrong answers. SimpleQA proposes exactly this as a single-number metric: correct answers earn 1, abstentions 0, and wrong answers −p. At p = 9, a model scores above zero only if more than 90% of the answers it attempts are right (exactly 90% scores zero), “a bar that none of the models we evaluate in this paper currently meet”.14 Kalai et al.’s refinement is to state the penalty in the prompt, so that the model knows the threshold it is being asked to meet and a single threshold policy can be optimal across thresholds.3 Labs’ deployed models already differ in how often they abstain. In a joint evaluation published on 27 August 2025, OpenAI reported that on tool-free hallucination tests Claude Opus 4 and Sonnet 4 refused far more often than OpenAI o3 and o4-mini, with lower hallucination rates, while o3 gave more than twice as many fully correct answers on its person-hallucination test.20 Accuracy-only benchmarks have not produced uniform behaviour.

This is a decision payoff, not a scoring rule for probabilities. A test-taker who answers when their probability of being right is p gains p and loses (1 − p) × t / (1 − t) in expectation; those are equal exactly when p = t. With t = 0.75, an answer the model believes is 60% likely to be right has expected score 0.6 − 0.4 × 3 = −0.6, so it should abstain; under plain accuracy the same answer has expected score 0.6 and should be given. (Author’s arithmetic.)

Behaviourally calibrated reinforcement learning

“Mitigating LLM Hallucination via Behaviorally Calibrated Reinforcement Learning”, by Jiayun Wu, Jiashuo Liu, Zhiyuan Zeng, Tianyang Zhan, Tianle Cai and Wenhao Huang, first posted on 22 December 2025 and revised on 28 January 2026, tries to train the behaviour Kalai et al. describe.21 The authors fine-tuned Qwen3-4B-Instruct, a 4-billion-parameter model, with three reward designs, set out in Section 3. In explicit risk thresholding, a threshold t is placed in the prompt and the reward is +1 for correct, 0 for abstaining and −t/(1 − t) for wrong. In verbalised confidence, the model states a confidence and is rewarded with a rescaled version of the thresholded payoff averaged over a prior on t; the authors show this rule is strictly proper when the prior has positive density across the threshold range.21 The third uses the PPO critic’s value estimate as an implicit confidence.

The metric is a signal-to-noise ratio (SNR): among answers given, correct answers divided by hallucinated ones. The reported gain is the log of the ratio between the SNR over all thresholds from 0 to 1 (integrated correct rate over integrated error rate) and the SNR at threshold zero. On BeyondAIME, 100 very hard competition mathematics problems, the Confidence-Prod variant had a log SNR gain of 0.806 at the response level (Table 1), against 0.207 for GPT-5 prompted to give a confidence; the Confidence-CE variant in the same table reached 1.097. At the claim level (Table 3, with individual claims judged correct or not by GPT-5), Confidence-Prod reached 0.183 against 0.019 for Gemini-2.5-Pro, and Confidence-Min 0.301. Raw accuracy points the other way: in Table 1, GPT-5’s prediction accuracy was 0.680 against 0.385 for Confidence-Prod. On SimpleQA, outside the training domain (Table 4), the Confidence-Brier variant had a smoothed calibration error of 0.459, close to Gemini-2.5-Pro’s 0.451 and worse than Grok-4’s 0.307, with prediction accuracy of 0.058 against their 0.545 and 0.492. The authors report that in domain the accuracy of the verbalised-confidence and critic variants was maintained relative to the standard PPO baseline.21 The paper also reports a negative result: in preliminary experiments the simplest design, telling the model t and rewarding accordingly, failed. Refusal and hallucination rates were “insensitive to the specific prompt input t”, the model over-refused even at t = 0, and the SNR gain was near zero.21 Under the paper’s metric, the trained small model’s abstention decisions separated its right and wrong answers better than the prompted frontier models did, while it answered far fewer questions correctly.

Security consequences

Package hallucination

When a code-generating model recommends a library, a hallucinated name is a supply-chain risk. Joseph Spracklen, Raveen Wijewickrama, A H M Nazmus Sakib, Anindya Maiti, Bimal Viswanath and Murtuza Jadliwala measured this in “We Have a Package for You!”, first posted on 12 June 2024 and accepted at USENIX Security 2025. They prompted 16 models for Python and 14 for JavaScript, using one prompt set drawn from Stack Overflow and one generated by a model, and collected 576,000 code samples. Using three extraction heuristics, they obtained 2.23 million package references and classified 440,445 of them (19.7%) as hallucinations because the names were absent from master lists of PyPI and npm packages taken on 10 January 2024; 205,474 unique names were classified as hallucinated. A name can be absent for other reasons, for example a real package removed before that date, and the authors note that a list already containing attacker-registered names would make their figures a lower bound. The average rate was 5.2% for the commercial GPT-series models and 21.7% for the open-source models; GPT-3.5 came in at 5.76%.5

Persistence is what turns the error into an attack surface. For this part of the study the authors used Python only, a subset of the models and sampled prompts. They took 500 prompts that had produced a hallucinated package and repeated each ten times: in 43% of cases the same name came back all ten times, in 39% it never recurred, and 58% of hallucinated packages were repeated more than once. Across models the overlap was small: 81% of hallucinated names were generated by only one model.5 The authors note that a persistent hallucination is more valuable to a malicious actor, since a name that recurs creates a standing package-confusion risk.

The paper tested mitigations. Retrieval, self-refinement and fine-tuning all reduced the rate. Fine-tuning cut DeepSeek’s hallucinations by 83%, to 2.66%, but its HumanEval code-quality score fell by 26.1%, as the paper reports it; combining all strategies reduced hallucination by 85% for DeepSeek and 64% for CodeLlama.5

Slopsquatting as a supply-chain attack

The attack has a name. A Socket blog post by Sarah Gooding on 8 April 2025 reports that “slopsquatting” was coined by Python Software Foundation Developer-in-Residence Seth Larson and popularised by Andrew Nesbitt, and defines it as “registering a non-existent package name hallucinated by an LLM, in hopes that someone, guided by an AI assistant, will copy-paste and install it without realizing it’s fake”.22 It is a cousin of typosquatting, which relies on a person mistyping a real name. Here the model supplies the mistake, and under Spracklen et al.’s test conditions it often supplies the same one again; how many real users receive any particular name has not been measured.

It is a supply-chain attack in the ordinary sense: registry code enters a build on the strength of a name, and npm, for example, can run a dependency’s preinstall, install and postinstall lifecycle scripts during installation, with the access of whatever account runs the install, when those scripts are present and the installation’s script policy permits them; npm version 12 checks dependency install scripts against an allowScripts policy and has an ignore-scripts setting that disables them.23 24 An agent that installs dependencies itself removes the moment where a person might notice an unfamiliar name. The reader on official downloads that turn out to be malware covers the general problem of trusting the source of a package; package hallucination adds a source of names that nobody vetted.

Accountability: Moffatt v. Air Canada

In November 2022, after their grandmother died, Jake Moffatt asked a chatbot on Air Canada’s website about bereavement fares. It said they could apply for the reduced rate “within 90 days of the date your ticket was issued”. Air Canada’s own bereavement page said the policy did not apply after travel. When Moffatt applied, the airline refused, while a representative admitted the chatbot had used “misleading words”.25 The decision does not say what technology the chatbot used, and nothing in it establishes that it was a large language model.

British Columbia’s Civil Resolution Tribunal, which hears small claims among other matters, decided the claim on 14 February 2024 (2024 BCCRT 149). Tribunal member Christopher C. Rivers found negligent misrepresentation on the facts: a duty of care, an inaccurate representation made without reasonable care, reasonable reliance, and resulting damages. On Air Canada’s argument that it could not be liable for information from the chatbot, he wrote: “In effect, Air Canada suggests the chatbot is a separate legal entity that is responsible for its own actions. This is a remarkable submission.” He added that “It should be obvious to Air Canada that it is responsible for all the information on its website. It makes no difference whether the information comes from a static page or a chatbot.” Air Canada was ordered to pay C$812.02, of which C$650.88 was damages.25 It is one small-claims finding on its facts, and its reasoning is plain: the airline was responsible for information on its website whether it came from a static page or a chatbot. The reader on prompt injection and the agent attack surface discusses the case alongside other agent failures.

Fabricated citations: Mata v. Avianca

On 22 June 2023, Judge P. Kevin Castel of the US District Court for the Southern District of New York sanctioned two lawyers, Peter LoDuca and Steven A. Schwartz, and their firm in Mata v. Avianca (22-cv-1461), under Rule 11 of the Federal Rules of Civil Procedure or, alternatively, the court’s inherent authority. They had filed an opposition brief citing judicial opinions that did not exist, with “fake quotes and citations created by the artificial intelligence tool ChatGPT”, and “continued to stand by the fake opinions after judicial orders called their existence into question”. The order lists six fabricated decisions, including “Varghese v. China Southern Airlines”, whose “legal analysis is gibberish”, in the court’s words.15 Schwartz testified that he had “falsely assumed” ChatGPT was “like a super search engine”. The court found subjective bad faith on the part of the individual lawyers, “based upon acts of conscious avoidance and false and misleading statements to the Court”. It imposed a $5,000 penalty jointly and severally and required letters to the client and to each judge falsely named as an author. The opinion says “there is nothing inherently improper about using a reliable artificial intelligence tool for assistance” and that “existing rules impose a gatekeeping role on attorneys to ensure the accuracy of their filings”.15

What is contested

Whether hallucination is inevitable in any useful sense. The computability result says no single system can be right about everything; that is true and has little bearing on a deployed product.9 The statistical bounds say that, under their assumptions, a model calibrated in their sense must err on arbitrary facts at a rate tied to the monofact rate, and their authors stress that post-training and abstention can lower the rate, at a cost to calibration.2 3 The practical question is whether a system can be made both useful and nearly error-free in a given domain by answering less, and the theory does not rule that out. Independent evidence is thin. Miranda Muqing Miao and Michael Kearns tested the monofact account in n-gram models and in fine-tuned Transformers of two families, T5 encoder-decoder and GPT-2 decoder-only models, trained on synthetic data drawn from Pareto distributions: hallucination rose with the monofact rate, and in one T5-Small setting, at a 27.65% monofact rate, repeating 5% of training examples tenfold, which deliberately injects miscalibration, reduced hallucination by about 40%. Their setting is small and synthetic, which limits how far it carries to large models.26

Whether semantic entropy scales or catches only one kind of error. Its authors say outright that it misses systematic errors, it costs several generations per answer, and the cheap probes need white-box access.4 18 A further possibility, offered here as a conjecture, is that as models grow more consistent more of their errors will be the kind sampling cannot see; no cited study measures that proportion.

Whether abstention-friendly scoring would change lab behaviour. Kalai et al.’s incentive argument is not a theorem: the paper surveys benchmark scoring rules and does not measure how they shape training, and labs train on many other signals.3 The behaviour can be trained into a small model on a narrow task, though the simplest reward design failed.21 Whether leaderboards adopt penalties, and whether that moves frontier models, is open; the different abstention habits of labs’ current models show that grading is not the only influence.20

Whether verbalised confidence means anything. It correlates with accuracy and can be trained to be calibrated,11 but untrained models cluster their stated confidence at the top of the scale and overstate it.12 14 A number in the output is a claim that needs the same testing as any other claim.

An annotated reading list

PaperWhat it showedWhat to watch
Guo et al., ICML 20178Deep classifiers became overconfident; one temperature parameter fixes most of it; the standard ECEImage and text classifiers, not generative models; ECE depends on binning
Ji et al., ACM Computing Surveys6The vocabulary: intrinsic and extrinsic, faithfulness and factuality (§2, Table 1)First version predates ChatGPT; the July 2024 version has a section on LLMs
Kadavath et al., 202210P(True) and P(IK); large base models calibrated on well-formatted questions; one Anthropic RLHF policy largely recalibrated by T = 2.5 on three evaluations (Fig. 9)P(IK) calibration did not transfer well to new tasks
OpenAI, GPT-4 report, 20231Calibration before and after post-training on an MMLU subset (Fig. 8)Multiple choice only
Lin et al., 202211; Xiong et al., 202312Verbalised confidence can be trained to be calibrated; untrained, it is overconfidentPrompt and model dependent
Kuhn et al., ICLR 202317; Farquhar et al., Nature 20244Semantic entropy; confabulation as a distinct error (Nature Figs. 2 and 3)Blind to consistent errors; several samples per answer
Kossen et al., 202418Probes predict semantic entropy from one generation’s hidden statesNeeds model internals
Manakul et al., EMNLP 202316Black-box detection by sampling consistencyBiography data; sentence granularity
Min et al., EMNLP 202319Atomic-fact precision against Wikipedia; errors rise for rarer peoplePrecision only; inherits the source’s gaps
Kalai and Vempala, STOC 20242Lower bound under stated assumptions: calibrated models hallucinate on arbitrary facts at no less than about the monofact rate minus miscalibration (Corollary 1)Does not cover references or systematic facts
Kalai et al., 20253Errors as misclassification; benchmarks reward guessing; explicit confidence targetsThe incentive argument is not a theorem
Xu et al., 20249No computable model is right on every computable functionSays nothing about error rates on real tasks
Wei et al., SimpleQA, 202414Factuality benchmark with “not attempted” grade; models overstate confidenceShort answers only
Wu et al., 202521Small model trained for threshold-sensitive abstentionThe simplest reward design failed
Gneiting and Raftery, JASA 20077Proper scoring rules; maximise sharpness subject to calibration (§§1 and 3)Statistics, not language models
Spracklen et al., USENIX Security 20255Package hallucination rates and repeatability (§5, RQ1 and RQ3)Rates tied to the model versions tested

For a security reader deploying a model

Verify every dependency against the registry before it is installed. In Spracklen et al.’s study, about one package reference in twenty from the commercial models and one in five from the open models was classified as hallucinated, and in a Python rerun many names recurred.5 A name that resolves is not proof of safety, since an attacker may already have registered it. Check that a package exists, how long it has existed, who publishes it and how widely it is used, and make agents go through the same allow-list or proxy as people. Block installation scripts where the ecosystem allows it.

Require citations that resolve, and resolve them mechanically. A citation is useful only if it points to a real document that says what the output claims. Check that cited cases, papers, CVE identifiers, URLs and policy clauses exist in an authoritative source, then check that the cited passage supports the sentence. Mata v. Avianca is a record of what happens when the model’s own assurance is taken as the check.15

Measure abstention as well as accuracy. On your own task, with labelled questions, record three numbers: correct, wrong, and declined. Vary the confidence threshold at which the system declines and plot coverage (the share answered) against the error rate among answered questions, so you can pick the operating point your use tolerates. Score with a penalty that reflects the cost of a wrong answer in your setting, as SimpleQA and Kalai et al. propose, and compare configurations on that score, computed over all questions asked.14 3 Plain accuracy over all questions counts every abstention as a failure and so penalises lower coverage; with a penalty for wrong answers, the ranking depends on the penalty and on the counts of correct and wrong answers, not on attempting fewer questions as such.

Do not treat stated confidence as calibrated until you have tested it. Choose one confidence measure (answer-option probabilities, a stated number, or agreement across samples), bin by it, and draw the reliability diagram on labelled cases the system has not been tuned on. Each bin you care about needs enough cases to be precise: with 20 cases at an observed accuracy of 80%, the standard error is about 9 percentage points (author’s arithmetic). Expect overconfidence after post-training and in stated numbers.1 12 If you have the probabilities, temperature scaling fitted on one labelled validation set and checked on a separate held-out set is cheap; refit and recheck when the model or the task changes.8 If you rely on sampling consistency, know that it catches confabulation and misses errors the model repeats every time.4

Own the output. The tribunal in Moffatt held the airline responsible for its chatbot’s statements as for any other part of its website.25 Ground answers in authoritative documents where you can, constrain what the system may promise, and log what it said.

Conclusion

Three kinds of claim can be separated. Some error has been reduced by specific interventions: in Spracklen et al.’s experiments, retrieval, self-refinement and fine-tuning each lowered package hallucination rates,5 and OpenAI reports GPT-4 scoring 19 percentage points above GPT-3.5 on internal factuality evaluations; the same report’s calibration plot, on a different task, shows post-training worsening ECE.1 Some error is predicted by theory under stated assumptions: a model calibrated in Kalai and Vempala’s sense, trained on independent samples, hallucinates on arbitrary facts at a rate bounded below by about the monofact rate minus its miscalibration.2 3 What they imply for a particular system depends on the training and abstention distribution being modelled (the 2025 arbitrary-facts setup counts “I don’t know” among valid responses), and they say nothing directly about a system that checks answers against an outside source. Uncertainty signals such as sampling consistency and semantic entropy can flag likely confabulations, catching arbitrary errors far better than consistent ones.4 And how abstention is scored decides what a model is rewarded for. Under plain accuracy, a guess with any chance of being right beats “I don’t know”. Under a stated penalty of t/(1 − t), answering beats abstaining when the probability of being right exceeds t, and the two tie at t.3 Kalai et al. hypothesise that accuracy-only evaluations help keep hallucination alive after post-training; that effect on model development has not been measured. For anyone deploying a model, the practical conclusion is to test its confidence before trusting it, score its refusals, and verify mechanically anything it names that can be looked up.

Footnotes

  1. OpenAI, “GPT-4 Technical Report”, arXiv:2303.08774, first submitted March 15, 2023, revised March 4, 2024. Section 5 “Limitations”, Figure 6 (internal factuality evaluations) and Figure 8 (calibration on an MMLU subset). https://arxiv.org/abs/2303.08774 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6
  2. Adam Tauman Kalai and Santosh S. Vempala, “Calibrated Language Models Must Hallucinate”, arXiv:2311.14648, submitted November 24, 2023 (STOC 2024). Abstract, Section 1 including “Interpretation” and Figure 1, Sections 4 and 5 including Corollary 1. https://arxiv.org/abs/2311.14648 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12
  3. Adam Tauman Kalai, Ofir Nachum, Santosh S. Vempala and Edwin Zhang, “Why Language Models Hallucinate”, arXiv:2509.04664, submitted September 4, 2025. Abstract, Sections 1, 3 (Theorem 1, Theorem 2, calibration discussion, Figure 2), 4 (Table 2, Section 4.2 “Explicit confidence targets”), Appendix F (Humanity’s Last Exam). https://arxiv.org/abs/2509.04664 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16
  4. Sebastian Farquhar, Jannik Kossen, Lorenz Kuhn and Yarin Gal, “Detecting hallucinations in large language models using semantic entropy”, Nature 630, 625–630, published June 19, 2024. Main text, Figs. 2 and 3, Methods. https://www.nature.com/articles/s41586-024-07421-0 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9
  5. Joseph Spracklen, Raveen Wijewickrama, A H M Nazmus Sakib, Anindya Maiti, Bimal Viswanath and Murtuza Jadliwala, “We Have a Package for You! A Comprehensive Analysis of Package Hallucinations by Code Generating LLMs”, arXiv:2406.10279, first submitted June 12, 2024, revised March 2, 2025 (USENIX Security 2025). Abstract, Sections 5.1 to 5.4 (RQ1 to RQ4), Tables 4 and 5. https://arxiv.org/abs/2406.10279 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6 ↩7
  6. Ziwei Ji, Nayeon Lee, Rita Frieske, Tiezheng Yu, Dan Su, Yan Xu, Etsuko Ishii, Yejin Bang, Delong Chen, Wenliang Dai, Ho Shu Chan, Andrea Madotto and Pascale Fung, “Survey of Hallucination in Natural Language Generation”, arXiv:2202.03629, first submitted February 8, 2022, version 7 July 14, 2024 (ACM Computing Surveys). Sections 1, 2, 2.1 and 2.3, Table 1. https://arxiv.org/abs/2202.03629 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6
  7. Tilmann Gneiting and Adrian E. Raftery, “Strictly Proper Scoring Rules, Prediction, and Estimation”, Journal of the American Statistical Association 102(477), March 2007, review article. Abstract and Section 1. https://sites.stat.washington.edu/raftery/Research/PDF/Gneiting2007jasa.pdf (opens in a new tab) ↩1 ↩2 ↩3 ↩4
  8. Chuan Guo, Geoff Pleiss, Yu Sun and Kilian Q. Weinberger, “On Calibration of Modern Neural Networks”, arXiv:1706.04599, submitted June 14, 2017 (ICML 2017). Abstract; Sections 1 to 5; Figures 1 to 3; Table 1 (ECE with 15 bins). https://arxiv.org/abs/1706.04599 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10
  9. Ziwei Xu, Sanjay Jain and Mohan Kankanhalli, “Hallucination is Inevitable: An Innate Limitation of Large Language Models”, arXiv:2401.11817, first submitted January 22, 2024, revised February 13, 2025. Abstract, Sections 1 to 3 (Theorems 1 to 3), Section 4.4 “Limitations”. https://arxiv.org/abs/2401.11817 (opens in a new tab) ↩1 ↩2 ↩3 ↩4
  10. Saurav Kadavath, Tom Conerly, Amanda Askell, Tom Henighan, Dawn Drain, Ethan Perez and 30 others (Anthropic), “Language Models (Mostly) Know What They Know”, arXiv:2207.05221, first submitted July 11, 2022. Abstract, Sections 1, 2, 3.1, 3.3, 4 and 5. https://arxiv.org/abs/2207.05221 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6
  11. Stephanie Lin, Jacob Hilton and Owain Evans, “Teaching Models to Express Their Uncertainty in Words”, arXiv:2205.14334, first submitted May 28, 2022. Abstract. https://arxiv.org/abs/2205.14334 (opens in a new tab) ↩1 ↩2 ↩3
  12. Miao Xiong, Zhiyuan Hu, Xinyang Lu, Yifei Li, Jie Fu, Junxian He and Bryan Hooi, “Can LLMs Express Their Uncertainty? An Empirical Evaluation of Confidence Elicitation in LLMs”, arXiv:2306.13063, first submitted June 22, 2023. Abstract, Section 1 findings, Figure 2. https://arxiv.org/abs/2306.13063 (opens in a new tab) ↩1 ↩2 ↩3 ↩4
  13. OpenAI, “Introducing SimpleQA”, openai.com, October 30, 2024. https://openai.com/index/introducing-simpleqa/ (opens in a new tab) ↩
  14. Jason Wei, Nguyen Karina, Hyung Won Chung, Yunxin Joy Jiao, Spencer Papay, Amelia Glaese, John Schulman and William Fedus, “Measuring short-form factuality in large language models”, arXiv:2411.04368, submitted November 7, 2024. Sections 1, 2 (grading and the penalty metric) and 4 “Measuring calibration”, Figure 2. https://arxiv.org/abs/2411.04368 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5
  15. Mata v. Avianca, Inc., No. 22-cv-1461 (PKC), US District Court for the Southern District of New York, Opinion and Order on Sanctions (ECF 54), P. Kevin Castel, U.S.D.J., June 22, 2023. Pages 1 to 2, findings of fact, and Conclusion. https://storage.courtlistener.com/recap/gov.uscourts.nysd.575368/gov.uscourts.nysd.575368.54.0.pdf (opens in a new tab) ↩1 ↩2 ↩3 ↩4
  16. Potsawee Manakul, Adian Liusie and Mark J. F. Gales, “SelfCheckGPT: Zero-Resource Black-Box Hallucination Detection for Generative Large Language Models”, arXiv:2303.08896, first submitted March 15, 2023 (EMNLP 2023). Sections 1, 5 and 6, Tables 1 and 2, Limitations. https://arxiv.org/abs/2303.08896 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5
  17. Lorenz Kuhn, Yarin Gal and Sebastian Farquhar, “Semantic Uncertainty: Linguistic Invariances for Uncertainty Estimation in Natural Language Generation”, arXiv:2302.09664, first submitted February 19, 2023 (ICLR 2023 spotlight). Sections 1, 4, 5 and 6.1, Table 2. https://arxiv.org/abs/2302.09664 (opens in a new tab) ↩1 ↩2 ↩3 ↩4
  18. Jannik Kossen, Jiatong Han, Muhammed Razzak, Lisa Schut, Shreshth Malik and Yarin Gal, “Semantic Entropy Probes: Robust and Cheap Hallucination Detection in LLMs”, arXiv:2406.15927, submitted June 22, 2024. Abstract. https://arxiv.org/abs/2406.15927 (opens in a new tab) ↩1 ↩2 ↩3
  19. Sewon Min, Kalpesh Krishna, Xinxi Lyu, Mike Lewis, Wen-tau Yih, Pang Wei Koh, Mohit Iyyer, Luke Zettlemoyer and Hannaneh Hajishirzi, “FActScore: Fine-grained Atomic Evaluation of Factual Precision in Long Form Text Generation”, arXiv:2305.14251, submitted May 23, 2023 (EMNLP 2023). Abstract, Sections 1 and 3, Table 1, Section 4. https://arxiv.org/abs/2305.14251 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5
  20. OpenAI, “OpenAI and Anthropic share findings from a joint safety evaluation”, openai.com, August 27, 2025. Summary and “Hallucination” section (Person hallucinations test, overall results). https://openai.com/index/openai-anthropic-safety-evaluation/ (opens in a new tab) ↩1 ↩2
  21. Jiayun Wu, Jiashuo Liu, Zhiyuan Zeng, Tianyang Zhan, Tianle Cai and Wenhao Huang, “Mitigating LLM Hallucination via Behaviorally Calibrated Reinforcement Learning”, arXiv:2512.19920, first submitted December 22, 2025, revised January 28, 2026. Abstract, Section 1, Section 3 (metrics and Figure 1), Section 4 and Table 1. https://arxiv.org/abs/2512.19920 (opens in a new tab) ↩1 ↩2 ↩3 ↩4 ↩5 ↩6
  22. Sarah Gooding, “The Rise of Slopsquatting: How AI Hallucinations Are Fueling a New Class of Supply Chain Attacks”, Socket blog, April 8, 2025. https://socket.dev/blog/slopsquatting-how-ai-hallucinations-are-fueling-a-new-class-of-supply-chain-attacks (opens in a new tab) ↩
  23. npm Docs, “scripts” (npm CLI v12), sections on the preinstall, install and postinstall lifecycle scripts, accessed November 26, 2026. https://docs.npmjs.com/cli/v12/using-npm/scripts/ (opens in a new tab) ↩
  24. npm Docs, “npm-install” (npm CLI v12), configuration entries “ignore-scripts”, “allow-scripts” and “strict-allow-scripts”, accessed November 26, 2026. https://docs.npmjs.com/cli/v12/commands/npm-install/ (opens in a new tab) ↩
  25. Moffatt v. Air Canada, 2024 BCCRT 149, Civil Resolution Tribunal (British Columbia), decision issued February 14, 2024, Tribunal Member Christopher C. Rivers. Paragraphs 2 to 4, 14 to 22, 24 to 32, 40 and 44. https://decisions.civilresolutionbc.ca/crt/crtd/en/item/525448/index.do (opens in a new tab) ↩1 ↩2 ↩3
  26. Miranda Muqing Miao and Michael Kearns, “Hallucination, Monofacts, and Miscalibration: An Empirical Investigation”, arXiv:2502.08666, first submitted February 11, 2025, revised March 3, 2026. Abstract. https://arxiv.org/abs/2502.08666 (opens in a new tab) ↩