Hallucination Mitigation
Techniques to reduce LLMs generating false but plausible information, from RAG to factual verification and prompt design.
What it is
Hallucinations are LLM responses that sound correct but contain fabricated information. The model generates plausible text based on statistical patterns, not verified facts. Mitigating hallucinations is critical for applications where accuracy matters.
Types of hallucinations
| Type | Example | Detection | Mitigation |
|---|---|---|---|
| Factual | Incorrect data as facts | Verification against sources | RAG with citations |
| Fabrication | Inventing URLs, papers, citations | Validate sources exist | Instruct "I don't know" + verification |
| Inconsistency | Contradicting itself in same response | Compare assertions | Chain-of-thought |
| Extrapolation | Generalizing from limited examples | Evaluate model confidence | Limit prompt scope |
Mitigation strategies
Grounding with RAG
RAG anchors responses in real documents:
- The model cites specific sources
- Information can be verified against original documents
- Reduces (doesn't eliminate) fact fabrication
Prompt design
- Instruct the model to say "I don't know" when it lacks information
- Ask it to cite sources for factual claims
- Use chain-of-thought to make reasoning explicit
- Clearly separate facts from opinions
Post-generation verification
- Secondary models that verify factual claims
- Web search to validate specific claims
- Comparison with structured knowledge bases
Confidence calibration
- Ask the model to indicate its certainty level
- Generate multiple responses and compare consistency
- Detect linguistic patterns associated with hallucinations
Evaluation metrics
- Faithfulness: is the response faithful to the provided context?
- Factuality: are the facts verifiably correct?
- Attribution: are citations real and relevant?
Limitations
No perfect solution exists. Even with RAG, the model can:
- Misinterpret retrieved context
- Combine information in incorrect ways
- Invent details that "complete" the information
Mitigation reduces frequency, it doesn't eliminate the problem.
Why it matters
Hallucinations are the most visible risk of AI systems in production. A model that generates false information with confidence can cause real harm. Mitigation techniques — RAG, grounding, verification — are engineering requirements, not optional improvements.
References
- Survey of Hallucination in Natural Language Generation — Ji et al., 2023.
- FActScore: Fine-grained Atomic Evaluation of Factual Precision — Min et al., 2023.
- A Survey on Hallucination in LLMs — Huang et al., 2023. Comprehensive survey on hallucinations in LLMs.