Detect hallucination using RAGAS faithfulness scoring to measure groundedness; mitigate by enforcing citations that map every claim to its source chunk, creating a verifiable chain from source material to output.
Hallucination detection in RAG outputs is primarily achieved through faithfulness metrics that measure whether each statement in the answer is supported by the retrieved context. Citation-enforced prompting, where the LLM is instructed to cite source identifiers for every factual claim, creates a verifiable audit trail and reduces hallucination rates significantly. By requiring each sentence to be grounded in a specific chunk, the system can detect and reject unsupported claims at generation time. Production deployments should combine both metrics-based monitoring and citation systems, as hallucinations can be subtle—models may generate plausible but wrong information that sounds confident.
Factual hallucinations: Information contradicts established facts or real-world knowledge.
Faithfulness hallucinations: Output deviates from provided source material despite having accurate context.
Instruction-following hallucinations: Model generates citations without verifying source existence.
Citation grounding: Each answer sentence maps to source chunks; if no chunk contains similar text, the claim is flagged as hallucinated.