CompactRAG: Reducing LLM Calls and Token Overhead in Multi-Hop Question Answering
Hao Yang, Zhiyu Yang, Xupeng Zhang, Wei Wei, Yunjie Zhang, Lin Yang
TL;DR
CompactRAG addresses inefficiency in multi-hop QA by decoupling offline corpus preprocessing from online reasoning. It builds an atomic QA knowledge base offline using an LLM and a lightweight online pipeline that resolves queries through dependency-ordered sub-questions, an Answer Extractor, and a Sub-Question Rewriter, with the LLM invoked only twice per query. Experiments on HotpotQA, 2WikiMultiHopQA, and MuSiQue show competitive accuracy while significantly reducing token consumption compared with iterative RAG baselines, validating its cost-efficient design. The offline knowledge base quality, especially when built with a stronger reader (e.g., GPT-4), further boosts online reasoning performance. Overall, CompactRAG demonstrates a practical path to scalable, cost-effective multi-hop reasoning over large knowledge bases.
Abstract
Retrieval-augmented generation (RAG) has become a key paradigm for knowledge-intensive question answering. However, existing multi-hop RAG systems remain inefficient, as they alternate between retrieval and reasoning at each step, resulting in repeated LLM calls, high token consumption, and unstable entity grounding across hops. We propose CompactRAG, a simple yet effective framework that decouples offline corpus restructuring from online reasoning. In the offline stage, an LLM reads the corpus once and converts it into an atomic QA knowledge base, which represents knowledge as minimal, fine-grained question-answer pairs. In the online stage, complex queries are decomposed and carefully rewritten to preserve entity consistency, and are resolved through dense retrieval followed by RoBERTa-based answer extraction. Notably, during inference, the LLM is invoked only twice in total - once for sub-question decomposition and once for final answer synthesis - regardless of the number of reasoning hops. Experiments on HotpotQA, 2WikiMultiHopQA, and MuSiQue demonstrate that CompactRAG achieves competitive accuracy while substantially reducing token consumption compared to iterative RAG baselines, highlighting a cost-efficient and practical approach to multi-hop reasoning over large knowledge corpora. The implementation is available at GitHub.
