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.


翻译:检索增强生成已成为知识密集型问答的关键范式。然而,现有的多跳RAG系统效率低下,因为它们在每一步交替进行检索与推理,导致重复的大语言模型调用、高昂的令牌消耗以及跨跳间不稳定的实体定位。我们提出了CompactRAG,一个简单而有效的框架,将离线语料库重构与在线推理解耦。在离线阶段,一个大语言模型一次性读取语料库并将其转换为原子化的问答知识库,该知识库以最小化、细粒度的问答对形式表示知识。在线阶段,复杂查询被分解并经过精心重写以保持实体一致性,随后通过密集检索和基于RoBERTa的答案提取来解决。值得注意的是,在推理过程中,无论推理跳数多少,大语言模型总共仅被调用两次——一次用于子问题分解,一次用于最终答案合成。在HotpotQA、2WikiMultiHopQA和MuSiQue上的实验表明,与迭代式RAG基线相比,CompactRAG在显著降低令牌消耗的同时实现了具有竞争力的准确率,凸显了在大规模知识语料库上进行多跳推理的一种高成本效益且实用的方法。实现代码已在GitHub上开源。

0
下载
关闭预览

相关内容

图增强生成(GraphRAG)
专知会员服务
34+阅读 · 2025年1月4日
【KDD2024教程】RAG遇上LLMs:迈向检索增强的大语言模型
专知会员服务
67+阅读 · 2024年9月7日
RAG 与 LLMs 的结合 - 迈向检索增强的大型语言模型综述
专知会员服务
100+阅读 · 2024年5月13日
【WWW2024】元认知检索-增强大型语言模型
专知会员服务
50+阅读 · 2024年2月26日
读扩散?写扩散?推拉架构一文搞定!
架构师之路
17+阅读 · 2019年2月1日
论文浅尝 | 常识用于回答生成式多跳问题
开放知识图谱
16+阅读 · 2018年11月24日
NLP-Progress记录NLP最新数据集、论文和代码: 助你紧跟NLP前沿
中国人工智能学会
12+阅读 · 2018年11月15日
NLG ≠ 机器写作 | 专家专栏
量子位
13+阅读 · 2018年9月10日
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员