arXiv:2410.05983cs.CLcs.AI2024-10ICLR被引 165

长上下文大模型在RAG中检索越多信息,反而越差,因包含干扰项。

Long-Context LLMs Meet RAG: Overcoming Challenges for Long Inputs in RAG

  • 通过重排检索结果,不训练即可提升效果。
  • 引入特定微调方法,显著改善生成质量。
  • 适合需要处理长文档的问答与知识增强场景。

检索增强生成(RAG)使大语言模型能利用外部知识源。随着大模型处理更长输入序列能力的提升,提供更多检索信息以增强生成输出成为可能。理论上,更大的检索集应包含更多相关文本(更高召回率),从而提升性能。然而,我们的实证发现,对于许多长上下文大模型,生成质量随检索段落数增加先升后降。本文探究该现象,识别出检索到的“难负样本”是关键负面因素。为缓解此问题并提升长上下文大模型在RAG中的鲁棒性,我们提出无需训练和需训练两类方法。首先展示检索重排作为简单而有效的无训练优化策略。此外,探索基于大模型隐式微调及包含中间推理的面向RAG的微调方法,证明其可带来显著性能提升。最后,系统分析了这些训练方法的设计选择,包括数据分布、检索器选择和训练上下文长度。

原文摘要 · Abstract (English)

Retrieval-augmented generation (RAG) empowers large language models (LLMs) to utilize external knowledge sources. The increasing capacity of LLMs to process longer input sequences opens up avenues for providing more retrieved information, to potentially enhance the quality of generated outputs. It is plausible to assume that a larger retrieval set would contain more relevant information (higher recall), that might result in improved performance. However, our empirical findings demonstrate that for many long-context LLMs, the quality of generated output initially improves first, but then subsequently declines as the number of retrieved passages increases. This paper investigates this phenomenon, identifying the detrimental impact of retrieved "hard negatives" as a key contributor. To mitigate this and enhance the robustness of long-context LLM-based RAG, we propose both training-free and training-based approaches. We first showcase the effectiveness of retrieval reordering as a simple yet powerful training-free optimization. Furthermore, we explore training-based methods, specifically RAG-specific implicit LLM fine-tuning and RAG-oriented fine-tuning with intermediate reasoning, demonstrating their capacity for substantial performance gains. Finally, we conduct a systematic analysis of design choices for these training-based methods, including data distribution, retriever selection, and training context length.

RAG长上下文检索增强微调

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