HallucinationDetector.ai

RAG Hallucination Detector for Grounded Answers

Measure whether retrieval-augmented generation answers stay strictly faithful to retrieved passages and catch extrinsic drift.

EX-02 · RAG GROUNDING
Samples:
Draft Under Inspection · Inline Claim Markup

In Varghese v. China Southern Airlines Co. Ltd., 925 F.3d 1339 (11th Cir. 2019), the court held that the Montreal Convention two-year statute of limitations is tolled during an automatic bankruptcy stay.

A subsequent review by Martinez & Patel (2024), Nature Vol. 628, DOI 10.1038/s41586-024-99104-x reported that retrieval grounding eliminates 99.4% of factual errors across legal filings.

By contrast, in Moffatt v. Air Canada, 2024 BCCRT 149, the British Columbia Civil Resolution Tribunal held an airline liable for negligent misrepresentation after its support chatbot invented a bereavement-fare policy.

+ Optional Source Context: Attach retrieved passages to check strict RAG faithfulness
96 / ~1,000 words
HIGH
4 Claims 2 Fabricated 1 Unsupported 1 Grounded
Interactive Sample · Live Engine Coming Soon
Struck · Fabricated Caseverdict_source: docket_index
Varghese v. China Southern Airlines, 925 F.3d 1339 (11th Cir. 2019)
No matching 11th Circuit opinion at 925 F.3d 1339. Documented fabricated citation from Mata v. Avianca, Inc., 678 F. Supp. 3d 443 (S.D.N.Y. 2023).
Struck · Fake DOIverdict_source: citation_index
Martinez & Patel (2024), Nature Vol. 628, DOI 10.1038/s41586-024-99104-x
DOI does not resolve in Crossref registry; no Nature Vol. 628 article by these authors exists.
Query · Unsupported Statverdict_source: claim_check
"retrieval grounding eliminates 99.4% of factual errors across legal filings"
Attributed to a non-existent study. Stanford RegLab (2024) still measured 17% to 33% error rates on legal RAG tools.
Grounded · Primary Recordverdict_source: public_record
Moffatt v. Air Canada, 2024 BCCRT 149
Verified against Civil Resolution Tribunal of British Columbia decision 2024 BCCRT 149 (February 14, 2024).
Interactive sample desk active · Live custom-text API activates once route is enabled No signup wall · Claim-by-claim reasoning · Primary-sourced methodology
Indexed reference cards and document trays representing RAG retrieval grounding
RAG faithfulness checks verify every generated claim against the exact retrieved context chunks.

Retrieval Failure vs Generation Faithfulness

Retrieval-augmented generation cuts open-world memory errors, but it does not eliminate hallucinations. When a RAG application returns a wrong answer, engineers must separate two distinct bugs: retrieval failure (the vector or hybrid index failed to fetch the right passage) and faithfulness failure (the right passage was in the prompt, yet the model contradicted it or invented extra details from parametric memory).

A RAG hallucination detector evaluates the second stage: given the exact retrieved chunks and the generated response, is every atomic claim entailed by the context? Measuring faithfulness separately from retrieval recall lets teams fix chunking and reranking without guessing.

Test the RAG Drift sample in our Hallucination Detector workbench, compare NLI methods on our LLM hallucination detector page, and review specialized RAG evaluators in Vectara HHEM alternative and how to reduce AI hallucinations.

Production RAG Faithfulness Checklist

Implement these five controls to measure and reduce RAG hallucinations in production:

  1. Decompose answers into atomic claims: Score entailment per claim rather than per full response so a single fabricated number in a long answer is never diluted.
  2. Enforce inline chunk citations: Require the generator to cite chunk IDs ([C1], [C2]) and verify that each cited chunk actually entails the attached sentence.
  3. Add an explicit abstention path: Instruct the model to state when retrieved chunks do not contain the answer instead of bridging gaps from pretraining memory.
  4. Run an inline NLI guardrail: Score faithfulness with a fast cross-encoder (such as Vectara HHEM) before streaming high-stakes customer or enterprise answers.
  5. Log low-faithfulness traces to CI evals: Feed flagged production traces back into a regression dataset so prompt and model updates never silently raise drift.

Common RAG Hallucination Modes

Four faithfulness failures that appear even when retrieval recall is high:

Flagged PatternWhy Models Produce ItPrimary Verification Step
Extrinsic metric inventionChunk gives total revenue; model invents regional split or NRRClaim-level NLI flags neutral/unentailed sentence against context
Chunk blendingModel merges Policy A's deadline with Policy B's exceptionPer-chunk citation verification checks each clause against its tagged chunk
Negation flipChunk says 'not eligible after 30 days'; summary drops the negationContradiction classifier catches polarity inversion
Stale parametric overrideModel ignores updated price in chunk and outputs memorized old priceStrict context-only prompt + faithfulness score threshold

Faithfulness Does Not Fix Bad Source Documents

Verification Boundary

A 100% faithful RAG answer built on an outdated or contradictory wiki page is still wrong in the real world. Pair faithfulness scoring with document freshness hygiene.

High faithfulness scores only prove alignment with the retrieved context, not ground truth. Maintain document timestamps, deprecate stale knowledge-base articles, and filter expired policies at retrieval time.

Compare enterprise RAG monitoring platforms in our Galileo AI alternative and Vectara alternative guides.

Related Reading

Frequently Asked Questions

Does RAG completely eliminate AI hallucinations?
No. Stanford RegLab (2024) documented 17% to 33% hallucination rates even in specialized legal RAG systems; RAG reduces errors but requires faithfulness verification.
What is the difference between faithfulness and answer relevance in RAG?
Faithfulness measures whether the answer sticks strictly to retrieved context, while relevance measures whether the answer actually addresses the user's question.
Which open-source metrics measure RAG hallucination?
Vectara HHEM, RAGAS faithfulness, and DeBERTa-based NLI cross-encoders are widely used open-source baselines for measuring context grounding.
How do I stop a RAG model from using outside memory?
Combine explicit abstention instructions, lower temperature, mandatory chunk citations, and a post-generation NLI entailment check.
Can RAG hallucinate when retrieval returns zero relevant chunks?
Yes, that is one of the highest-risk moments. Set a minimum retrieval similarity threshold and trigger a clean fallback message when no relevant context is found.