Thrust: Adaptively Propels Large Language Models with External Knowledge

Xinran Zhao, Hongming Zhang, Xiaoman Pan, Wenlin Yao, Dong Yu, Jianshu Chen

Abstract

While Retrieval-Augmented Generation (RAG) has become the standard for grounding Large Language Models (LLMs) in factual data, it introduces significant computational overhead and the risk of "mispriming"—where irrelevant retrieved information degrades model performance. We present Thrust, a lightweight metric within the IAPEK (Instance-level Adaptive Propulsion of External Knowledge) framework. Thrust utilizes the internal geometry of a model's hidden states to determine, on-the-fly, whether external knowledge is required for a specific query. Our results demonstrate that Thrust improves average performance by 26% across diverse tasks while minimizing retrieval noise and latency.

1. Introduction

Large Language Models often struggle with factual accuracy and hallucinations. Retrieval-Augmented Generation (RAG) addresses this by providing models with external context. However, current RAG implementations typically follow a "retrieve-always" policy, which is inefficient and often counterproductive. If a model already possesses the internal knowledge to answer a query, providing additional, potentially noisy snippets can confuse the model—a phenomenon known as the "misprime" effect.

To address this, we introduce Thrust, a gatekeeping mechanism that measures a model's internal "knowledgeability" regarding a specific instance before triggering a retrieval call. This adaptive approach ensures that external knowledge is only sought when the model's internal representations indicate uncertainty.

2. The Problem: Efficiency and Noise

Standard RAG systems face two primary challenges:

  1. Computational Efficiency: Searching massive vector databases for every single query is resource-intensive and introduces latency.
  2. The Misprime Effect: For high-capacity models (e.g., OPT-175B), adding retrieved knowledge can sometimes turn a correct internal answer into an incorrect augmented one. Irrelevant or misleading retrieved text can distract the model from its own accurate internal weights.

3. Methodology: The Thrust Metric

Unlike traditional methods that rely on output confidence or keyword matching (like BM25), Thrust analyzes the internal geometry of the LLM.

3.1 Intuition and Mechanism

The core hypothesis is that a model's ability to categorize information in its hidden layers serves as a proxy for its knowledge. If a model has mastered a topic, its internal hidden states for related concepts will cluster together.

The IAPEK framework operates in three stages:

  • Calibration: The system uses a small sample (approximately 200 instances) of a task to map hidden representations.
  • Clustering: K-means clustering identifies centroids for these representations within the model's latent space.
  • Scoring: For any new query, the Thrust score is calculated based on the distance and direction of the query's hidden state relative to these established centroids.

3.2 Lightweight Design

Thrust is designed for high-speed inference. Computing the score takes an average of 0.001 seconds per query. This overhead is negligible compared to the time required for database retrieval, making it a highly efficient filter for RAG pipelines.

4. Experimental Setup

We evaluated Thrust across 12 knowledge-intensive datasets, categorized into:

  • Multiple-Choice Classification: AGNews, e-SNLI, StrategyQA, CIKQA, BoolQ, and ARC (Easy/Challenge).
  • Open-domain QA: HotpotQA, Natural Questions (NQ), Web Questions, Curated TREC, and TriviaQA.

The framework was tested across several LLM architectures, including T5, GPT-J, OPT, and UnifiedQA, to ensure cross-model robustness.

5. Key Results and Insights

5.1 Performance and Robustness

Implementing Thrust as a retrieval trigger resulted in a 26% average performance improvement across 88% of the evaluated tasks compared to "naive" RAG (retrieving for every query). The metric proved most effective when using the model's final layers, which contain the most task-specific signals.

5.2 Resource Scarcity Scenarios

In tests where retrieval was limited by budget (e.g., only allowing retrieval for 25% of queries), Thrust-guided models frequently outperformed models that retrieved for 100% of queries. By intelligently selecting which queries required external help, Thrust filtered out the "noise" for easy questions while reserving resources for difficult ones.

5.3 Task Sensitivity

Our analysis revealed that open-domain QA tasks (like TriviaQA) consistently yield low Thrust scores, confirming that these tasks almost always require external knowledge. Conversely, classification tasks often show higher Thrust scores, indicating that models can frequently handle these tasks using internal knowledge alone.

6. Limitations and Future Work

While Thrust offers a significant advancement in adaptive RAG, it has specific requirements:

  • White-Box Access: Thrust requires access to internal hidden states, making it currently incompatible with "black-box" APIs (e.g., GPT-4) unless a smaller proxy model is used for estimation.
  • Cold Start: The requirement for 200 labeled examples for calibration presents a minor barrier to zero-shot deployment. Future research into meta-learning may alleviate this.
  • Temporal Knowledge: Thrust measures if a model thinks it knows an answer, but it does not account for time-sensitive facts (e.g., current political leaders). Integrating a temporal sensitivity component is a planned area for future development.

7. Conclusion

Thrust provides a robust, mathematically grounded method for adaptive retrieval. By treating a model's internal representational power as a proxy for knowledge, IAPEK allows LLMs to navigate the tradeoff between internal expertise and external augmentation, leading to more accurate and efficient AI systems.

Summary updated

BibTeX
@inproceedings{zhao2023thrust,
  author = {Xinran Zhao and Hongming Zhang and Xiaoman Pan and Wenlin Yao and Dong Yu and Jianshu Chen},
  title = {{Thrust: Adaptively Propels Large Language Models with External Knowledge}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2023},
  url = {https://openreview.net/forum?id=x9FOu3W6iy},
}
Figure