Abstract
Retrieval-Augmented Generation (RAG) has significantly enhanced the factual grounding of Large Language Models (LLMs). However, standard single-round retrieval often fails on complex, multi-hop queries that require synthesizing information from disparate sources. We present IM-RAG (Inner Monologue Retrieval-Augmented Generation), a framework that enables LLMs to perform multi-round retrieval by generating human-like "inner monologues." By employing specialized LoRA adapters and a reinforcement learning-based Progress Tracker, IM-RAG optimizes the retrieval-reasoning chain end-to-end. Our approach achieves state-of-the-art performance on the HotPotQA benchmark, yielding an F1 score of 82.5 and demonstrating superior interpretability through natural language reasoning traces.
1. Introduction
Standard RAG systems typically follow a "one-and-done" pattern: searching a database once and generating an answer. This approach is insufficient for multi-hop reasoning tasks where the answer depends on a sequence of interconnected facts. Existing multi-round systems suffer from three primary hurdles: rigidity in adapting to different IR systems, a representational gap between raw search outputs and LLM context needs, and a lack of end-to-end optimization mechanisms. IM-RAG addresses these challenges by training the LLM to narrate its reasoning process, allowing for adaptive, multi-step retrieval strategies.
2. Methodology
The IM-RAG framework is an LLM-centric architecture consisting of four interactive components:
- The Reasoner (LLM): The core engine utilizing two specialized LoRA adapters. The Questioner adapter generates search queries based on the current inner monologue, while the Answerer adapter produces the final response once sufficient information is gathered.
- The Retriever: A modular Information Retrieval (IR) component (e.g., FAISS) that fetches relevant documents.
- The Refiner: A bridge component based on RankVicuna that reranks and reformats retrieved documents into concise, high-quality passages for the Reasoner.
- The Progress Tracker: A reward mechanism used during training that calculates the similarity between retrieved documents and "golden" support passages to provide mid-step feedback.
2.1 Training Process
The system is optimized in two stages. First, the Questioner is trained via Reinforcement Learning (PPO), using the Progress Tracker to provide rewards for finding relevant passages at each step. Second, the Answerer is trained via Supervised Fine-Tuning (SFT) to generate final answers based on the successful reasoning histories (inner monologues) generated in the first stage.
3. Experimental Results
We evaluated IM-RAG on HotPotQA, a benchmark specifically designed for multi-hop question answering requiring the combination of information from multiple Wikipedia passages.
3.1 Key Findings
- State-of-the-Art Performance: IM-RAG achieved an F1 score of 82.5 and an Exact Match (EM) of 68.4, outperforming previous leaders like COS (81.0 F1) and AISO (80.9 F1). Notably, it significantly outperformed a 4-shot prompted GPT-3.5, which scored only 37.1 F1.
- The Necessity of the Refiner: Ablation studies revealed that without the Refiner component, the system's F1 score plummeted to 48.3. This highlights that LLMs are highly sensitive to the format and relevance of retrieved data.
- Interpretability: By narrating its thoughts, the model provides a natural-language trace of its logic, allowing users to see how it connects disparate facts to reach a conclusion.
4. Conclusion
IM-RAG demonstrates that learning to generate inner monologues is a powerful strategy for mastering complex retrieval tasks. By specializing components through LoRA and providing mid-step rewards via a Progress Tracker, the framework achieves SOTA performance while remaining highly interpretable. Future work will focus on reducing the reliance on human-labeled "golden" data and optimizing inference latency for real-time applications.
Summary updated