Hallucination (confabulation) is when an LLM generates plausible-sounding but incorrect information. Types: factual hallucination (wrong facts), attribution hallucination (fabricated sources), and faithfulness hallucination (answers not grounded in provided context). Detection: reference-based (compare to ground truth), RAG faithfulness (does answer follow from retrieved context?), semantic entailment. RAGAS framework measures faithfulness, answer relevancy, and context precision.
Each stage in order — click any step to read what it does.
Multi-layer hallucination detection for RAG systems.
The trade-offs worth knowing before you build this.
A RAGAS faithfulness score below 0.80 means 20%+ of your RAG answers contain claims not grounded in retrieved context. This is the most dangerous type of hallucination in production RAG systems.
System prompt: "For each factual claim, cite the source sentence in brackets [1]". Models are much less likely to fabricate claims when forced to provide citations — and citations make hallucination auditable.
Eval set hallucination rates can be low while production rates are high (distribution shift). Sample 100 production responses weekly, run faithfulness eval. Alert on rising trend.
Sign in to share your feedback and join the discussion.