Retrieval-Augmented Generation (RAG) improves Large Language Models (LLMs) by retrieving supporting documents into the prompt, but existing methods do not explicitly target queries that require fetching multiple documents with substantially different content. Such multi-aspect queries are challenging because relevant documents can be far apart in embedding space, making joint retrieval difficult. We introduce Multi-Head RAG (MRAG), which addresses this gap with a simple yet powerful idea: using Transformer multi-head attention activations rather than the standard decoder-layer embedding, as retrieval keys. It leverages the observation that different heads capture different semantic aspects. This yields multi-aspect embeddings for both documents and queries, improving retrieval accuracy on complex queries. We show MRAG's design advantages over 18 RAG baselines, up to 20% higher retrieval success ratios for real-world use cases, and improved downstream LLM generation. MRAG integrates seamlessly with existing RAG frameworks and benchmarks.


翻译:检索增强生成(RAG)通过将支持性文档检索至提示中,改进了大语言模型(LLMs)的性能,但现有方法并未明确针对需要获取内容差异显著的多个文档的查询。此类多维度查询具有挑战性,因为相关文档在嵌入空间中可能相距甚远,使得联合检索变得困难。我们提出了多头检索增强生成(MRAG),它通过一个简单而强大的思想来解决这一不足:使用Transformer多头注意力激活而非标准的解码器层嵌入作为检索键。该方法利用了不同注意力头捕获不同语义维度的观察结果。这为文档和查询生成了多维度嵌入,从而提高了复杂查询的检索准确性。我们展示了MRAG相较于18个RAG基线模型的设计优势,在真实应用场景中检索成功率提升高达20%,并改善了后续LLM的生成质量。MRAG能够与现有的RAG框架和基准测试无缝集成。

0
下载
关闭预览

相关内容

检索增强生成(RAG)与推理的协同作用:一项系统综述
专知会员服务
34+阅读 · 2025年4月27日
多模态检索增强生成综述
专知会员服务
40+阅读 · 2025年4月15日
多模态检索增强生成的综合综述
专知会员服务
44+阅读 · 2025年2月17日
迈向可信的检索增强生成:大语言模型综述
专知会员服务
30+阅读 · 2025年2月12日
定制化大型语言模型的图检索增强生成综述
专知会员服务
38+阅读 · 2025年1月28日
《大型语言模型中基于检索的文本生成》综述
专知会员服务
60+阅读 · 2024年4月18日
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
VIP会员
相关VIP内容
检索增强生成(RAG)与推理的协同作用:一项系统综述
专知会员服务
34+阅读 · 2025年4月27日
多模态检索增强生成综述
专知会员服务
40+阅读 · 2025年4月15日
多模态检索增强生成的综合综述
专知会员服务
44+阅读 · 2025年2月17日
迈向可信的检索增强生成:大语言模型综述
专知会员服务
30+阅读 · 2025年2月12日
定制化大型语言模型的图检索增强生成综述
专知会员服务
38+阅读 · 2025年1月28日
《大型语言模型中基于检索的文本生成》综述
专知会员服务
60+阅读 · 2024年4月18日
相关基金
国家自然科学基金
3+阅读 · 2017年12月31日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2014年12月31日
国家自然科学基金
13+阅读 · 2014年12月31日
国家自然科学基金
6+阅读 · 2014年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员