Abstract
Large Language Models (LLMs) often struggle with metacognition—the ability to accurately assess their own knowledge boundaries. This failure is frequently rooted in deep-seated biases toward specific response tokens rather than a lack of underlying knowledge. We introduce Debiased Historical In-Context Learning (DH-ICL), a method that reframes self-assessment as a pattern-matching task. By leveraging a model's own history of successes and failures and applying a novel bias calibration technique, DH-ICL enables more reliable "Active Retrieval" in RAG systems, triggering external searches only when truly necessary.
Introduction
In the context of Retrieval-Augmented Generation (RAG), "Active Retrieval" (AR) is essential for balancing performance and cost. An ideal AR system queries the LLM's internal knowledge first: if the model knows the answer, it responds directly; otherwise, it triggers an external search. However, LLMs are notoriously poor at identifying their own limits. They often exhibit "prior cognitive biases"—for example, Llama-2-7B has a massive statistical preference for the token "true," while the 13B version prefers "false," regardless of factual accuracy. Existing solutions often require expensive, domain-specific auxiliary classifiers.
Methodology: Debiased Historical In-Context Learning (DH-ICL)
The proposed DH-ICL approach shifts the paradigm from abstract "reflection" to concrete "comparison" using three core components:
- Historical Response Logs: The system maintains a record of the model’s past performance. Questions where the model's output matched the ground truth are logged as "known" (true), while others are "unknown" (false).
- Historical In-Context Learning (ICL): For a new query, the system retrieves the $k$ most similar historical instances. These serve as few-shot examples, framing the task as a structured pattern-recognition problem: "In the past, you knew X but did not know Y."
- Historical Bias Calibration: To counteract the model's inherent token preferences, the system calculates a "bias offset" based on logit deviations in historical examples. This offset is applied to the current query's logits to produce a debiased final decision.
Experimental Evaluation
The researchers evaluated DH-ICL across four diverse Question Answering (QA) benchmarks: TriviaQA (general knowledge), WebQuestions (search-based), and TAQA/FreshQA (time-sensitive). They also introduced the KB-SAT (Knowledge Boundary Self-Assessment Test Set), a balanced dataset specifically designed to measure self-assessment accuracy.
The Token Preference Trap
A key finding is that LLM self-assessment is heavily influenced by the specific labels used in the prompt. Shifting from "true/false" to "yes/no" or "1/2" significantly alters the model's prediction distribution, even when the underlying knowledge remains constant.
Key Results and Insights
- Efficiency and Performance: On TriviaQA, DH-ICL allowed Llama-2-7B to match the performance of an "Always-Retrieve" strategy while reducing retrieval calls by 50%.
- Benchmarking: DH-ICL significantly outperformed non-training baselines like FLARE and matched the performance of state-of-the-art training-based methods (e.g., UAR) without requiring any fine-tuning.
- Robustness: The method proved effective even with random historical examples, suggesting that the "exemplar-driven" framing is the primary driver of success.
Conclusion and Future Work
DH-ICL demonstrates that treating self-awareness as a pattern-matching task is more effective than relying on an LLM's abstract reasoning. While the current method requires a "warm-up" phase to build historical logs, it offers a training-free path to more reliable metacognition. Future research will focus on automating the validation of historical logs and managing "knowledge drift" in dynamic, time-sensitive environments.
Summary updated