arXiv:2411.00744cs.DBcs.CL2024-11中稿 · ICDE 2026被引 8

用智能搜索优化检索增强生成,让大模型更准更省

CARROT: A Learned Cost-Constrained Retrieval Optimization System for RAG

  • 用蒙特卡洛树搜索找最优文档块顺序,考虑内容关联性
  • 不硬耗尽预算,而是根据实际效果提前停止,提升质量30%
  • 能自动适配不同问题类型,适合需要高精度的场景

大语言模型在生成和推理任务中表现优异,但难以处理最新知识,易产生错误或幻觉。检索增强生成(RAG)通过从外部知识中检索并整合信息来缓解此问题。由于大模型上下文窗口限制及长文本幻觉问题,通常只检索最相关的“片段”。然而现有RAG系统面临三大挑战:(1) 片段独立检索,忽略冗余与顺序关系;(2) 片段效用非单调,增加片段反而降低质量;(3) 检索策略无法适应不同查询特性。为此,我们设计了一种成本约束的检索优化框架。采用基于蒙特卡洛树搜索(MCTS)的策略,寻找最优片段组合顺序,考虑片段间相关性。针对效用非单调问题,不以预算耗尽为终止条件,而是设计效用计算策略,识别最优片段组合而不必用完预算。此外,提出配置代理,预测每类查询的最佳配置,提升框架自适应性与效率。实验表明,相较基线模型最高提升达30%,验证了该框架的有效性、可扩展性与适用性。代码已开源:https://github.com/wang0702/CARROT。

原文摘要 · Abstract (English)

Large Language Models (LLMs) have demonstrated impressive ability in generation and reasoning tasks but struggle with handling up-to-date knowledge, leading to inaccuracies or hallucinations. Retrieval-Augmented Generation (RAG) mitigates this by retrieving and incorporating external knowledge into input prompts. In particular, due to LLMs' context window limitations and long-context hallucinations, only the most relevant "chunks" are retrieved. However, current RAG systems face three key challenges: (1) chunks are often retrieved independently without considering their relationships, such as redundancy and ordering; (2) the utility of chunks is non-monotonic, as adding more chunks can degrade quality; and (3) retrieval strategies fail to adapt to the unique characteristics of different queries. To overcome these challenges, we design a cost-constrained retrieval optimization framework for RAG. We adopt a Monte Carlo Tree Search (MCTS) based strategy to find the optimal chunk combination order, which considers the chunks' correlations. In addition, to address the non-monotonicity of chunk utility, instead of treating budget exhaustion as the termination condition, we design a utility computation strategy to identify the optimal chunk combination without necessarily exhausting the budget. Furthermore, we propose a configuration agent that predicts optimal configurations for each query domain, improving our framework's adaptability and efficiency. Experimental results demonstrate up to a 30% improvement over baseline models, highlighting the framework's effectiveness, scalability, and suitability. Our source code has been released at https://github.com/wang0702/CARROT.

RAG检索优化大模型

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