Detecting and Measuring Hallucinations
Learn practical techniques to detect when a RAG system invents facts not supported by retrieved context, and how to quantify hallucination rate as part of evaluation.
What Is a RAG Hallucination?
A hallucination is an answer that is fluent and confident but not supported by the retrieved context. In RAG, the cure is grounding: every claim should trace back to a source.
Measuring hallucination rate is essential to trust your system.
Faithfulness vs Correctness
Two different things to measure:
- Faithfulness — is the answer supported by the provided context?
- Correctness — is the answer factually true in the real world?
A RAG answer can be correct but unfaithful (right by luck) or faithful but wrong (the source was wrong).
All lessons in this course
- Key Metrics for RAG Performance
- Developing Evaluation Benchmarks
- A/B Testing and User Feedback Loops
- Detecting and Measuring Hallucinations