Exploring Knowledge Boundaries in Large Language Models for Retrieval Judgment

Zhen Zhang, Xinyu Wang, Yong Jiang, Zhuo Chen, Feiteng Mu, Mengting Hu, Pengjun Xie, Fei Huang · OpenReview

Abstract

Large Language Models (LLMs) are increasingly recognized for their practical applications. However, these models often encounter challenges in dynamically changing knowledge, as well as in managing unknown static knowledge. Retrieval-Augmented Generation (RAG) tackles this challenge and has shown a significant impact on LLMs. Actually, we find that the impact of RAG on the question-answering capabilities of LLMs can be categorized into three groups: beneficial, neutral, and harmful. By minimizing retrieval requests that yield neutral or harmful results, we can effectively reduce both time and computational costs, while also improving the overall performance of LLMs. This insight motivates us to differentiate between types of questions using certain metrics as indicators, to decrease the retrieval ratio without compromising performance. In our work, we propose a method that is able to identify different types of questions from this view by training a Knowledge Boundary Model (KBM). 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.

Introduction

Large Language Models (LLMs) have revolutionized natural language processing, yet they remain constrained by their static training data. Retrieval-Augmented Generation (RAG) has emerged as a primary solution, allowing models to access external, up-to-date information. However, the standard "retrieve-for-everything" approach is inefficient. It introduces significant latency and API costs. More critically, it can be detrimental; when a model already possesses accurate internal knowledge, external snippets can introduce noise that leads to "harmful" outcomes where the model's performance actually degrades.

The Knowledge Boundary Problem

The core challenge is defining a model's "knowledge boundary"—the distinction between what it knows and what it doesn't. As shown in Figure 1, universal RAG triggering often includes queries where the model's internal knowledge is sufficient, leading to a high ratio of neutral or harmful impacts. By only triggering RAG for the "Unknown" part of the query space, we can optimize performance and efficiency.

Conceptual comparison of universal RAG vs. selective RAG based on knowledge boundaries.

Methods: The Knowledge Boundary Model (KBM)

To address this, we propose the Knowledge Boundary Model (KBM). The KBM acts as a gatekeeper or router, determining whether a query should be answered directly by the LLM or if it requires external retrieval. The framework consists of three main stages: dataset construction, KBM training, and end-to-end testing.

The KBM framework overview, including dataset construction, model training with soft labels, and end-to-end testing.

Training the KBM involves generating "soft labels" to represent the model's internal state:

  1. Accuracy-based Labels: We sample multiple responses for a question and calculate the average accuracy against a gold standard. High accuracy indicates "Known" status.
  2. Certainty-based Labels: In the absence of gold standards, we measure the entropy of sampled responses. Low entropy (high consistency) serves as a proxy for "Known" knowledge.

Experimental Setup and Datasets

We evaluated the KBM across 11 diverse datasets in English and Chinese, including NaturalQA, TriviaQA, MMLU, and CMMLU. We also tested the model on complex scenarios like FreshQA (dynamic knowledge) and HotpotQA (multi-hop reasoning) to ensure robustness across different knowledge types.

Results and Discussion

Our results demonstrate that the KBM significantly improves efficiency without sacrificing accuracy:

  • Efficiency: The accuracy-based KBM reduced retrieval triggers by 32.5% with a negligible performance drop of 0.39%.
  • Performance: The certainty-based KBM actually outperformed the "All RAG" baseline by 0.1% while reducing retrieval calls by 13.5%, proving that filtering noise is beneficial.
  • Latency: End-to-end testing showed a reduction in average query processing time from 2498ms to 2231ms.
  • Certainty Correlation: We found that certainty (entropy) correlates strongly with accuracy (Pearson coefficient of 0.64), validating its use as a proxy for internal knowledge.

Conclusion

The Knowledge Boundary Model provides a robust mechanism for managing the trade-offs inherent in RAG systems. By accurately identifying when an LLM's internal knowledge is insufficient, KBM reduces computational overhead and mitigates the negative impact of retrieval noise. Future work will focus on expanding KBM to more diverse tasks like creative writing and coding, and improving post-retrieval integration logic.

Summary updated

BibTeX
@misc{zhang2024exploring,
  author = {Zhen Zhang and Xinyu Wang and Yong Jiang and Zhuo Chen and Feiteng Mu and Mengting Hu and Pengjun Xie and Fei Huang},
  title = {{Exploring Knowledge Boundaries in Large Language Models for Retrieval Judgment}},
  year = {2024},
  eprint = {2411.06207},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2411.06207},
}
Figure