arXiv:2505.06569cs.CLcs.AI2025-05被引 6

提出分层压缩与自适应融合的长文本检索框架,提升多跳推理准确率。

MacRAG: Compress, Slice, and Scale-up for Multi-Scale Adaptive Context RAG

论文配图:MacRAG: Compress, Slice, and Scale-up for Multi-Scale Adaptive Context RAG
图 1 · 摘自论文原文
  • 分层压缩文档为粗粒度到细粒度片段,实现渐进式上下文构建。
  • 在HotpotQA等数据集上,对Llama-3.1-8B等模型均超越基线性能。
  • 适合需要长文档多步推理的智能问答系统开发者使用。

长上下文大语言模型结合检索增强生成(RAG)在复杂多跳和长文档任务中潜力巨大。然而现有RAG系统常面临检索不精准、受限上下文窗口下覆盖不全、上下文碎片化等问题。本文提出多尺度自适应上下文RAG(MacRAG),一种分层框架:将文档压缩并划分为粗到细粒度的片段,再通过实时块级与文档级扩展,自适应融合相关上下文。从最细粒度检索开始,逐步引入更广更高层级的上下文,构建高效、查询相关的长上下文,兼顾精度与覆盖率。在LongBench扩展的HotpotQA、2WikiMultihopQA和Musique数据集上的评估显示,使用Llama-3.1-8B、Gemini-1.5-pro和GPT-4o时,MacRAG在单步与多步生成任务中持续优于基线RAG流水线。结果表明,MacRAG是真实场景中长上下文多跳推理的高效可扩展解决方案。代码已开源:https://github.com/Leezekun/MacRAG。

原文摘要 · Abstract (English)

Long-context large language models (LC LLMs) combined with retrieval-augmented generation (RAG) hold strong potential for complex multi-hop and large-document tasks. However, existing RAG systems often suffer from imprecise retrieval, incomplete context coverage under constrained windows, and fragmented information from suboptimal context construction. We introduce Multi-scale Adaptive Context RAG (MacRAG), a hierarchical RAG framework that compresses and partitions documents into coarse-to-fine granularities, then adaptively merges relevant contexts through real-time chunk- and document-level expansions. By initiating with finest-level retrieval and progressively incorporating broader, higher-level context, MacRAG constructs effective query-specific long contexts, optimizing both precision and coverage. Evaluations on challenging LongBench expansions of HotpotQA, 2WikiMultihopQA, and Musique confirm MacRAG consistently surpasses baseline RAG pipelines in single- and multi-step generation using Llama-3.1-8B, Gemini-1.5-pro, and GPT-4o. Our results establish MacRAG as an efficient, scalable solution for real-world long-context, multi-hop reasoning. Our code is available at https://github.com/Leezekun/MacRAG.

长文本生成多跳推理RAG框架上下文优化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。