A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models
作者: Wenqi Fan, Yujuan Ding, Liangbo Ning, Shijie Wang, Hengyun Li, Dawei Yin, Tat-Seng Chua, Qing Li
分类: cs.CL, cs.AI, cs.IR
发布日期: 2024-05-10 (更新: 2024-06-17)
备注: This is the long version of the corresponding survey paper accepted by KDD2024
🔗 代码/项目: PROJECT_PAGE
💡 一句话要点
综述检索增强大语言模型(RA-LLMs):利用外部知识提升生成质量
🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)
关键词: 检索增强生成 大型语言模型 知识库 自然语言处理 人工智能生成内容
📋 核心要点
- 大型语言模型(LLMs)存在幻觉和知识过时的问题,限制了其在知识密集型任务中的应用。
- 检索增强生成(RAG)通过检索外部知识库,为LLMs提供最新的辅助信息,从而增强生成质量。
- 本综述从架构、训练策略和应用三个角度,全面回顾了检索增强大语言模型(RA-LLMs)的研究进展。
📝 摘要(中文)
检索增强生成(RAG)作为人工智能领域最先进的技术之一,能够提供可靠且最新的外部知识,为众多任务带来极大的便利。特别是在人工智能生成内容(AIGC)时代,RAG在提供额外知识方面的强大能力使得它能够辅助现有的生成式AI产生高质量的输出。最近,大型语言模型(LLMs)在语言理解和生成方面展示了革命性的能力,但仍然面临着诸如幻觉和过时的内部知识等固有局限性。鉴于RAG在提供最新和有用的辅助信息方面的强大能力,检索增强大型语言模型(RA-LLMs)应运而生,它利用外部权威知识库,而不是仅仅依赖于模型的内部知识,来增强LLMs的生成质量。本综述全面回顾了现有的RA-LLMs研究,涵盖了三个主要技术视角:架构、训练策略和应用。作为预备知识,我们简要介绍了LLMs的基础和最新进展。然后,为了说明RAG对LLMs的实际意义,我们系统地回顾了主流的相关工作,按照它们的架构、训练策略和应用领域进行分类,详细说明了每种方法的挑战以及RA-LLMs的相应能力。最后,为了提供更深入的见解,我们讨论了当前的局限性以及未来研究的几个有希望的方向。
🔬 方法详解
问题定义:论文旨在解决大型语言模型(LLMs)在生成内容时存在的幻觉问题和知识更新滞后的问题。现有的LLMs依赖于其内部参数存储知识,这导致它们难以处理需要最新或特定领域知识的任务,并且容易产生不准确或虚假的信息。
核心思路:论文的核心思路是利用检索增强生成(RAG)框架,将LLMs与外部知识库连接起来。通过检索与输入相关的外部知识,并将这些知识融入到LLMs的生成过程中,从而提高生成内容的准确性和可靠性。这种方法允许LLMs在生成时动态地获取和利用最新的信息,而无需重新训练模型。
技术框架:RA-LLMs的整体框架通常包含以下几个主要模块:1) 检索模块:负责从外部知识库中检索与输入相关的文档或信息片段。2) 知识融合模块:将检索到的知识与原始输入进行融合,形成包含上下文信息的增强输入。3) 生成模块:利用LLMs对增强输入进行处理,生成最终的输出。这个过程通常涉及对LLMs的微调或提示工程,以使其更好地利用检索到的知识。
关键创新:该综述的关键创新在于系统性地梳理了RA-LLMs领域的研究进展,并从架构、训练策略和应用三个维度对现有方法进行了分类和分析。它突出了不同RA-LLMs方法的优缺点,并指出了未来研究的潜在方向。与以往的综述相比,该综述更加关注RAG在解决LLMs固有局限性方面的作用。
关键设计:RA-LLMs的关键设计包括:1) 检索策略:如何选择合适的检索算法和知识库,以确保检索到相关且高质量的知识。2) 知识融合方法:如何将检索到的知识有效地融入到LLMs的输入中,例如通过拼接、注意力机制或更复杂的编码器-解码器结构。3) 训练目标:如何设计合适的损失函数,以鼓励LLMs更好地利用检索到的知识,并减少幻觉的产生。这些设计通常需要根据具体的应用场景和LLMs的特性进行调整。
🖼️ 关键图片
📊 实验亮点
该综述总结了RA-LLMs在不同应用场景下的性能表现,强调了RAG在提升LLMs生成质量方面的显著作用。虽然具体性能数据未在摘要中给出,但综述强调了RA-LLMs在减少幻觉、提高知识准确性方面的优势,并对比了不同架构和训练策略的效果。
🎯 应用场景
RA-LLMs在多个领域具有广泛的应用前景,包括问答系统、文本摘要、内容创作、代码生成等。通过利用外部知识,RA-LLMs可以生成更准确、更可靠、更具创造性的内容,从而提高生产效率和用户体验。未来,RA-LLMs有望成为构建下一代智能应用的关键技术。
📄 摘要(原文)
As one of the most advanced techniques in AI, Retrieval-Augmented Generation (RAG) can offer reliable and up-to-date external knowledge, providing huge convenience for numerous tasks. Particularly in the era of AI-Generated Content (AIGC), the powerful capacity of retrieval in providing additional knowledge enables RAG to assist existing generative AI in producing high-quality outputs. Recently, Large Language Models (LLMs) have demonstrated revolutionary abilities in language understanding and generation, while still facing inherent limitations, such as hallucinations and out-of-date internal knowledge. Given the powerful abilities of RAG in providing the latest and helpful auxiliary information, Retrieval-Augmented Large Language Models (RA-LLMs) have emerged to harness external and authoritative knowledge bases, rather than solely relying on the model's internal knowledge, to augment the generation quality of LLMs. In this survey, we comprehensively review existing research studies in RA-LLMs, covering three primary technical perspectives: architectures, training strategies, and applications. As the preliminary knowledge, we briefly introduce the foundations and recent advances of LLMs. Then, to illustrate the practical significance of RAG for LLMs, we systematically review mainstream relevant work by their architectures, training strategies, and application areas, detailing specifically the challenges of each and the corresponding capabilities of RA-LLMs. Finally, to deliver deeper insights, we discuss current limitations and several promising directions for future research. Updated information about this survey can be found at https://advanced-recommender-systems.github.io/RAG-Meets-LLMs/