Last verified

Safety & reliability AI glossary

What is an AI hallucination?

An AI hallucination is output from a language model that is stated with confidence but is false, invented or unsupported by the sources the model was given.

At a glance

  • How it works: A model writes the most plausible next words; when it does not actually know a fact, a plausible-sounding name, number or citation can win.
  • Why it matters: A hallucination reads exactly like a correct answer, so the risk of any unchecked output scales with what you do with it.
  • What it costs: Reducing it costs tokens: sources are billed as input, citations and reasoning as output — $2 and $10 per million on Claude Sonnet 5.5.
  • Related to: RAG, reasoning model, system prompt, prompt engineering.

What counts as a hallucination

Two kinds of failure share the name. The first is fabrication: the model asserts something about the world that is not true — a court case that never happened, a paper with real-sounding authors that was never written, a product feature that does not exist, a statistic with a precise decimal and no origin. The second is unfaithfulness: the model was handed a document and says something the document does not say, or contradicts it. The second kind is especially costly in business use, because the whole point of supplying the document was to keep the answer tied to it.

What both have in common is tone. Models do not hedge more when they are wrong; an invented answer arrives in the same fluent, assured register as a correct one. That is what separates a hallucination from an ordinary mistake a reader would notice, and why it cannot be caught by reading the answer alone.

Why language models hallucinate

A language model is trained to continue text plausibly, not to check facts. For things that appear many times in its training data, the plausible continuation and the true one coincide. For rare facts — a minor person's birthday, a niche figure, a specific page number — the model has nothing reliable to draw on, and it still produces the most plausible-looking answer.

A September 2025 paper by Adam Tauman Kalai and three co-authors argues that this is not mysterious at all. In their account, hallucinations are ordinary prediction errors that arise naturally during pretraining whenever a model cannot tell a true statement from a false one. They persist after training for a reason outside the model: most widely used evaluations score an abstention the same as a wrong answer — zero — so a model that guesses scores better than one that admits uncertainty, much like a student guessing on a multiple-choice exam. The authors' proposed fix is to change how mainstream benchmarks score uncertain answers, so that honesty stops being penalised.

How to reduce hallucinations

Anthropic's guidance for Claude is a good summary of what works across models:

  • Allow “I don't know”. Explicitly permitting the model to say it lacks the information removes some of the pressure to invent.
  • Ground the answer in supplied text. Give the model the source documents and tell it to use only those. For long documents, Anthropic suggests having the model first pull out word-for-word quotes, then answer from the quotes.
  • Require citations, then check them. Ask for a supporting quote for each claim, and have the model withdraw any claim it cannot support.
  • Compare several answers. Run the same prompt more than once; where the answers disagree, something is likely made up.
  • Inspect the reasoning. With extended thinking turned on, the reasoning trace can show where a wrong assumption entered.

Retrieval systems (RAG) and search tools apply the grounding idea at scale. None of these remove hallucinations entirely — Anthropic says so directly — so anything high-stakes still needs a human check.

What reducing hallucinations costs

Every defence on that list has a token price, and it is worth knowing which part of the bill each one moves:

  • Grounding adds input: the source documents travel with every request. Retrieval keeps this down by sending only the relevant passages, and prompt caching discounts a document reused across many questions.
  • Quotes and citations add output — the most expensive token type on most models.
  • Comparing several answers multiplies the whole call: three samples cost three times one.
  • Reasoning adds reasoning tokens, billed as output even though you never see most of them.
  • Web search adds per-search fees on top of tokens at some vendors — Anthropic, for example, charges per 1,000 searches — plus the retrieved pages as input on later turns.

The worked example prices one question at three levels of checking on the same model. The point is not that checking is expensive; it is that it should be sized to the stakes. A support bot answering from a product manual needs grounding; a legal brief needs grounding, citations and a lawyer.

Worked exampleOne question, three levels of checking

10,000 requests a month on Claude Sonnet 5.5, priced at its current list rates, checked on 2026-10-09.

Answer from the model's memory
Input · 5M tokens @ $2.00/M$10.00
Output · 3M tokens @ $10.00/M$30.00
Blended · per 1M tokens billed$5.00
Per request$0.004
Per month$40.00
Grounded in 8,000 tokens of sources +400%
Input · 85M tokens @ $2.00/M$170
Output · 3M tokens @ $10.00/M$30.00
Blended · per 1M tokens billed$2.27
Per request$0.020
Per month$200
Grounded, cited, with reasoning +850%
Input · 85M tokens @ $2.00/M$170
Output · 6M tokens @ $10.00/M$60.00
Reasoning, billed as output · 15M tokens @ $10.00/M$150
Blended · per 1M tokens billed$3.58
Per request$0.038
Per month$380

10,000 questions a month. All token counts are illustrative assumptions, and reasoning-token volumes in particular vary widely by task and model. Grounding is billed as input; quoted citations and reasoning are billed as output.

Change the workload or the model in the LLM API cost calculator.

Where hallucinations do the most damage

The damage depends less on how often a model hallucinates than on what happens to the output next. Text a human reads critically is low risk. Output that is copied into a legal filing, a medical note, a financial report or a customer reply without review is high risk, because the error leaves the system with your name on it. Code is a special case: an invented function or library name usually fails loudly at run time, but a plausible-looking wrong calculation does not. Design the review step around where the output goes, not around the model's reputation.

Measuring hallucination in your own system

Public leaderboards measure models on someone else's questions. What matters is the rate on yours. Build a test set of realistic questions with known answers, including some the system should decline because the information is not available. Score three outcomes separately — correct, wrong and abstained — rather than collapsing them into accuracy, so that a change which makes the system guess more is visible as more wrong answers rather than hidden as fewer abstentions. That is the same scoring principle Kalai and colleagues recommend for public benchmarks.

Frequently asked.

Short answers to the questions that come up next.

Q · 01 Why do AI models hallucinate? +
They are trained to produce plausible text, not verified facts. When a model lacks reliable knowledge of something, a plausible invention can still be its best guess — and most evaluations reward guessing over admitting uncertainty, so training does not discourage it.
Q · 02 Can AI hallucinations be eliminated completely? +
No. Grounding in sources, citation checks and permission to say “I don't know” reduce them substantially, but vendors themselves say these techniques do not remove them. High-stakes output still needs human review.
Q · 03 Does RAG stop hallucinations? +
It reduces them by giving the model the right text, but a model can still misread a passage, combine sources wrongly or go beyond them. Instructing it to answer only from the supplied documents and to cite them makes failures rarer and easier to spot.
Q · 04 How much does it cost to reduce hallucinations? +
It depends on the technique: grounding adds input tokens, citations and reasoning add output tokens, and comparing several answers multiplies the number of calls. The worked example on this page prices three levels of checking on one model.
Q · 05 Is a hallucination the same as a mistake? +
It is a kind of mistake — one where the model presents something invented or unsupported as fact, in the same confident tone as a correct answer. That confidence is what makes hallucinations harder to catch than ordinary errors.