检索增强生成(Retrieval-Augmented Generation, RAG)的理论综述:演进、架构范式与未来方向

摘要

检索增强生成(Retrieval-Augmented Generation, RAG)作为大语言模型(Large Language Models, LLMs)与外部知识库融合的关键技术,近年来在自然语言处理、智能问答、知识密集型任务中展现出显著优势。本文系统梳理了RAG的发展脉络,从其基本原理出发,深入剖析其核心架构范式——朴素RAG、高级RAG与模块化RAG,并对当前主流评估体系与基准测试进行批判性分析。通过整合近五年内高影响力文献,本文揭示了RAG在可解释性、动态知识更新、多模态融合及系统鲁棒性方面的关键挑战,并提出面向未来的“可配置-可验证-可部署”三位一体发展路径。研究结论表明,RAG不仅是提升LLMs知识能力的有效手段,更正在重塑人机交互范式,为构建可信、高效、可持续的下一代AI系统提供理论基础与技术框架。

关键词:检索增强生成;大语言模型;知识增强;信息检索;生成模型;评估基准;模块化架构;可解释性;未来方向

1. 引言:从静态知识到动态认知的范式跃迁

随着大语言模型(LLMs)在文本生成、对话理解、代码补全等任务中取得突破性进展,其固有的局限性也日益凸显。尽管这些模型在训练过程中吸收了海量互联网数据,但其知识具有明显的“静态性”和“滞后性”[1]。一旦模型训练完成,其内部知识便固定不变,无法实时响应新事件、新发现或特定领域的新知识。此外,模型可能因训练数据偏差而产生幻觉(hallucination),即生成看似合理实则错误的信息,严重威胁其在医疗、金融、法律等高风险场景中的可靠性 [2]。这一系列问题催生了“知识增强型生成”的研究热潮,而检索增强生成(Retrieval-Augme

Spring AI之检索增强生成(Retrieval Augmented Generation, RAG) 当用户提问时,QuestionAnswerAdvisor 会从向量数据库检索与问题相关的文档,并将结果附加到用户输入中,为 AI 生成回复提供上下文。Spring AI 提供了基于模块化架构的 RetrievalAugmentationAdvisor ,支持开箱即用的常见 RAG 流程。默认情况下,若未检索到相关文档,模型将拒绝回答。功能:根据文档与查询的相关性对列表重新排序,将最相关文档置于顶部,解决中间迷失问题。功能:移除不相关或冗余文档,解决中间迷失问题 和模型上下文长度限制。 阅读详情

相关推荐

10、论文笔记:Retrieval-Augmented Generation for Large Language Models: A Survey(RAG调查)

RAG调研

weixin_44986037的博客 1999

【论文精读(GraphRAG 综述)】Graph Retrieval-Augmented Generation: A Survey

该论文系统综述了 GraphRAG(图检索增强生成)技术,探讨其如何通过知识图谱(KG)结构信息提升大语言模型(LLM)的推理准确性与可解释性。文章涵盖 GraphRAG 的工作流程、核心技术、应用场景及未来挑战,适合从事 LLM 与知识图谱融合研究的读者参考。

2301_79985417的博客 1539

Retrieval-Augmented Generation for Large Language Models: A Survey

09.结论本文的总结如图7所示,突显了RAG在增强LLM能力方面的重大进步,这是通过将语言模型中的参数化知识与外部知识库中广泛的非参数化数据整合实现的。我们的调查展示了RAG技术的演变及其对知识密集型任务的影响。我们的分析勾勒出RAG框架内的三种发展范式:初级RAG、高级RAG、模块化RAG,每一种都比上一种有所进步。高级RAG范式通过纳入复杂的架构元素,如查询重写、块重新排序和提示摘要,超越了初级RAG。这些创新带来了更为细致和模块化的架构,增强了LLM的性能和可解释性。

weixin_43564920的博客 2465

一文读懂「RAG,Retrieval-Augmented Generation」检索增强生成

检索增强生成(RetrievalAugmentedGeneration),简称RAG,已经成为当前最火热的LLM应用方案。它是一个为大模型提供外部知识源的概念,这使它们能够生成准确且符合上下文的答案,同时能够减少模型幻觉。知识的局限性:模型自身的知识完全源于它的训练数据,而现有的主流大模型(ChatGPT、文心一言、通义千问…)的训练集基本都是构建于网络公开的数据,对于一些实时性的、非公开的或离线的数据是无法获取到的,这部分知识也就无从具备。幻觉问题。

女王の专属领地 1万+

SPAD单光子雪崩二极管:从基础原理到前沿应用

本文深入解析SPAD单光子雪崩二极管的基础原理、硬件实现关键及核心性能参数,并探讨其在激光雷达、量子通信和生物医学成像等前沿领域的创新应用。SPAD凭借超高灵敏度和精确的时间分辨率,正在推动自动驾驶、量子技术和医学诊断等领域的革命性发展。

weixin_30335575的博客 667

Anaconda安装教程傻瓜教程

网上好多教程找的我心好累,为了方便新手安装,我这边整理了大致详细的教程,参考了好几个大佬的教程,废话不多说,直接开始~ **前言:**有人纠结先安装python还是安装anaconda,这边的建议是装anaconda,就不需要单独装python了。 其次,有小伙伴的Anaconda的安装分两种情况: 情况一:电脑现在没有装python或者现在装的可以卸载掉(装Anaconda时先卸python); 情况二:电脑目前装了python,但想保留它;

zlc2351951436的博客 5万+

PCB工艺-SI9000使用教程

本文介绍了阻抗计算工具SI9000的使用方法,重点讲解了微带线与带状线的区别、共面阻抗概念及参考面选择。通过USB差分走线实例,详细说明了如何选择计算模型、填写参数并确定线宽线距。文章还提供了层叠设计资料和工厂常规阻抗表格作为参考,建议制板时标注需控阻抗的线路供板厂调整。最后简单提及了嘉立创阻抗计算工具作为备选方案。

weixin_50120208的博客 2042

ASPP - 空洞空间金字塔池化

文章目录1 空洞卷积1.1 空洞卷积的理解1.1.1 一维1.1.2 二维1.2 空洞卷积的优劣2. ASPP3. 代码 1 空洞卷积 1.1 空洞卷积的理解 1.1.1 一维 (a) 正常卷积:输入特征 Input feature,kernel = 3,stride = 1,pad = 1,输出特征 Output feature。 (b) 空洞卷积:与图 (a) 不同之处在于 pad = 2,同时引入一个 rate = 2(表示卷积核中参数间间隔的超参)。   还可通过下图进一步理解普通卷积与空洞卷

晓野豬 2万+

流体动力学仿真软件:Star-CCM+_(19).软件定制与脚本编写

自定义插件开发可以扩展Star-CCM+的功能,实现特定的仿真需求。插件开发通常需要使用Java语言,并且需要对Star-CCM+的API有深入的了解。以下是一个简单的Java插件示例,展示如何创建一个自定义插件来显示仿真项目的信息。// 导入必要的Star-CCM+ API import star . ccm . product . CCMProject;// 自定义插件类 public class CustomPlugin {// 插件主方法 public void run() {

kkchenjj的博客 942

亚马逊跨境电商选品数据分析:Python爬虫实战指南

本文将带领大家构建一套完整的亚马逊选品数据采集与分析系统,使用最新的Python技术栈,从零开始爬取亚马逊商品数据,并进行深度分析。

2201_76125261的博客 307

基于YOLOv8与UI界面的校园垃圾分类督导系统

YOLO(You Only Look Once)是目前最为广泛使用的目标检测算法之一。它通过一次前向传递即完成目标检测,具有极高的速度与效率。YOLOv8是YOLO系列的最新版本,相比于之前的YOLO版本,YOLOv8在速度、精度、检测能力等方面都有了显著的提升。本项目通过结合YOLOv8模型与UI界面,成功实现了校园垃圾分类督导系统。该系统能够自动识别不同类型的垃圾,并通过UI界面实时展示垃圾分类的结果。

YOLO 340

PHP实现获取本机ip及mac地址​(附完整源码)

PHP实现获取本机ip及mac地址​(附完整源码)

希望我的博客,能帮上你解决学习中工作中所遇到的问题 363

jdk-8u144-linux-x64.tar.gz.

该资源为搭建Linux系统Java环境用,资源的后缀为tar.gz格式的压缩包

复分析 阿尔福斯(Ahlfors) 第三版答案 英文

答案分为十章,有部分习题没有答案,全英文复分析阿尔福斯(Ahlfors) 第三版答案

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

上一篇: 量子操作系统:架构、挑战与未来展望
下一篇: BM25及其优化技术的理论综述:从经典信息检索到智能增强系统
andeyeluguo
博客等级 码龄15年 766粉丝 475原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

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

打赏作者

andeyeluguo

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

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

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

打赏作者

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

抵扣说明:

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

余额充值
⌂ 换网址