RAG 2.0谷歌RICHES:边检索、边思考、边生成
来源:互联网
时间:2026-08-20 14:44:20
先说说RAG技术这几年走过的路。早期的RAG系统,从检索器到生成器,每个模块单看都不错,但拼到一起效果就大打折扣——问题出在系统层面缺乏整体优化。Contextual.ai提出的RAG 2.0正是为了解决这个痛点,它将预训练、微调和对齐作为一个
单一的集成系统
而就在这个方向上,
Google DeepMind
RICHES
不需要单独的检索器和生成器
检索键

上面这张图展示了RICHES在处理
多跳查询
把整个工作流程拆解来看,其实并不复杂:
选择一个合适的预训练LLM作为起点。
定义好检索键的格式,比如用文档标题、段落、句子或命题。
用FM-Index等技术为语料库建索引,提升检索效率。
接收用户输入的问题。
LLM交替进行自由文本生成和受限的检索键生成。
生成过程中,利用索引对检索键施加约束,确保每个键都能对应到语料库中的有效文档。
根据生成的检索键,从语料库中拉取相关文档。
将检索内容与已生成的文本整合,输出最终答案。
用F1、AutoAIS等指标评估效果。
根据评估结果继续迭代优化。
再来看看它的核心原理,有几个关键设计值得关注:
检索与生成的深度融合。
检索键的定义也很巧妙。
概率模型的更新。
约束束解码是核心引擎。
FM-Index实现高效约束。
自适应束大小。
多种索引策略。
效果怎么样?从公开的实验数据来看,RICHES在开放领域问答(
归因问答、多跳问答和检索思考
多跳问答任务

从上图可以看出,RICHES在综合性能上明显优于密集检索方案。在单跳问答任务上也有优势,但它真正的杀手锏还是在于多跳场景——不需要迭代多次检索,一次解码就能完成。

再来看一个迭代检索的具体输出示例,备注部分已经用(# 评论)做了注释,能更直观地看到模型是如何一步步完成推理的。

另外,不同索引策略和束大小的影响也值得关注:
命题(Proposition)检索键
附录
以下是RICHES在少样本提示中使用的模板示例,供参考。
多跳问答的Few-shot Prompt模板
For given input query, write 1-3 passages to answer the query. Write a hint keyword and a passage
contained within « and ». A passage must be a complete sentence and not a phrase. It must contain
complete context for answering the query and should not begin with it, he, they etc. Do not repeat any
passages. Aim for new keywords.
question: The football manager who recruited Cristiano Ronaldo managed Manchester United during
what timeframe?
passage: keyword: Cristiano Ronaldo’s recruiting manager « Alex Ferguson recruited Cristiano Ronaldo »
keyword: Sir Alex Ferguson’s tenure at Manchester United « Sir Alex Ferguson managed Manchester
United from 1986 to 2013. »
answer: 1986 to 2013
question: Were Eatza Pizza and Your Pie founded in the same state?
passage: keyword: Eatza Pizza founded in state « Eatza Pizza was founded in Arizona » keyword: Your
Pie founded in state « Your Pie was founded in Athens, Georgia »
answer: no
question: In which stadium do the teams owned by Myra Kraft’s husband play?
passage: keyword: Myra Kraft’s husband « Robert Kraft’s wife is Myra Kraft. » keyword: Robert Kraft’s
team « Robert Kraft is the owner of the New England Patriots. » keyword: New England Patriots stadium
« Gillette Stadium is the home of the New England Patriots. »
answer: Gillette Stadium
question:
passage: 单跳问答的Few-shot Prompt模板
For given input query, write 1-3 passages to answer the query. Write a hint keyword and a passage
contained within « and ». A passage must be a complete sentence and not a phrase. It must contain
complete context for answering the query and should not begin with it, he, they etc. Do not repeat any
passages. Aim for new keywords.
question: who is the owner of phoenix mall pune?
passage: keyword: Phoenix Market City owner « Phoenix Market City is developed by Phoenix Mills
Limited. »
answer: Phoenix Mills Limited
question: what brings in more money nba or nfl?
passage: keyword: NFL revenues « NFL revenues are well over $10 billion per season. » keyword: NBA
revenue « NBA amasses about $6 billion annually. »
answer: NFL
question: when was the french national anthem adopted?
passage: keyword: French national anthem « La Marseillaise became the national anthem of France. »
keyword: La Marseillaise adoption « La Marseillaise was adopted by France in 1795. »
answer: 1795
question: question
passage:从命题中提取答案的Few-shot Prompt模板
Answer the ’question’ only based on the given ’passage’. If the ’passage’ lacks context or is not relevant,
say ’Cannot answer’ else say generate a short answer. Do not answer the query from outside the scope of
the passage.
question: what brings in more money nba or nfl?
passage: NFL revenues are well over $10 billion per season. NBA amasses about $6 billion annually.
answer: NFL
question: when did they put warnings on cigarette packs
passage: Tobacco packaging 1978’s warning was not removed, so now every cigarette pack contains both
warnings (one on each lateral).
answer: Cannot Answer
question: when was the french national anthem adopted?
passage: La Marseillaise became the national anthem of France. La Marseillaise was adopted by France
in 1795.
answer: 1795
question: question
passage: passage
answer:最后补充一点关于约束解码过程的细节。给定前缀“Joker is played by”,续接词“Nolan”在语料库中未被找到,因此会被模型屏蔽掉。这种对束搜索的精细控制,正是RICHES能准确检索并生成的关键。
https://arxiv.org/pdf/2407.00361
From RAG to RICHES: Retrieval Interlaced with Sequence Generation
Google Deepmind -
- 关于宇宙的好的网名有哪些
- 角色扮演 | 1
- 网名