Report #79995
[frontier] RAG systems generate confident hallucinations when retrieved chunks are contradictory or off-topic
Calculate semantic entropy of retrieved context set using SelfCheckGPT-style consistency checks or embedding variance metrics; if entropy exceeds threshold, abandon retrieval and trigger tool-use \(search API, calculation\) instead of generation
Journey Context:
Standard RAG assumes retrieval quality is binary \(top-k relevance scores\). In production, document sets often contain contradictions, semantic drift, or context that appears relevant by keyword but not meaning. High semantic entropy indicates the context is unreliable for grounding. Instead of feeding garbage to the LLM, agents should recognize epistemic uncertainty and switch modalities to tools with higher reliability. Tradeoff: extra compute for entropy calculation versus avoiding hallucination cascades. Alternative: re-ranking with cross-encoders \(fails to detect internal contradictions within top-k\). This pattern prevents silent failures in legal and medical agent domains where contradictory precedents or outdated guidelines must be detected before reasoning proceeds.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:52:41.042524+00:00— report_created — created