TLDR: HIRAG is a new instruction fine-tuning method for Retrieval-Augmented Generation (RAG) models. It introduces a “think before answering” strategy by developing three hierarchical abilities: filtering, information combination, and RAG-specific reasoning. This approach uses multi-level progressive chain-of-thought to enhance how RAG models utilize external knowledge, leading to significant performance improvements across various question-answering datasets.
Retrieval-Augmented Generation, or RAG, has become a cornerstone in helping large language models (LLMs) tackle real-time information and specialized topics. It’s designed to reduce common issues like models making up facts and to give them access to the most current data by adding an information retrieval step.
However, traditional RAG systems often hit roadblocks. They heavily rely on the LLM’s ability to learn from examples given in the moment, but there hasn’t been enough focus on what specific skills the RAG generation model itself needs. This can lead to problems when the retrieved documents are of poor quality or the retrieval system isn’t perfect. Even when models are fine-tuned for RAG, they often lack a detailed focus on RAG tasks or a deeper use of step-by-step thinking processes.
Introducing HIRAG: A New Approach to RAG
To address these challenges, researchers have proposed a new method called Hierarchical-Thought Instruction-Tuning Retrieval-Augmented Generation, or HIRAG. This innovative approach suggests that RAG models should develop three progressively advanced abilities, adopting a “think before answering” strategy. This method significantly boosts the model’s capacity to use external knowledge effectively by employing a multi-level, progressive chain-of-thought.
The Three Hierarchical Abilities
HIRAG focuses on enhancing three core capabilities within RAG models:
1. Filtering: This is the model’s ability to sift through noisy or irrelevant information and pinpoint the direct, useful details needed to answer a question. It’s about distinguishing between what’s helpful and what’s just clutter, even when information is thematically similar but not directly relevant.
2. Combination: Moving beyond just filtering, this ability allows the model to synthesize and merge relevant information from multiple documents or different parts of a single document. It’s crucial for tasks that require gathering various pieces of data to form a complete answer, such as combining attributes of a single entity or details about multiple entities.
3. RAG-Specific Reasoning: Once the model can filter and combine information, this advanced ability comes into play. It involves processing external knowledge using the model’s internal understanding to arrive at an answer, especially when the information isn’t directly stated. This can involve:
- Comparative Reasoning: Comparing several items based on attributes provided indirectly in documents.
- Deductive Reasoning: Inferring specific attributes from general statements found in the documents.
- Causal Reasoning: Identifying implicit or explicit cause-and-effect relationships within the text.
How HIRAG is Trained
HIRAG employs a supervised fine-tuning approach that uses a progressive chain-of-thought method. This means the model is trained on tasks that gradually increase in complexity: starting with filtering, then moving to filtering with combination, and finally to filtering with combination and RAG-specific reasoning. Each stage has its own tailored chain-of-thought process, guiding the model to learn from simpler to more complex tasks.
The training data is carefully constructed. Queries are generated to specifically target each RAG task (filtering, combination, reasoning). Then, a “thought process” and an answer are created, guiding the model step-by-step through the document to reach the solution. Crucially, noisy or irrelevant documents are also included during training. This helps the model learn to ignore distractions and focus on relevant information, making it more robust in real-world scenarios.
Also Read:
- Unlocking Advanced AI Reasoning: A New Framework for Smarter Language Models
- Uni-RAG: A New AI Framework for Multi-Modal Learning in STEM Education
Impressive Results
Experiments show that HIRAG significantly improves model performance across a variety of datasets, including RGB, PopQA, MuSiQue, HotpotQA, and PubMedQA. Notably, HIRAG models, even those similar in size to Llama models, often achieve results comparable to or even better than much larger models like GPT-4 and Llama3-70B-Instruct. This superior performance extends to Chinese datasets as well, confirming the robustness of the approach.
Ablation studies, which test the impact of different components, confirmed that introducing combination and RAG-specific reasoning datasets significantly enhances the model’s overall capabilities. The optimal balance was found to be a 1:2:2 ratio of Filtering, Combination, and RAG-specific reasoning data.
In conclusion, HIRAG offers a novel and effective way to enhance RAG models by focusing on granular, hierarchical abilities and a progressive chain-of-thought. This approach promises more accurate and contextually relevant responses from LLMs when dealing with external information. You can read the full research paper here.


