0Pricing
LLM Apps in Production (RAG + Vector DB + Caching) · Lesson

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

  1. Key Metrics for RAG Performance
  2. Developing Evaluation Benchmarks
  3. A/B Testing and User Feedback Loops
  4. Detecting and Measuring Hallucinations
← Back to LLM Apps in Production (RAG + Vector DB + Caching)