Files
sxbh.ltd/rag-recall-evaluation-20260829.html
T
wecom-fullstack 3b8925d317 feat(sxbh-compliance): 新增隐私政策/服务条款页 + 全站页脚挂链 + 咨询表单同意勾选
白名单只含 158 件:privacy.html、terms.html 新建;156 个页面插入合规页脚链;
index.html 咨询弹窗加同意复选框(默认不勾 + JS 拦截)。
他人未提交 hunk(articles/perspective 等)未纳入本提交。
2026-10-01 18:00:08 +08:00

134 lines
8.6 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI知识库检索质量:32%到100%的治理实践 · 陕西博海网络科技</title>
<meta name="description" content="博海科技用数据驱动优化 AI 知识库检索——Recall@5 从 32% 提升到 100% 的完整实践:评估先行、定位根因、分层治理。">
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "Article",
"headline": "AI知识库检索质量:32%到100%的治理实践",
"description": "博海科技用数据驱动优化 AI 知识库检索——Recall@5 从 32% 提升到 100% 的完整实践:评估先行、定位根因、分层治理。",
"articleSection": "技术实践",
"datePublished": "2026-08-29",
"author": {"@type": "Organization", "name": "陕西博海网络科技"}
}
</script>
<style>
:root{--teal:#0d7377;--navy:#0a1628;--amber:#d97706;--gray:#4b5563;--light:#f8fafc}
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:"Noto Serif SC","Songti SC",serif;color:#1e293b;line-height:1.9;background:#fff}
.wrap{max-width:800px;margin:0 auto;padding:48px 24px}
.hero{text-align:center;padding:40px 0 28px;border-bottom:1px solid #e2e8f0;margin-bottom:32px}
.badge{display:inline-block;background:#f0fdfa;color:var(--teal);border:1px solid #99f6e4;border-radius:20px;padding:4px 16px;font-size:13px;margin-bottom:16px}
h1{font-size:30px;color:var(--navy);font-weight:700;line-height:1.4}
.sub{color:var(--gray);font-size:15px;margin-top:12px}
.meta{color:#94a3b8;font-size:13px;margin-top:16px}
h2{color:var(--teal);font-size:22px;margin:36px 0 16px;padding-bottom:8px;border-bottom:2px solid var(--teal)}
h3{color:var(--navy);font-size:17px;margin:24px 0 10px}
p{margin:12px 0;font-size:15px}
.num{display:inline-block;background:var(--teal);color:#fff;border-radius:50%;width:30px;height:30px;text-align:center;line-height:30px;font-size:14px;margin-right:8px}
.quote{background:var(--light);border-left:4px solid var(--teal);padding:14px 20px;margin:20px 0;border-radius:0 8px 8px 0;font-size:14px;color:var(--gray)}
table{width:100%;border-collapse:collapse;margin:20px 0;font-size:14px}
th{background:var(--teal);color:#fff;padding:10px 12px;text-align:left}
td{border:1px solid #e2e8f0;padding:9px 12px}
tr:nth-child(even) td{background:var(--light)}
.cta{background:var(--navy);color:#fff;text-align:center;padding:36px 24px;border-radius:12px;margin-top:40px}
.cta .phone{font-size:26px;color:#fbbf24;margin:12px 0}
.cta .btn{display:inline-block;background:var(--teal);color:#fff;padding:10px 32px;border-radius:6px;text-decoration:none;margin-top:10px}
footer{text-align:center;color:#94a3b8;font-size:12px;padding:24px;border-top:1px solid #e2e8f0;margin-top:40px}
</style>
<link rel="canonical" href="https://sxbh.ltd/rag-recall-evaluation-20260829.html">
<link rel="icon" href="/favicon.ico" sizes="any">
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
</head>
<body>
<div class="wrap">
<div class="hero">
<div class="badge">技术实践 · AI工程</div>
<h1>AI知识库检索质量:从 32% 到 100% 的治理实践</h1>
<p class="sub">评估先行、定位根因、分层治理——博海科技自研 AI 知识库检索质量优化实录</p>
<div class="meta">陕西博海网络科技 · 2026-08-29 · 原创</div>
</div>
<p>AI 知识库是智能体的"记忆",而检索质量决定了它回答的可信度。检索不到该检索的内容,再强的模型也会"一本正经地胡说"。博海科技在自研 AI 系统(管理会计 OS + 多智能体协作平台)中,用一套数据驱动的方法,把知识库检索命中率(Recall@5)从 <b>32% 提升到 100%</b>。本文复盘完整过程——这既是一次工程优化,更是一套可复用的治理方法论。</p>
<h2>一、起点:不知道自己的检索有多差</h2>
<p>我们的知识库检索器采用"关键词 + 向量"双通道设计,看起来完备。但一次内部审计暴露了真相:<b>系统从未评估过自己的召回率</b>——不知道检索质量,就无法判断问题在检索层还是下游。</p>
<p class="quote">RAG 幻觉治理的行业经验(实测把幻觉率从 15% 压到 1%)第一条就是:<b>先标定评估集衡量 Recall@k</b>——>85% 就别动检索器,<85% 才需要优化。数据说话,不凭感觉。</p>
<h2>二、评估:25 个查询照出三层问题</h2>
<p>我们构建了 25 个真实查询的评估集,分三类:</p>
<table>
<tr><th>类别</th><th>说明</th><th>查询数</th></tr>
<tr><td>A 标题词查询</td><td>用文章标题关键词检索(基线)</td><td>8</td></tr>
<tr><td>B 自然语言问题</td><td>真实问答场景(如"字节跳动开源的长周期Agent框架是什么")</td><td>12</td></tr>
<tr><td>C 索引外新文章</td><td>评估索引覆盖度</td><td>5</td></tr>
</table>
<p>结果触目惊心:</p>
<table>
<tr><th>类别</th><th>命中</th><th>Recall@5</th></tr>
<tr><td>A 标题词查询</td><td>8/8</td><td>100%</td></tr>
<tr><td>B 自然语言问题</td><td>0/12</td><td><b style="color:#dc2626">0%</b></td></tr>
<tr><td>C 索引外新文章</td><td>0/5</td><td><b style="color:#dc2626">0%</b></td></tr>
<tr><td><b>合计</b></td><td><b>8/25</b></td><td><b>32%</b></td></tr>
</table>
<h2>三、根因:三层"纸面设计"</h2>
<h3><span class="num">1</span>匹配逻辑缺陷</h3>
<p>检索器只对标题/主题做整句包含匹配,不查正文、不分词。自然语言查询(真实场景)整句包含必然落空——<b>关键词检索器本质是"标题匹配器"</b>。这是 B 类 0% 的直接原因。</p>
<h3><span class="num">2</span>索引陈旧</h3>
<p>知识索引两个月未更新,新增文章全部未收录——C 类 0% 的直接原因。</p>
<h3><span class="num">3</span>向量层名存实亡</h3>
<p>设计文档写着"BM25 + ChromaDB 混合检索",实测向量服务从未运行、依赖未安装——<b>混合检索是纸面设计</b>。</p>
<h2>四、治理:数据说话,分层修复</h2>
<h3><span class="num">1</span>重建知识索引</h3>
<p>覆盖全部真实文章(61 篇),解决覆盖度。</p>
<h3><span class="num">2</span>检索器升级</h3>
<p>正文索引 + jieba 分词 + 相关性分数降序——自然语言查询从"整句包含"升级为"分词命中 + 按相关度排序"。</p>
<h3><span class="num">3</span>质量门槛</h3>
<p>检索分数低于阈值时明确返回"知识库没有找到相关内容",不硬答——与我们的验证铁律(找不到就说找不到)一致。</p>
<h3><span class="num">4</span>向量层评估</h3>
<p>按可行性推进:可行则落地,不可行则明确降级标注,不为了"看起来先进"而强装。</p>
<h2>五、结果:Recall@5 = 100%</h2>
<table>
<tr><th>类别</th><th>优化前</th><th>优化后</th></tr>
<tr><td>A 标题词查询</td><td>100%</td><td>100%</td></tr>
<tr><td>B 自然语言问题</td><td><b>0%</b></td><td><b>100%</b></td></tr>
<tr><td>C 覆盖度</td><td><b>0%</b></td><td><b>100%</b></td></tr>
<tr><td><b>合计</b></td><td><b>32%</b></td><td><b>100%</b></td></tr>
</table>
<p>同一套评估脚本、同样的 25 个查询,优化前后对比——<b>数据是唯一的裁判</b>。</p>
<h2>六、可复用的方法论</h2>
<p>这次实践沉淀为四条原则,适用于任何 AI 知识库/检索系统:</p>
<p><b>① 评估先行</b>:没有 Recall 数字,一切优化都是猜。</p>
<p><b>② 数据说话</b>:结论必须来自评估集,不凭感觉。</p>
<p><b>③ 分层治理</b>:先修最影响的那一层(匹配/索引/向量),不一次性大改。</p>
<p><b>④ 诚实标注</b>:不可行的(如向量层)明确降级,不假装已实现。</p>
<p class="quote">"找得到"是 AI 可信度的地基。检索质量不达标,再聪明的模型也只是礼貌地胡说。</p>
<div class="cta">
<h3 style="color:#fff">需要为您的业务构建可信赖的 AI 知识库?</h3>
<p style="color:rgba(255,255,255,.7)">博海科技提供 AI 智能体、知识库、数据治理整体方案</p>
<div class="phone">📞 0912-4223980</div>
<a class="btn" href="https://sxbh.ltd">访问官网</a>
</div>
</div>
<footer>© 2026 陕西博海网络科技有限公司 · 原创文章 · <a href="https://beian.miit.gov.cn/" style="color:#94a3b8" target="_blank">陕ICP备2023001969号-3</a> <!-- sxbh-legal-links -->
<div style="margin-top:8px;">
<a href="/privacy.html" style="color:#9fc7d8;">隐私政策</a>
<span style="margin:0 10px;color:rgba(255,255,255,.35);">|</span>
<a href="/terms.html" style="color:#9fc7d8;">服务条款</a>
</div>
</footer>
</body>
</html>