Skip to content

Glossary

Hallucination

A hallucination is generated content that is unsupported by its relevant source or conflicts with established facts.

Context engineering

Hallucination in natural language generation refers to output that is unsupported by the source material or inconsistent with facts relevant to the task. The term covers more than invented names: a model may attach a real fact to the wrong entity, turn a possibility into a certainty, or state a date absent from its evidence. Research distinguishes errors relative to supplied source content from errors relative to outside knowledge, so an evaluation must specify its reference frame.

Detection requires looking at individual assertions and the material that could support them. A fluent paragraph can contain one unsupported clause among correct ones. Citation checking, evidence-span review, and targeted factual verification help expose that pattern. Uncertainty should be expressed when the evidence is incomplete, and abstention may be preferable to a forced answer. A model's confidence wording is not a calibrated probability unless separately tested.

For a defensible record, a hallucinated detail can be propagated into later decisions if its origin is not visible. Grounding and faithfulness checks reduce that risk, but they cannot repair an unreliable source or a mistaken entity match. The question is not only whether a sentence appears in retrieved text; it is whether the cited evidence supports this specific claim about this specific subject at the relevant time.

Example

A generated answer says Halden Therapeutics AG (fictional) held a licence through December, although the cited notice states only that it was active in June.

A taxonomy that guides action

The research literature distinguishes types of hallucination, and the distinctions point to different fixes. The survey by Ji and colleagues separates intrinsic hallucination, in which the output contradicts the source material, from extrinsic hallucination, in which the output adds content that cannot be verified from the source. The later survey by Huang and colleagues divides hallucination in large language models into factuality hallucination, where the output conflicts with real-world facts, and faithfulness hallucination, where it departs from the instructions or the supplied context. Maynez and colleagues found in abstractive summarisation that a large share of model output contained content not supported by the input, and studied faithfulness and factuality as separate properties. NIST uses the term confabulation for the same risk.

The practical point is that a fix that works for one type may not work for another. Supplying better context helps with factuality errors stemming from missing knowledge; it does not stop a model from misreading the context. Constraining output to quoted passages helps with faithfulness; it does not help if the retrieved passages are wrong.

Causes, detection and mitigation

Causes include gaps and errors in training data, a training objective that rewards fluent continuation over calibrated uncertainty, ambiguous prompts, and failures to use supplied context. Models can also mimic common falsehoods: the benchmark TruthfulQA was built from questions on which humans often hold false beliefs, to test whether models reproduce them. Detection options include checking each claim against retrieved evidence, comparing multiple samples for consistency, and asking another model to judge support, each with its own error rate. Mitigations include grounding through retrieval, requiring citations, allowing the system to abstain, and verifying generated claims before release.

No method removes the risk entirely, so a defensible process measures it. Sample outputs, label unsupported claims, and report the rate with its uncertainty and its breakdown by type of question. Keep the labelled sample as a regression set so that a change to the model, the prompt or the corpus can be tested against it. The article on what fact-verification benchmarks test helps in choosing public benchmarks and in understanding what they do not cover.

A worked example

A model is asked to summarise a filing of Halden Therapeutics AG (fictional) that states net loss figures for two years and says nothing about cash runway. The summary includes the loss figures correctly and adds that the company has runway into the following year. The loss figures are faithful. The runway sentence is an extrinsic hallucination: it may or may not be true, but it is not in the source and so cannot be checked against it. A claim-level review marks the first claims supported and the last unsupported, and the process removes it. A different failure is an intrinsic one: the summary reverses the order of the years and reports an increasing loss as decreasing. The first requires a rule against adding unsourced content; the second requires a numeric check against the table.

Checks a reviewer can run

Ask for the measured rate of unsupported claims, and how it was measured, on what sample, by whom. Ask whether numbers, dates and names are checked mechanically against the source. Ask what the system does when it lacks evidence. Read twenty outputs and mark every claim; compare the tally with any reported figure.

Related terms and boundaries

Hallucination is the failure that grounding and faithfulness address. It is reduced by abstention, by well-engineered context, and by sentence-level citation. It interacts with entity disambiguation: a model that confuses two entities with similar names will confidently attribute facts to the wrong one.

Common misreadings

  • Equating fluent wording with factual support.
  • Counting a source mention as support for an unsupported date.
  • Using abstention as an error when the evidence genuinely lacks an answer.

Related terms

Appears in

Found an error on this page? See corrections for what counts as one, how to report it and the dated log.

Enquiry

Where does "Hallucination" bear on a decision of yours?

This entry sits under context engineering. If a decision in your organization turns on it, send the entity concerned, the sources you fuse to describe it and who may read which of them. We reply with what a first record would cover.

Or write to [email protected] in your own words.