Introduction
Uncertainty Estimation (UE) serves as a critical "check engine light" for Large Language Models (LLMs), signaling when a model is likely to hallucinate. While UE is well-established for "closed-book" scenarios, its application in Retrieval-Augmented Generation (RAG) remains problematic. Current methods often fail to account for how external context should logically influence model confidence. This paper introduces an axiomatic framework to define correct uncertainty behavior in RAG and proposes a calibration function to improve reliability.
The Challenge: Confidence Bias in RAG
The primary issue identified is a "confidence bias." Existing UE methods tend to increase model confidence simply because any context is provided, regardless of its relevance or accuracy. For instance, if a retrieved document contradicts an LLM's internal knowledge, a robust system should signal higher uncertainty. Instead, many models become more certain, creating a dangerous gap between confidence and correctness.
An Axiomatic Framework for RAG Uncertainty
To address this, the researchers established five formal axioms that any effective UE method should satisfy when moving from a no-RAG to a RAG configuration:
- Positively Consistent: Uncertainty should decrease if the answer remains correct and the context supports it.
- Negatively Consistent: Uncertainty should increase if the answer remains the same but the context contradicts it.
- Positively Changed: Uncertainty should decrease if the context helps correct a previously wrong answer.
- Negatively Changed: Uncertainty should increase if the context causes the model to change a right answer to a wrong one.
- Neutrally Consistent: Uncertainty should remain unchanged if the context is irrelevant.
Experimental Setup
The study evaluated these axioms across three major benchmarks: Natural Questions (NQ-open), TriviaQA, and PopQA (focused on long-tail entities). Testing involved Llama2-chat 7B and Mistral-7B models paired with various retrieval strategies, including BM25, Contriever, and specialized Rerankers.
Key Findings: The "Context Trap"
A significant discovery was that irrelevant documents (Doc-) often reduce uncertainty scores in current methods without improving accuracy. This confirms that UE methods are biased toward the presence of context rather than its logical content. Furthermore, state-of-the-art methods like Semantic Entropy almost universally fail Axioms 2 and 4—the "negative" cases where the model should ideally be more cautious.
Proposed Solution: Axiomatic Calibration
To rectify these failures, the authors propose an Axiomatic Calibration Function. This post-hoc adjustment uses Natural Language Inference (NLI) models—specifically MiniCheck—to score the relationship between the query, context, and response. This score is then used to scale the original uncertainty estimate, aligning it with the defined axioms.
Results
- AUROC Improvements: Calibration significantly boosted the Area Under the Receiver Operating Characteristic (AUROC). For example, Semantic Entropy on TriviaQA improved from 73.4 to 79.8 AUROC.
- Robustness: The calibrated scores often outperformed "No-Doc" baselines, effectively filtering the noise introduced by retrieval processes.
Conclusion and Future Work
Uncertainty in RAG is not just a statistical byproduct of token probabilities; it is a logical relationship between internal model states and external evidence. While the proposed calibration offers a "free lunch" improvement without retraining, future research should focus on developing UE methods that inherently obey these axioms during generation. Additionally, extending this framework to long-form generation remains a key challenge for the field.
Summary updated