KBM : Delineating Knowledge Boundary for Adaptive Retrieval in Large Language Models (2025)

Abstract: Large Language Models (LLMs) often struggle with dynamically changing knowledge and handling unknown static information. Retrieval-Augmented Generation (RAG) is employed to tackle these challenges and has a significant impact on improving LLM performance. In fact, we find that not all questions need to trigger RAG. By retrieving parts of knowledge unknown to the LLM and allowing the LLM to answer the rest, we can effectively reduce both time and computational costs. In our work, we propose a Knowledge Boundary Model (KBM) to express the known/unknown of a given question, and to determine whether a RAG needs to be triggered. Experiments conducted on 11 English and Chinese datasets illustrate that the KBM effectively delineates the knowledge boundary, significantly decreasing the proportion of retrievals required for optimal end-to-end performance. Furthermore, we evaluate the effectiveness of KBM in three complex scenarios: dynamic knowledge, long-tail static knowledge, and multi-hop problems, as well as its functionality as an external LLM plug-in.

## introduction as large language models (llms) evolve, their real-world applications expand, yet they often struggle with dynamically changing and unknown static knowledge, leading to inaccuracies or hallucinations @xcite . retrieval-augmented generation (rag) effectively addresses challenges by retrieving relevant external information in real time, enhancing llms' accuracy. however, it also incurs costs, such as increased retrieval requests and longer response times, leading to the crucial question: when is retrieval truly necessary? a natural criterion for determining the need for retrieval is the confidence level of the llm. specifically, the known knowledge of the model does not the key to implementing this solution is how to enable llm express confidence. a simple and effective solution is to use prompts. unfortunately, over-/under-confidence will affect the expression of confidence @xcite . previous studies on whether rag is required for llm can be divided mainly into two approaches. the first focuses on the question itself, with methods like self-rag @xcite instructing models such as gpt-4 @xcite to assess whether retrieving external documents (e.g., wikipedia) can produce better responses. although this approach can identify questions that require real-time information, it remains model-agnostic and struggles to determine whether an llm has mastered specific knowledge. the second approach evaluates both questions and model responses to determine if an llm can answer a question, generating data by sampling multiple model responses and using manual labels for evaluation @xcite @xcite . however, this method is labor intensive and relies heavily on manual labeling, which can create biases and lead to increased training costs. additionally, the llm's "unknown" expression has not been integrated with rag triggering to assess its impact on end-to-end performance and retrieval ratio. in this work, we propose the knowledge boundary model (kbm) and two solutions for sft based on accuracy and certainty in generating soft labels. the first method evaluates sampled qa accuracy and sets a threshold to classify questions as known or unknown. the second approach is based on certainty, focusing on modeling the entropy values of multiple sampled responses to establish thresholds, distinguishing between known and unknown responses through consistency, without requiring a golden answer. by defining different accuracy and certainty thresholds, we can generate data with soft labels, which is then used to fine-tune the kbm to determine whether the llm considers a question unknown, thus indicating if retrieval is necessary. we evaluate 11 english and chinese qa datasets, demonstrating that kbm effectively measures knowledge mastery in llms. on average in these datasets, the certainty-based approach also reduces the number of retrievals by 13. 5% compared with all rag, resulting in a slightly higher performance of 0.1%. similarly, the accuracy-based approach reduces retrievals by 32.5% on average, with only a 0.39% performance drop. further analysis confirms the effectiveness of kbm in open domains, including dynamic knowledge, long-tail static knowledge, and multi-hop scenarios. our contributions are summarized as follows: ## preliminaries: llm knowledge boundary and rag analysis this section examines the impact of rag on llm performance. we evaluate the knowledge boundaries of llms with different parameter sizes and analyze rag's effects on qa tasks, categorizing questions into three types based on its influence on llm responses. lastly, we introduce sampling methods based on llm accuracy and certainty to further simulate knowledge boundary. ## experiments in this section, we design extensive experiments to verify the effectiveness of kbm. ## related work large language model knowledge exploration. the exploration of knowledge boundary in llms attracts significant attention. @xcite examines the self-evaluation capabilities of llms, showing that larger models enhance their calibration by initially proposing answers and then evaluating their validity. @xcite studies llms' perception of factual knowledge boundary and finds that they often display blind confidence in their abilities. @xcite focuses on selfawareness, demonstrating that while llms can identify some unanswered questions, substantial discrepancies still exist, affecting their uncertainty detection. @xcite introduces coke, an unsupervised method for teaching models to articulate their knowledge limits through internal signals, yielding improved outcomes across various datasets. @xcite points out that llms often default to examples in training data when facing unfamiliar queries. @xcite explores hallucinations related to insufficient prompt context, showing that models frequently fail to recognize inadequate information. retrieval-augmented generation. rag enhances llms by integrating retrieved text passages, significantly improving performance in knowledgeintensive tasks. a key focus is optimizing the timing and strategy of retrieval. @xcite introduce self-rag, a method that trains llms to retrieve information, generate content, and evaluate their outputs using reflection tokens. this method enables the customization of model behavior, demonstrating significant performance improvements over standard rag approaches. @xcite proposes adaptive-rag, which adjusts query handling based on complexity. @xcite explores how llms process erroneous retrieved content. by creating a dataset to assess model responses to incorrect information, the study reveals insights into how models correct their outputs or may perpetuate errors. @xcite conducts a comprehensive study on the retriever's function in rag. ## conclusion in this paper, we propose kbm to address the limitations of llms in managing dynamic knowledge and unknown static information. kbm judges whether to trigger rag by indicating the known and unknown of a question, preserving rag's advantages while reducing computational costs. validated on 11 datasets, kbm matches the performance of all rag while reducing the retrieval ratio, enhancing efficiency in qa tasks without compromising other instruction fine-tuning performance. we also confirm kbm's robustness in complex scenarios, such as dynamic and long-tail knowledge and multi-hop problems, highlighting its effectiveness as an external llm plug-in. our contributions include methods for generating soft labels based on accuracy and certainty, enabling llms to better express their knowledge status.