Abstract
Retrieval-Augmented Generation (RAG) significantly enhances the factual accuracy of Large Language Models (LLMs) by providing external context. However, standard RAG implementations often struggle with "knowledge integration," where irrelevant or noisy retrieved documents override the model's accurate internal knowledge. This paper introduces a Self-Selection RAG framework that empowers an LLM to generate two candidate answers—one based on internal memory and one on retrieved data—and then act as a judge to select the most accurate response. By fine-tuning models using Direct Preference Optimization (DPO) on a custom dataset, we demonstrate that LLMs can become significantly more robust to retrieval noise while improving overall generation performance.
Introduction
In standard RAG systems, external knowledge is appended to the LLM's prompt regardless of whether the retrieved information is actually helpful. This "always-on" approach can introduce irrelevant noise, causing the LLM to hallucinate or ignore its own valid internal (parametric) knowledge. While some "adaptive" RAG systems attempt to solve this by deciding when to retrieve, they often rely on rigid heuristics like token probability or require complex, separate verification modules.
The core challenge addressed here is knowledge integration: how to elegantly empower the LLM itself to holistically weigh its internal knowledge against external retrieved facts without relying on clunky external components. The proposed solution involves a two-part approach: a prompting framework for self-selection and a specialized fine-tuning recipe.
The Self-Selection Framework
The authors propose a multi-stage pipeline designed to make the LLM a discerning consumer of information. Given a user query, the system executes the following steps:
- Internal Generation: The LLM generates an "LLM Answer" and an accompanying explanation using only its internal parametric knowledge.
- Retrieval-Augmented Generation: Simultaneously, a retriever fetches relevant documents. The LLM then generates a "RAG Answer" and explanation based on these documents.
- Self-Selection: The LLM is prompted to evaluate both pairs of answers and explanations, selecting the one it deems most accurate.
Training via Retrieval-Generation Preference (RGP)
Vanilla LLMs often struggle to reliably choose the correct answer between internal and external sources. To address this, the authors developed Self-Selection-RGP (Retrieval-Generation Preference), a fine-tuning method using Direct Preference Optimization (DPO).
Dataset Construction
The authors curated a custom preference dataset of 3,756 pairs (augmented to 21,928 instances) using subsets of WebQuestions, SQuAD 2.0, and SciQ. They used GPT-3.5 to generate internal and RAG answers, filtering for instances where exactly one of the answers was correct. To ensure robustness, they augmented the dataset with "negative" examples—answers from similar but different questions.
Fine-Tuning
Open-source models, specifically Mistral-7B and Llama2-13B, were fine-tuned using DPO. This process taught the models to prefer the correct answer/explanation pair over the incorrect one, effectively training them to be better judges of their own output.
Experimental Results
The framework was evaluated on standard open-domain QA benchmarks, including Natural Questions (NQ) and TriviaQA, using both dense (BGE) and sparse (BM25) retrievers.
- Performance Gains: On TriviaQA, Mistral-7B with Self-Selection-RGP achieved 67.0% accuracy in a zero-shot setting, outperforming the best baseline (SURE) by 5.4 percentage points.
- Robustness to Noise: Unlike standard RAG systems that often degrade when fed too many passages (the "lost in the middle" effect), the Self-Selection method remained stable even as the number of retrieved passages increased to 10.
- Emergent Generation Improvements: Interestingly, training the model to select the right answer also improved its inherent ability to generate better answers from scratch, even when no external knowledge was provided.
Discussion and Limitations
While the Self-Selection framework shows significant promise, it is still bound by the base model's reasoning capacity. If an LLM lacks the fundamental logic to understand a complex question, self-selection cannot fix the error. Error analysis revealed that 51% of failures occurred because neither the internal memory nor the retrieved passages contained the correct answer, highlighting a "lack of evidence" ceiling. Furthermore, roughly 39% of errors were attributed to formatting or logical deduction failures.
Conclusion
The Self-Selection RAG framework provides a robust method for integrating internal and external knowledge. By shifting the LLM's role from a passive recipient of data to an active evaluator, and reinforcing this behavior through DPO, the system achieves state-of-the-art performance in open-domain question answering while remaining agnostic to the specific retriever used.
Summary updated