游乐游手机版
首页/AI热点日报/热点详情

RichRAG框架:为用户提供更丰富全面且令人满意的回答

类型:热点整理2026-07-17
检索增强生成(RAG)技术能够帮助大语言模型借助外部检索到的可靠信息,生成更精准、更可信的答案。然而,现有研究大多集中于那些需要简洁明确答案的特定问题——例如“巴黎是哪个国家的首都”这一类。实际上,用户的真实需求往往复杂多样,他们真正渴望的是丰富、全面且深入的解答。举个例子,当用户询问“如何提升团队

检索增强生成(RAG)技术能够帮助大语言模型借助外部检索到的可靠信息,生成更精准、更可信的答案。然而,现有研究大多集中于那些需要简洁明确答案的特定问题——例如“巴黎是哪个国家的首都”这一类。实际上,用户的真实需求往往复杂多样,他们真正渴望的是丰富、全面且深入的解答。举个例子,当用户询问“如何提升团队协作效率”时,背后可能涉及沟通工具选择、会议制度优化、目标对齐方法等多个维度,每个维度都需要充分展开才能让用户满意。

RichRAG框架:为用户提供丰富全面且令人满意的回答

为了解决这一重要但尚未被充分关注的难题,研究团队提出了RichRAG框架。该框架包含三个核心模块:

  • 子方面探索器:自动识别输入问题背后可能涉及的各个子方面。
  • 多方面检索器:针对这些子方面,从外部知识库中拉取多样化的相关文档,构建候选池。
  • 生成式列表智能排序器:这是最关键的一环,它从候选池里筛选出最有价值的文档,并为最终生成器排好顺序。

在框架的底层,排序器模块还设有独立的训练阶段。下面这张图展示了RichRAG的整体架构。

RichRAG整体框架

1 问题定义

在标准的RAG设定中,我们有一个知识库C、一个固定检索器R和一个固定的大语言模型G作为生成器。对于多方面的查询q,它下属的子方面集合记为S={s₁, …, sₙ},每个子方面对应一个子回答A={a₁, …, aₙ}。RichRAG的目标是让生成的最终回答r不仅与真实答案匹配,还要全面覆盖各个子回答,确保回答既丰富又完整。

2 子方面探索器

利用大语言模型构建一个子方面探索器E,它的任务是根据用户输入的查询q,预测出该查询可能包含的子方面。输入的提示词pₛₑ加上用户查询q,就能输出一系列子方面。

3 多方面检索器

有了子方面列表后,多方面检索器便开始工作。它针对每个子方面分别检索文档,然后把所有检索到的文档合并到一起,形成一个多样化的候选文档池。这样就能保证涵盖各个维度的信息。

4 生成式列表智能排序器

候选池中的文档数量通常不少,但最终输入生成器的文档是有限的,因此需要从中选出最有价值的那些。为此,设计了一个基于生成模型的排名模型。它接收用户查询、已识别的子方面和所有候选文档,直接输出一个顶级文档ID的排名列表。排名器的优化分两步走:监督式微调和强化学习。

4.1 监督式微调

使用贪婪算法构建一个“银牌”目标排名列表,用于监督式微调。具体来说,通过一个覆盖效用函数,测量每个剩余文档能为整体答案带来多少增量覆盖面——也就是越能补充尚未覆盖的子方面,文档的排名就越靠前。

4.2 强化学习

为了探索更好的排名可能性,进一步引入了强化学习。这里用最终回答的质量作为排名列表的奖励信号,并采用直接偏好优化(DPO)算法来训练排名器。同时,还设计了单边重要性采样策略(US3)来构建更有价值的训练样本,让模型学会区分“好排名”和“坏排名”。

实验结果

在两个公开数据集上的实验结果表明,RichRAG框架能够有效地为用户提供全面且令人满意的回答。下表展示了所有模型的总体结果(最佳结果加粗,次佳结果加下划线)。

所有模型总体结果

进一步地,在不同子方面数量的子集实验中,RichRAG框架在所有子集上都优于所有基线模型。这充分说明了框架在多样化搜索场景中的鲁棒性。

子集实验结果

Prompt模板:方面标注与子答案拆分

为了支持实验,研究人员设计了一个用于标注查询方面并将长答案拆分为对应子答案的Prompt模板。其核心是让大模型根据给定的查询和长格式答案,自动生成通用的查询方面(query-facets),并将答案按顺序切分为与方面一一对应的子答案。模板要求方面必须足够通用,不能包含答案中的具体信息,且子答案拼接起来必须能还原完整原答案。

Your task is to adjust the results of query-facets mining. The query-facets are extensions of the original query in various generic perspectives, rather than some specific facts. Given a query that requires information from multiple query-facets, you should return all query-facets of the query to fully answer it query. Note that each query has at least two query-facets. I will give you the long-form answer to the original query to help you explore query-facets based on the perspectives of its answer. But refrain from using the additional information from the answer to generate the query-facets. Then you should segment the original long-form answer into several sub-answers that each are paired with a query-facet. Please return each query-facet of the original query and its corresponding sub-answers. The query-facets and sub-answers should be one-to-one and returned in JSON format. You need to follow the following rules:
1. The answers are only used to help you determine the generic direction. You mustn’t generate query-facets based on the contents of answers and the facets mustn’t contain the answers’ additional information beyond the input query.
2. Sub-answers are constructed by segmenting the original answer, you cannot generate or reorder the original answer to create sub-answers.
3. The sub-answers should be complete. You must ensure that when the sub-answers are joined together in order, the complete original answer should be formed.
4. The generated query-facets should be sufficiently generic and contain no specific information about the sub-answers.
5. **You should ensure that generated query-facets cover all perspectives original answer.**
6. **You should ensure that all sub-answers cover all contents of the original answer.**
7. **The number of query surfaces must range from 2 to 7.**
8. **You should ensure that each query-facet is sufficiently generic and can be easily derived from the original query.**
9. **You should ensure each query-facet contains no information from the answer.**
10. **You should rewrite or combine the query-facets to be more generic if some query-facets do not meet the above requirements.**
11. The returned results should be in JSON format and contain the following key: results, which is a list of JSON data. Each item of results should contain the following keys: query-facet, and sub-answer.
12. I will give you some demonstrations, you should learn the pattern of them to mine query-facets and split sub-answers.

**Demonstration**
{demonstrations}

Query: {query}
Answer: {answer}
Results:

论文链接:https://arxiv.org/pdf/2406.12566

来源:https://www.53ai.com/news/RAG/2024062071942.html

相关热点

继续查看同栏目近期热点。

延伸阅读

补充最近整理过的热点入口。