What is AI hallucination?

An AI hallucination is output from a generative model that is fluent and confident but false or unsupported, such as an invented fact, citation or policy. NIST's term for it is confabulation.

Also called LLM hallucination, AI hallucinations, confabulationUpdated

A large language model writes by predicting the next token from patterns learned in training. It has no built-in step that checks a claim against a source. Most of the time the likeliest continuation is also true. When it isn't, the model produces something that reads exactly like a correct answer: a plausible date, a realistic case citation, a refund rule that doesn't exist. That is a hallucination.

NIST's Generative AI Profile (NIST AI 600-1, July 2024) uses the term confabulation and lists it among the risks specific to generative AI.

Why models hallucinate

  • The question goes beyond what the model knows. Recent events, your internal data, or rare facts that appeared only a few times in training.
  • Answering is rewarded. Training and many prompts favour a confident answer over "I don't know".
  • The context is weak or wrong. In a RAG system, if retrieval returns the wrong passage, the model often answers from it anyway.
  • Relevant facts are buried. In a long, cluttered context window, the key passage is easier to miss.
  • The format demands more than exists. Asking for "five references" invites invented ones when only two are real.

Examples from real cases

Invented legal citations. In Mata v. Avianca (US District Court, Southern District of New York), lawyers filed a brief that cited court opinions ChatGPT had made up, complete with fake quotes. On 22 June 2023 Judge P. Kevin Castel sanctioned the lawyers and their firm.

An invented refund rule. In Moffatt v. Air Canada (British Columbia Civil Resolution Tribunal, February 2024), the airline's website chatbot told a customer he could apply for a bereavement fare after travelling. The airline's actual policy said otherwise. The tribunal held the airline responsible for what its chatbot said and ordered it to pay damages.

Both cases show where the risk sits: the person or company using the model owns the answer.

How to reduce hallucinations

No technique removes them entirely. These measures lower the rate and catch what's left:

  1. Ground answers in sources. Retrieve relevant documents and instruct the model to answer only from them.
  2. Require citations, then check them in code. Confirm that each cited passage exists and was actually retrieved.
  3. Make "I don't know" a correct answer. Say so in the prompt, and count it as a pass in tests when the sources don't contain the answer.
  4. Constrain the output. Use structured outputs and fixed choices, and validate against your own data, for example that a quoted order ID or drug name exists.
  5. Check groundedness automatically. A second model or a managed check scores whether each claim is supported by the sources. Treat it as a filter, not proof.
  6. Keep a person in the loop for advice, filings, payments and anything clinical.

How to measure it

A "hallucination rate" only means something for a defined task and test set. Build questions with known answers, including ones the sources can't answer, and score each response for correctness and faithfulness to the sources. Run this on every prompt or model change as part of LLM evaluation, and pair it with runtime guardrails.

Our guide to taking an LLM feature from demo to production covers grounding, evaluation sets and fallbacks in more detail.

Any idea in mind? Let's make it real.

Tell us what you're building. You'll hear back from an engineer, not a sales team, usually within one working day.

Book a 30-min call