2025-03-10 · 进阶 · 机器学习 · 自然语言处理

SAGE: A Framework of Precise Retrieval for RAG

SAGE是一种针对检索增强生成(RAG)的精确检索框架,通过语义分割、基于梯度的块选择和LLM自我反馈,提高了RAG系统的问答质量和成本效率。

更新于 2025-04-23。作者:Jintao Zhang、Guoliang Li、Jinyang Su。

中文摘要

检索增强生成(RAG)在特定语料库内执行问答(QA)任务方面表现出显著的熟练度。然而,RAG在QA中仍存在许多失败案例。这些失败并非仅归因于大型语言模型(LLMs)的局限性;相反,它们主要源于LLMs由于以下两个局限性而检索到不准确的信息:(1)当前的RAG方法在未考虑语义的情况下对语料库进行分段,由于问题与段落之间的相关性受损,这使得找到相关上下文变得困难。(2)在检索更少的上下文以避免丢失重要上下文和检索到不相关上下文之间存在权衡。在这篇论文中,我们介绍了一个RAG框架(SAGE),以克服这些局限性。首先,为了解决未考虑语义的分段问题,我们提出训练一个语义分段模型。该模型被训练为将语料库分成长度语义完整的段落。其次,为了确保只检索到最相关的段落而忽略不相关的段落,我们设计了一个段落选择算法,根据相关性评分的递减速度动态选择段落,从而实现更相关的选择。第三,为了进一步确保检索段落的精确性,我们提出让LLMs评估检索到的段落是否过多或不足,然后相应地调整上下文的数量。实验表明,SAGE在QA的平均质量上优于基线,提高了61.25%。此外,通过避免检索噪声上下文,SAGE降低了LLMs推理中消耗的令牌成本,平均提高了49.41%的成本效率。此外,我们的工作为提升RAG提供了有价值的见解。

英文摘要

Retrieval-augmented generation (RAG) has demonstrated significant proficiency in conducting question-answering (QA) tasks within a specified corpus. Nonetheless, numerous failure instances of RAG in QA still exist. These failures are not solely attributable to the limitations of Large Language Models (LLMs); instead, they predominantly arise from the retrieval of inaccurate information for LLMs due to two limitations: (1) Current RAG methods segment the corpus without considering semantics, making it difficult to find relevant context due to impaired correlation between questions and the segments. (2) There is a trade-off between missing essential context with fewer context retrieved and getting irrelevant context with more context retrieved. In this paper, we introduce a RAG framework (SAGE), to overcome these limitations. First, to address the segmentation issue without considering semantics, we propose to train a semantic segmentation model. This model is trained to segment the corpus into semantically complete chunks. Second, to ensure that only the most relevant chunks are retrieved while the irrelevant ones are ignored, we design a chunk selection algorithm to dynamically select chunks based on the decreasing speed of the relevance score, leading to a more relevant selection. Third, to further ensure the precision of the retrieved chunks, we propose letting LLMs assess whether retrieved chunks are excessive or lacking and then adjust the amount of context accordingly. Experiments show that SAGE outperforms baselines by 61.25% in the quality of QA on average. Moreover, by avoiding retrieving noisy context, SAGE lowers the cost of the tokens consumed in LLM inference and achieves a 49.41% enhancement in cost efficiency on average. Additionally, our work offers valuable insights for boosting RAG.

解读

一句话总结

SAGE是一种针对检索增强生成(RAG)的精确检索框架,通过语义分割、基于梯度的块选择和LLM自我反馈,提高了RAG系统的问答质量和成本效率。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源