When to Retrieve: Teaching LLMs to Utilize Information Retrieval Effectively
- Authors: Tiziano Labruna, Jon Ander Campos, Gorka Azkune
- Published: 2024-04-30
- Source: https://arxiv.org/abs/2404.19705
- Category: Research paper — FreshLLM and similar architectures (LLM + large-scale search)
- Enhancing Noise Robustness of Retrieval-Augmented Language Models
- FreshLLMs: Refreshing Large Language Models with Search Engine Augmentation
- Gorilla: Large Language Model Connected with Massive APIs
- Interleaving Retrieval with Chain-of-Thought Reasoning
- Long-form factuality in large language models
- ReSearch: Learning to Reason with Search for LLMs via Reinforcement Learning
- Architecture: retrieve-then-rerank-then-generate remains mainstream, but agentic paradigms are making retrieval frequency and policy itself a learnable decision.
- Cost/latency: adaptive retrieval directly reduces unnecessary queries — a hard constraint in production systems.
- Evaluation: offline metrics like nDCG are diverging from online satisfaction; task success rate and citation accuracy are increasingly relevant for RAG evaluation.
TL;DR
The paper shows that LLMs can learn to call an off-the-shelf information retrieval (IR) system only when additional context is actually needed, rather than retrieving for every question.
Background and Motivation
In large-scale search, recommendation, and personalization systems, RAG pipelines face ongoing challenges around efficiency, scalability, and user intent understanding. Traditional pipelines treat retrieval, ranking, and generation separately, which poorly fits the demands of the LLM era: natural language interaction, multi-hop reasoning, and real-time knowledge.
The key observation: given the performance of modern IR systems, the optimal QA strategy does not always require external retrieval. Prior research has shown on the PopQA dataset that popular questions can be answered well from the LLM's parametric memory, while less popular ones benefit from retrieval.
Method
The authors propose a tailored training approach for LLMs using existing open-domain QA datasets. The LLM is trained to generate a special token, <RET>, when it does not know the answer to a question — signaling that retrieval is needed. The resulting model is called Adaptive Retrieval LLM (Adapt-LLM).
Results
On PopQA, Adapt-LLM improves over the same LLM under three configurations:
1. Retrieving information for all questions 2. Always using the LLM's parametric memory 3. Using a popularity threshold to decide when to retrieve
Analysis shows Adapt-LLM generates <RET> when it determines it cannot answer a question, and achieves notably high accuracy when it chooses to rely only on parametric memory.
Original Abstract (verbatim)
> In this paper, we demonstrate how Large Language Models (LLMs) can effectively learn to use an off-the-shelf information retrieval (IR) system specifically when additional context is required to answer a given question. Given the performance of IR systems, the optimal strategy for question answering does not always entail external information retrieval; rather, it often involves leveraging the parametric memory of the LLM itself. Prior research has identified this phenomenon in the PopQA dataset, wherein the most popular questions are effectively addressed using the LLM's parametric memory, while less popular ones require IR system usage. Following this, we propose a tailored training approach for LLMs, leveraging existing open-domain question answering datasets. Here, LLMs are trained to generate a special token, <RET>, when they do not know the answer to a question. Our evaluation of the Adaptive Retrieval LLM (Adapt-LLM) on the PopQA dataset showcases improvements over the same LLM under three configurations: (i) retrieving information for all the questions, (ii) using always the parametric memory of the LLM, and (iii) using a popularity threshold to decide when to use a retriever. Through our analysis, we demonstrate that Adapt-LLM is able to generate the <RET> token when it determines that it does not know how to answer a question, indicating the need for IR, while it achieves notably high accuracy levels when it chooses to rely only on its parametric memory.