Hallucination Mitigation: RAG, Decoding, and Training › Post-Hoc Verification
Language AI HandbookAll chapters Hallucination Mitigation: RAG, Decoding, and Training › Post-Hoc VerificationOne section · Sections in this chapter6 / 12 ↓
Reading tools Definitions & inline links
Choose your expertise level to adjust how many terms are explained. Beginners see more tooltips, experts see fewer to maintain reading flow. Hover over underlined terms for instant definitions.
Article links
Make inline references clickable
All of the strategies above attempt to prevent hallucination during generation. Post-hoc verification takes a different approach: generate first, then verify whether what was generated is factually accurate. This is valuable in settings where the cost of a wrong answer is high enough to justify the additional verification step.
Factual Consistency Checking
Factual consistency checking evaluates whether a generated response is consistent with a set of reference documents. Unlike hallucination detection (which requires knowing the ground truth fact), consistency checking only requires that you have reference documents that should support the response. This is a well-posed task: given document and claim , does entail, contradict, or not address ?
Natural language inference (NLI) models are the workhorses of factual consistency checking. An NLI model takes a (premise, hypothesis) pair and classifies the relationship as entailment, contradiction, or neutral. For factual verification, the retrieved document is the premise and each claim in the generated response is the hypothesis. Claims that are contradicted or not addressed by any retrieved document are flagged as potentially hallucinated.
The limitation of NLI-based consistency checking is that it only checks consistency with what you retrieved, not with the world. If your retrieval system missed the relevant document, a hallucinated claim may be neither contradicted nor supported by the retrieved context, leading to a "neutral" judgment that does not identify the problem.
LLM-based verification uses a second language model as a fact checker. Given the generated response and optionally some retrieved context, the verifier model is asked to identify specific claims that appear inaccurate or unsupported. This approach benefits from the verifier model's general knowledge and reasoning capabilities, but introduces its own failure modes: the verifier can hallucinate corrections, be inconsistent, or be fooled by the same fluency that makes the original response convincing.
FActScore: Decomposed Factual Precision
FActScore (Factual Precision in Atomic Claims Score) is a systematic framework for measuring hallucination in long-form generation. Rather than treating an entire response as correct or incorrect, FActScore decomposes the response into atomic claims (simple, standalone factual assertions) and verifies each one independently against a knowledge base.
For a response about subject , FActScore is:
where:
- : the set of atomic claims extracted from response
- : a single atomic claim (e.g., "Marie Curie was born in Warsaw")
- : 1 if claim is supported by the knowledge base for subject , 0 otherwise
- : the total number of atomic claims extracted
The extraction step (decomposing a response into atomic claims) and the verification step (checking each claim against a knowledge base) can both be done with LLMs, making FActScore automatable at scale. The framework has been applied to biography generation, scientific summarization, and other long-form factual generation tasks, giving a principled way to compare models and mitigation strategies on the same scale.