RAG 准确率提升体系化方案

摘要

RAG(检索增强生成)受限于大模型固有的随机性与幻觉倾向,无法达到 100% 准确。从检索与生成两端源头抑制错误产生,通过多重校验机制识别并拦截不可靠输出,在极端场景下控制错误扩散。目标并非追求绝对正确,而是将出错概率压缩到可接受范围。

关键词:RAG;准确率保障;混合检索;幻觉检测;阈值控制;人工复核;全链路日志


1 核心认知

RAG 无法实现 100% 准确率4,这是大模型固有的随机性决定的。

1.1 为何不可达

大模型的随机性源于采样解码机制,幻觉则来自训练分布偏差1------二者均为架构级固有属性,调参只能缓解、无法根治。将 temperature 归零仅消除采样扰动,若错误答案在分布中已占高位,贪心解码仍会稳定输出错误结果。

1.2 可行路径

类比物流体系,日均亿级包裹必然存在出错,但通过流程设计将错误率压至极低水平。RAG 同理,正确目标是从工程与业务双维度降低出错概率,而非追逐不可能的零错误。


2 三层落地体系

2.1 架构层

2.1.1 检索侧优化
手段 说明
混合检索 稠密向量捕捉语义、稀疏向量锁定精确匹配,双路融合兼顾两类查询
切片优化 按语义边界切分文档,保留上下文重叠,防止信息碎片化
元数据打标 入库时附加结构化标签(类别/时间/来源),支持按业务场景过滤召回
2.1.2 生成侧控制
手段 说明
提示词约束 限定模型仅依据上下文作答,禁止使用自身知识补充
temperature=0 贪心解码消除采样随机性
输出格式限制 强制输出检索原文的结构化 JSON,阻断自主概括

核心思路:将模型视为不可信的文本处理单元,用结构化契约约束其自由发挥空间。
#mermaid-svg-Vr67BafP48dVetBb{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Vr67BafP48dVetBb .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Vr67BafP48dVetBb .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Vr67BafP48dVetBb .error-icon{fill:#552222;}#mermaid-svg-Vr67BafP48dVetBb .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Vr67BafP48dVetBb .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Vr67BafP48dVetBb .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Vr67BafP48dVetBb .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Vr67BafP48dVetBb .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Vr67BafP48dVetBb .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Vr67BafP48dVetBb .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Vr67BafP48dVetBb .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Vr67BafP48dVetBb .marker.cross{stroke:#333333;}#mermaid-svg-Vr67BafP48dVetBb svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Vr67BafP48dVetBb p{margin:0;}#mermaid-svg-Vr67BafP48dVetBb .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-Vr67BafP48dVetBb .cluster-label text{fill:#333;}#mermaid-svg-Vr67BafP48dVetBb .cluster-label span{color:#333;}#mermaid-svg-Vr67BafP48dVetBb .cluster-label span p{background-color:transparent;}#mermaid-svg-Vr67BafP48dVetBb .label text,#mermaid-svg-Vr67BafP48dVetBb span{fill:#333;color:#333;}#mermaid-svg-Vr67BafP48dVetBb .node rect,#mermaid-svg-Vr67BafP48dVetBb .node circle,#mermaid-svg-Vr67BafP48dVetBb .node ellipse,#mermaid-svg-Vr67BafP48dVetBb .node polygon,#mermaid-svg-Vr67BafP48dVetBb .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-Vr67BafP48dVetBb .rough-node .label text,#mermaid-svg-Vr67BafP48dVetBb .node .label text,#mermaid-svg-Vr67BafP48dVetBb .image-shape .label,#mermaid-svg-Vr67BafP48dVetBb .icon-shape .label{text-anchor:middle;}#mermaid-svg-Vr67BafP48dVetBb .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-Vr67BafP48dVetBb .rough-node .label,#mermaid-svg-Vr67BafP48dVetBb .node .label,#mermaid-svg-Vr67BafP48dVetBb .image-shape .label,#mermaid-svg-Vr67BafP48dVetBb .icon-shape .label{text-align:center;}#mermaid-svg-Vr67BafP48dVetBb .node.clickable{cursor:pointer;}#mermaid-svg-Vr67BafP48dVetBb .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-Vr67BafP48dVetBb .arrowheadPath{fill:#333333;}#mermaid-svg-Vr67BafP48dVetBb .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-Vr67BafP48dVetBb .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-Vr67BafP48dVetBb .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Vr67BafP48dVetBb .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-Vr67BafP48dVetBb .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Vr67BafP48dVetBb .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-Vr67BafP48dVetBb .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-Vr67BafP48dVetBb .cluster text{fill:#333;}#mermaid-svg-Vr67BafP48dVetBb .cluster span{color:#333;}#mermaid-svg-Vr67BafP48dVetBb div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-Vr67BafP48dVetBb .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-Vr67BafP48dVetBb rect.text{fill:none;stroke-width:0;}#mermaid-svg-Vr67BafP48dVetBb .icon-shape,#mermaid-svg-Vr67BafP48dVetBb .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Vr67BafP48dVetBb .icon-shape p,#mermaid-svg-Vr67BafP48dVetBb .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-Vr67BafP48dVetBb .icon-shape .label rect,#mermaid-svg-Vr67BafP48dVetBb .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Vr67BafP48dVetBb .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-Vr67BafP48dVetBb .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-Vr67BafP48dVetBb :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 混合检索 + 切片 + 元数据
检索文档
召回候选
生成侧控制

提示词约束 / T=0 / 结构化输出
可靠输出

图1 架构层保障机制

2.2 防护层

2.2.1 幻觉检测

在输出链路上增设轻量校验模型,逐条比对生成内容与检索原文的匹配程度2------全部有据放行,部分存疑标记,完全无据拒答。

2.2.2 界面溯源

回答同步展示原文引用来源与具体内容,使用户可自主比对验证。将信任关系从"盲信模型"转为"用户可核验"。

2.2.3 关键词校验

面向医疗、法律、金融等高风险行业构建领域词库,命中时校验模型对关键词的解释是否与原文一致,防止关键信息被流畅编造。
#mermaid-svg-flsxNNc5iwPcrvF3{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-flsxNNc5iwPcrvF3 .error-icon{fill:#552222;}#mermaid-svg-flsxNNc5iwPcrvF3 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-flsxNNc5iwPcrvF3 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-flsxNNc5iwPcrvF3 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-flsxNNc5iwPcrvF3 .marker.cross{stroke:#333333;}#mermaid-svg-flsxNNc5iwPcrvF3 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-flsxNNc5iwPcrvF3 p{margin:0;}#mermaid-svg-flsxNNc5iwPcrvF3 .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-flsxNNc5iwPcrvF3 .cluster-label text{fill:#333;}#mermaid-svg-flsxNNc5iwPcrvF3 .cluster-label span{color:#333;}#mermaid-svg-flsxNNc5iwPcrvF3 .cluster-label span p{background-color:transparent;}#mermaid-svg-flsxNNc5iwPcrvF3 .label text,#mermaid-svg-flsxNNc5iwPcrvF3 span{fill:#333;color:#333;}#mermaid-svg-flsxNNc5iwPcrvF3 .node rect,#mermaid-svg-flsxNNc5iwPcrvF3 .node circle,#mermaid-svg-flsxNNc5iwPcrvF3 .node ellipse,#mermaid-svg-flsxNNc5iwPcrvF3 .node polygon,#mermaid-svg-flsxNNc5iwPcrvF3 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-flsxNNc5iwPcrvF3 .rough-node .label text,#mermaid-svg-flsxNNc5iwPcrvF3 .node .label text,#mermaid-svg-flsxNNc5iwPcrvF3 .image-shape .label,#mermaid-svg-flsxNNc5iwPcrvF3 .icon-shape .label{text-anchor:middle;}#mermaid-svg-flsxNNc5iwPcrvF3 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-flsxNNc5iwPcrvF3 .rough-node .label,#mermaid-svg-flsxNNc5iwPcrvF3 .node .label,#mermaid-svg-flsxNNc5iwPcrvF3 .image-shape .label,#mermaid-svg-flsxNNc5iwPcrvF3 .icon-shape .label{text-align:center;}#mermaid-svg-flsxNNc5iwPcrvF3 .node.clickable{cursor:pointer;}#mermaid-svg-flsxNNc5iwPcrvF3 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-flsxNNc5iwPcrvF3 .arrowheadPath{fill:#333333;}#mermaid-svg-flsxNNc5iwPcrvF3 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-flsxNNc5iwPcrvF3 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-flsxNNc5iwPcrvF3 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-flsxNNc5iwPcrvF3 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-flsxNNc5iwPcrvF3 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-flsxNNc5iwPcrvF3 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-flsxNNc5iwPcrvF3 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-flsxNNc5iwPcrvF3 .cluster text{fill:#333;}#mermaid-svg-flsxNNc5iwPcrvF3 .cluster span{color:#333;}#mermaid-svg-flsxNNc5iwPcrvF3 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-flsxNNc5iwPcrvF3 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-flsxNNc5iwPcrvF3 rect.text{fill:none;stroke-width:0;}#mermaid-svg-flsxNNc5iwPcrvF3 .icon-shape,#mermaid-svg-flsxNNc5iwPcrvF3 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-flsxNNc5iwPcrvF3 .icon-shape p,#mermaid-svg-flsxNNc5iwPcrvF3 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-flsxNNc5iwPcrvF3 .icon-shape .label rect,#mermaid-svg-flsxNNc5iwPcrvF3 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-flsxNNc5iwPcrvF3 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-flsxNNc5iwPcrvF3 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-flsxNNc5iwPcrvF3 :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 全部有据
部分无据
完全无据
模型输出
幻觉检测

匹配原文?
放行
标记不确定
拒答
界面溯源 + 关键词校验

图2 防护层校验流程

2.3 兜底机制

2.3.1 阈值控制

对检索相似度设定门槛,低于阈值时直接拒答而非让模型强行生成,阈值通过离线标注与线上 A/B 标定。

2.3.2 人工复核

高风险操作(处方开具、合同条款)在自动回答后增设人工确认环节3,低风险场景放行、高风险场景先进审核队列。

2.3.3 全链路日志

完整记录提问、检索、生成全流程数据,支持问题回溯与错误归因(检索侧 or 生成侧),驱动工程体系持续迭代。
#mermaid-svg-Q433W1Vx0AIGUn0S{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-Q433W1Vx0AIGUn0S .error-icon{fill:#552222;}#mermaid-svg-Q433W1Vx0AIGUn0S .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-Q433W1Vx0AIGUn0S .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-Q433W1Vx0AIGUn0S .marker{fill:#333333;stroke:#333333;}#mermaid-svg-Q433W1Vx0AIGUn0S .marker.cross{stroke:#333333;}#mermaid-svg-Q433W1Vx0AIGUn0S svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-Q433W1Vx0AIGUn0S p{margin:0;}#mermaid-svg-Q433W1Vx0AIGUn0S .label{font-family:"trebuchet ms",verdana,arial,sans-serif;color:#333;}#mermaid-svg-Q433W1Vx0AIGUn0S .cluster-label text{fill:#333;}#mermaid-svg-Q433W1Vx0AIGUn0S .cluster-label span{color:#333;}#mermaid-svg-Q433W1Vx0AIGUn0S .cluster-label span p{background-color:transparent;}#mermaid-svg-Q433W1Vx0AIGUn0S .label text,#mermaid-svg-Q433W1Vx0AIGUn0S span{fill:#333;color:#333;}#mermaid-svg-Q433W1Vx0AIGUn0S .node rect,#mermaid-svg-Q433W1Vx0AIGUn0S .node circle,#mermaid-svg-Q433W1Vx0AIGUn0S .node ellipse,#mermaid-svg-Q433W1Vx0AIGUn0S .node polygon,#mermaid-svg-Q433W1Vx0AIGUn0S .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-Q433W1Vx0AIGUn0S .rough-node .label text,#mermaid-svg-Q433W1Vx0AIGUn0S .node .label text,#mermaid-svg-Q433W1Vx0AIGUn0S .image-shape .label,#mermaid-svg-Q433W1Vx0AIGUn0S .icon-shape .label{text-anchor:middle;}#mermaid-svg-Q433W1Vx0AIGUn0S .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-Q433W1Vx0AIGUn0S .rough-node .label,#mermaid-svg-Q433W1Vx0AIGUn0S .node .label,#mermaid-svg-Q433W1Vx0AIGUn0S .image-shape .label,#mermaid-svg-Q433W1Vx0AIGUn0S .icon-shape .label{text-align:center;}#mermaid-svg-Q433W1Vx0AIGUn0S .node.clickable{cursor:pointer;}#mermaid-svg-Q433W1Vx0AIGUn0S .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-Q433W1Vx0AIGUn0S .arrowheadPath{fill:#333333;}#mermaid-svg-Q433W1Vx0AIGUn0S .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-Q433W1Vx0AIGUn0S .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-Q433W1Vx0AIGUn0S .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Q433W1Vx0AIGUn0S .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-Q433W1Vx0AIGUn0S .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Q433W1Vx0AIGUn0S .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-Q433W1Vx0AIGUn0S .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-Q433W1Vx0AIGUn0S .cluster text{fill:#333;}#mermaid-svg-Q433W1Vx0AIGUn0S .cluster span{color:#333;}#mermaid-svg-Q433W1Vx0AIGUn0S div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:12px;background:hsl(80, 100%, 96.2745098039%);border:1px solid #aaaa33;border-radius:2px;pointer-events:none;z-index:100;}#mermaid-svg-Q433W1Vx0AIGUn0S .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-Q433W1Vx0AIGUn0S rect.text{fill:none;stroke-width:0;}#mermaid-svg-Q433W1Vx0AIGUn0S .icon-shape,#mermaid-svg-Q433W1Vx0AIGUn0S .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-Q433W1Vx0AIGUn0S .icon-shape p,#mermaid-svg-Q433W1Vx0AIGUn0S .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-Q433W1Vx0AIGUn0S .icon-shape .label rect,#mermaid-svg-Q433W1Vx0AIGUn0S .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-Q433W1Vx0AIGUn0S .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-Q433W1Vx0AIGUn0S .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-Q433W1Vx0AIGUn0S :root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;} 是
否
是
否
用户提问
检索相似度 ≥ 阈值?
自动回答
拒绝回答
高风险场景?
人工复核后输出
直接输出
全链路日志

图3 兜底机制决策流程

三层关系:架构层管事前抑制,防护层管事中拦截,兜底层管事后止损。


总结

层级 目标 手段 时机
架构层 降低出错概率 混合检索 / 切片优化 / 元数据 / 生成约束 事前
防护层 校验输出可靠性 幻觉检测 / 界面溯源 / 关键词校验 事中
兜底层 控制错误代价 阈值拒答 / 人工复核 / 全链路日志 事后

承认 RAG 不可能零错误,用三层方案将概率压低、代价兜住,是工程实践的核心答案。


参考文献

1 P. Lewis et al. "Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks." NeurIPS , 2020.

2 S. Chen et al. "SecAlign: Defending Against Prompt Injection with Preference Optimization." ACM CCS , 2025.

3 E. Debenedetti et al. "AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents." NeurIPS Datasets & Benchmarks , 2024.

4 懂王Ai. "RAG 如何保证 100% 准确率." 抖音, 2025.

相关推荐
用户7624117567051 小时前
第十一章 GUI界面编程
python
天天被压力1 小时前
【Python量化实战宝典 #03】指数与板块行情接口全拆解:大盘·行业·概念一键取(Python 可跑)
java·人工智能·python
小马不起床1 小时前
第七阶段:数据存储与部署
数据库·python
SuperHeroWu71 小时前
【HarmonyOS 7】 应用 Agent 接入云 A2A 与端 A2A 的实践详解
ai·harmonyos·小艺
FIT2CLOUD飞致云1 小时前
学习笔记丨MaxKB PPT/PDF文档整页转图工作流知识库方案
人工智能·ai·开源·智能体·maxkb
weixin_461769401 小时前
conda create 创建容器 Failed to resolve ‘repo.anaconda.com‘问题
开发语言·python·conda·repo·网络问题·无法创建
Want5951 小时前
Python生日蛋糕
开发语言·python
奋斗的源1 小时前
阿里云百炼平台入门:注册、体验模型与创建 API Key 全流程
阿里云·ai·oneapi
熊猫钓鱼>_>1 小时前
当工具成为类:Softmax困境与连接器过载的算法根源
算法·ai·agent·工具·曲线·华为云码道·生态图鉴