AI systemsconfabulationungrounded answergroundednessfaithfulness

Hallucination

Definition

A hallucination is generated content that is factually wrong or not supported by the input the model was given, presented with the same fluency as correct content.

In practice

Models generate likely text, not verified facts, so they fill gaps confidently. In production a hallucination is still an HTTP 200 with normal latency, invisible to request metrics. Grounding answers in retrieved sources, requiring citations and checking that each claim appears in the cited passage (faithfulness or groundedness scoring) reduce it and make it measurable.

Strict "answer only from sources" instructions trade hallucinations for more "I don't know" responses when retrieval misses, which is usually the right trade. No prompt eliminates hallucination entirely; where errors are costly, validate outputs in code, constrain them to structured formats or keep a person in the loop.

Example

A shopping assistant invents the code SAVE20 for a discount that does not exist; an output check that validates codes against the promotions table blocks the answer.