Safety

Hallucination

An LLM output that is fluent and confident but factually wrong or unsupported by the provided context.

Hallucinations come in two flavors: intrinsic (contradicts the source context) and extrinsic (introduces facts not in the source and not verifiable).

Mitigations include grounding via RAG, constrained decoding, citation requirements, faithfulness scoring with an LLM judge, and post-generation fact-checking against a trusted index.

The eval pattern: build a labeled set of (prompt, context, expected_answer) triples, then score faithfulness automatically on every release.

Go deeper

Read the full pillar guide on LLM Evaluation or compare evaluation tools in the Tool Comparison Hub.