A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models

本文是LLM系列文章,针对《A Survey on RAG Meeting LLMs: Towards Retrieval-Augmented Large Language Models》的翻译。

摘要

作为 AI 中最先进的技术之一,检索增强生成 (RAG) 可以提供可靠和最新的外部知识,为众多任务提供巨大的便利。特别是在 AI 生成内容 (AIGC) 时代,在提供额外知识方面的强大检索能力使 RAG 能够协助现有的生成式 AI 生成高质量的输出。最近,大型语言模型 (LLM) 在语言理解和生成方面表现出革命性的能力,但仍然面临固有的限制,例如幻觉和过时的内部知识。鉴于 RAG 在提供最新和有用的辅助信息方面的强大能力,RetrievalAugmented Large Language Models (RA-LLM) 应运而生,它利用外部和权威知识库,而不是仅仅依赖模型的内部知识,来提高 LLM 的生成质量。在本次调查中,我们全面回顾了 RA-LLM 的现有研究,涵盖三个主要技术视角:架构、训练策略和应用。作为初步知识,我们简要介绍了 LLM 的基础和最新进展。然后,为了说明 RAG 对 LLM 的实际意义,我们按架构、训练策略和应用领域系统地回顾了主流相关工作,具体详细说明了每个工作的挑战以及 RA-LLM 的相应能力。最后,为了提供更深入的见解,我们讨论了当前的局限性和未来研究的几个有前途的方向。有关此调查的最新信息,请访问 https:// advanced-recommendersystems.github.io/ RAG-Meets-LLMs/

1 引言

2 背景

### Standard RAG Overview Standard RAG, or Retrieval-Augmented Generation, integrates retrieval-based and generative models to improve the performance of large language models (LLMs). This approach leverages external knowledge sources during inference by retrieving relevant documents from a corpus before generating responses. The process enhances model accuracy while mitigating issues like hallucinations found in purely generative approaches[^1]. In standard RAG systems, two main components work together: #### Document Retriever Component The document retriever selects pertinent passages based on input queries using techniques such as dense vector representations or sparse term matching algorithms. These selected pieces serve as context for subsequent generation tasks. #### Text Generator Component Once appropriate contexts are retrieved, they feed into a pre-trained LLM that generates coherent text considering both query inputs and provided evidence. By conditioning output probabilities according to fetched information, generated texts become more factual and aligned with available data. However, implementing this method comes with challenges including lower precision/recall rates when selecting fragments, potential mismatches between retrieved content and produced answers, along with difficulties maintaining logical flow across integrated sections[^2]. Despite these obstacles, research continues towards refining mechanisms within RAG frameworks aiming at overcoming existing limitations. ```python def rag_pipeline(query): # Step 1: Retrieve relevant documents retrieved_docs = retrieve_documents(query) # Step 2: Generate response conditioned on retrieved docs response = generate_response(retrieved_docs, query) return response ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

UnknownBody

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值