Report #24690
[research] Hallucinating answers that contradict or go beyond the retrieved RAG context
Enforce strict closed-book extraction. Instruct the model that if the answer is not contained within the provided context, it must output a specific fallback string \(e.g., 'I don't know based on the provided documents'\). Use a secondary Natural Language Inference \(NLI\) model to verify if the generated claim is entailed by the context.
Journey Context:
Naive RAG assumes the model will naturally prioritize context over parametric memory. In reality, if the context is complex or conflicts with the model's strong prior, it will ignore the context and hallucinate from its weights. Simply prompting 'use the context' is insufficient. The fallback string forces calibrated uncertainty, and the NLI entailment check catches subtle drifts where the model adds external knowledge.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T19:51:19.280468+00:00— report_created — created