「写在前面」如果你做过 RAG,大概率遇到过这样一个问题:同一批文档,系统回答第 10 个问题时,并不比回答第 1 个问题时更聪明。每次查询都从原始分块重新推导一遍,前 9 次积累的理解,没有
<div class="detail-content-box has-mask large">
<section style="font-size: 14px;letter-spacing: 1px;line-height: 2;padding: 0px;box-sizing: border-box;font-style: normal;font-weight: 400;text-align: justify;color: rgb(62, 62, 62);"><section style="text-align: left;box-sizing: border-box;"><p style="margin: 0px 0px 10px;padding: 0px;box-sizing: border-box;text-align: left;"><span>「写在前面」如果你做过 RAG,大概率遇到过这样一个问题:同一批文档,系统回答第 10 个问题时,并不比回答第 1 个问题时更聪明。每次查询都从原始分块重新推导一遍,前 9 次积累的理解,没有沉淀下来。</span></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>近一年中,几个团队从不同方向给出了相似的答案——<span style="font-weight: bold;">不要在查询时重新推导,而要在资料导入时完成编译</span>。这套模式被称为 Agent Wiki。Mem0 技术博客《The State of Agent Wikis》里,梳理了 Agent Wiki 的架构与运作方式、四个代表性系统的工程实现,以及它的适用边界。接下来我们就一起来看看:</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>Agent Wiki 的由来</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIP2R9bJUfpJXpf7eUR.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;box-sizing: border-box;"><p style="margin: 0px 0px 10px;padding: 0px;box-sizing: border-box;text-align: left;"><span>2026 年 4 月 4 日,Andrej Karpathy 发布的 Gist </span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>llm-wiki</span></span><span>(<span style="color: #021EAA;">gist.github.com/karpathy/442a6bf555914893e9891c11519de94f</span><span style="color: #021EAA;">#file</span><span style="color: #021EAA;">-llm-wiki-md</span>)把它讲得最清楚,也让它真正传播开来。不过 Cognition 的 DeepWiki 在 2025 年 5 月就已公开,比 Gist 早约 11 个月;而 GBrain 也与 Gist 基本同期出现;AutoWiki 和 OpenWiki 则分别发布于 2026 年 6 月和 7 月。</span></p><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>多个团队从不同场景出发,先后收敛到了相似的结构。这种跨场景的一致性就是一个值得注意的工程信号。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>核心思路:把成本从查询阶段挪到资料导入阶段</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIP7MMUbXrYjJ5MPhiS.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: center;"><img src="https://pic.imgdb.cn/i/034BIPBFotdjYoODMc4m5I.png" class="rich_pages wxw-img js_insertlocalimg"/></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>给模型接入大量文档,常规检索做法是</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="font-size: 15px;box-sizing: border-box;"><section style=""><pre style="border-radius: 5px;box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;text-align: left;margin-top: 10px;margin-bottom: 10px;margin-left: 0px;margin-right: 0px;padding-top: 0px;padding-bottom: 0px;padding-left: 0px;padding-right: 0px;">文档入库 → 切分成块 → 生成 Embedding → 写入向量索引</pre></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>每次提问时,系统再召回相关分块,交给模型生成答案。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>这个方案能用,但有一个结构性问题:<span style="font-weight: bold;">它不保留结果</span>。每个答案都是从原始分块现场重建的,第 10 个答案不会比第 1 个更好,同样的理解工作要重复支付 10 次成本。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>Agent Wiki 把这笔成本挪到了前面。模型在读取源文档时把工作做完一次,把结果写成页面,页面持久保留。新的源文档进入系统时,模型执行的是一套增量操作:读取新资料、更新相关页面、修正受影响的摘要,并标记与既有页面相互矛盾的信息。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>两种方案都成立,差别在两点:<span style="font-weight: bold;">成本发生在什么时候,以及一次查询结束后留下了什么</span>。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="font-size: 15px;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>三层结构</span></strong></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: center;"><img src="https://pic.imgdb.cn/i/034BIPDF2GYm3H01DqbUeD.png" class="rich_pages wxw-img js_insertlocalimg"/></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>四个系统的架构可以抽象成同一个三层模型:</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">第一层是源文档</span>——文章、论文、代码仓库。模型只读,不修改。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">第二层是 Wiki</span>,内容采用 Markdown 格式,全部由模型写入,包含摘要、按主题组织的页面,以及页面之间的链接。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">第三层是维护指令或配置</span>,用于告诉模型 Wiki 如何组织、生成和更新。具体载体因项目而异,可能是 </span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>CLAUDE.md</span></span><span>、</span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>AGENTS.md</span></span><span>,也可能是项目专用配置文件或工作流。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="font-size: 15px;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>三个操作</span></strong></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">Ingest:</span>模型读取新的源文档,把信息分发到所有相关页面。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">Query:</span>向 Wiki 提问。一个好的回答可以作为新页面反写回 Wiki。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">Lint:</span>模型检查整个 Wiki,找出互相矛盾的信息、已经过时的内容,以及没有任何链接指向的孤立页面。Lint 这一步容易被忽略,但它恰恰是这套方案能长期成立的关键——原因见下一节。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>为什么它能成立:瓶颈在于维护</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPFvd97MPVdNkk1xdw.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>人类维护的 Wiki 会随时间腐化,原因很具体:难的从来不是读文献,也不是产生洞见,而是<span style="font-weight: bold;">维护</span>。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>维护意味着这些持续性的工作:修正页面之间的链接、让摘要与最新事实保持一致、把每一份新文档与已有页面逐一比对。这类工作没有尽头,也不产生任何即时回报。团队一忙,最先被放弃的就是它。接着 Wiki 开始失准,然后没人再用它。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>模型做这件事没有同样的障碍:它不会厌倦,不会因为琐碎而跳过某条交叉引用,也可以在一次操作里改动 15 个文件。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>这个思路本身并不新鲜。早在 1945 年,Vannevar Bush 就曾描述过 Memex——一个带有关联链接的个人文档库。Bush 当年没能解决的正是维护问题,而模型补上了这一环。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>回到 Karpathy 的原始表述</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPIyLvDDe6RO3jZP6l.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>其实, Karpathy 的 Gist 原文值得一读,它比大多数转述总结都准确。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>Karpathy 对常规做法的判断是:模型在每个问题上都在从零重新发现知识,没有任何积累。他给出的替代方案是编译而非检索——知识编译一次,此后持续保持更新,而不是每次查询时重新推导,最终得到一个持久的、能不断累积的产物。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>他也明确了人的位置:你几乎从不亲手写这个 Wiki,模型写它,也维护它。他给出的那个类比很精准:<span style="font-weight: bold;">Obsidian 是 IDE,模型是程序员,Wiki 是代码库</span>。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">这里有一个被大量转述总结漏掉的关键限制:规模。</span> Gist 明确写了,靠索引文件 </span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>index.md</span></span><span> 定位页面的做法在中等规模下效果不错——约 100 份源文档、数百个页面——并且<span style="font-weight: bold;">能省掉一整套基于 Embedding 的 RAG 基础设施</span>。超出这个量级,Gist 建议加上搜索,并给出了 QMD 作为示例。QMD 是一个面向 Markdown 的本地搜索引擎,采用 BM25 与向量混合检索,再加上模型重排序。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>所以这条规则是关于<span style="font-weight: bold;">规模</span>的,不是关于<span style="font-weight: bold;">替代</span>的。需要注意的是,触及天花板的是「用一个扁平索引定位页面」这套导航方式,而不是「编译成 Wiki」这个模式本身——源文档集较小时,不必上检索基础设施;变大之后,在 Wiki 之上补一层搜索即可。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>四个团队的工程实现</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPN5SO32v8ApIji9vm.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>模式讲完了,现在来看看有意思的地方——各家在工程上的取舍差异。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: center;"><img src="https://pic.imgdb.cn/i/034BIPP2uxOiRJlpX0rUIv.png" class="rich_pages wxw-img js_insertlocalimg"/></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span><span style="font-size: 15px;">DeepWiki:把 Wiki 做成公共设施</span></span></strong></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>Cognition 把这套方法应用到了 GitHub 上的公开仓库:把 URL 里的 </span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>github.com</span></span><span> 换成 </span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>deepwiki.com</span></span><span>,就能得到这个代码库的 Wiki,包含架构摘要、文件索引、依赖图和搜索,并且链接回源码。上线时已覆盖 5 万多个主流公开仓库,其中包括 MCP 和 LangChain。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>但更值得注意的是第二点:<span style="font-weight: bold;">Wiki 本身不是产品,它是给 Agent 使用的检索基础设施</span>。 Devin 依靠它在代码库中定位相关代码。也就是说,DeepWiki 是 Devin 代码搜索能力底下那层被预先编译好的结构。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="font-size: 15px;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>AutoWiki:把文档变成构建产物</span></strong></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>Factory 的切入点是持续集成。他们的主张很明确:文档应该是一个构建产物,而不是一个独立项目——文档从源码生成,结构与代码库对齐,代码库变了,它就跟着变。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>生成过程分两遍。<span style="font-weight: bold;">第一遍是结构扫描</span>,读取 README、包清单、CI 配置和入口文件;<span style="font-weight: bold;">第二遍是语义扫描</span>,读取路由、API 端点、服务类、数据库 Schema 和特性开关。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>工作被拆给多个专职 Agent,每个 Agent 负责代码库的一部分,并拿到足以写好这一部分页面的上下文。这个设计是为了规避这个问题:单个 Agent 面对大型代码库时,写出来的文档质量会明显下降。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>保持更新依靠的是基础设施,而不是自觉。</span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>/wiki</span></span><span> 命令重新生成 Wiki,</span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>/install-wiki</span></span><span> 命令写入一个 CI 工作流,让每次推送到默认分支时自动重建。对 GitHub 仓库,产物直接进入仓库的 Wiki 标签页。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="font-size: 15px;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>OpenWiki:从代码库扩展到全部工作</span></strong></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>LangChain 开源了 OpenWiki,一个为代码库生成和维护 Agent 文档的 CLI 工具。随后推出的 OpenWiki Brains 提供两种模式:Code Brain 面向代码仓库,Personal Brain 面向个人的各类信息源。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">Personal Brain 是真正的变化所在。</span> 它从 Gmail、Notion、Git 仓库、X、Hacker News 和网页搜索拉取数据,全部写进一个本地 Markdown Wiki,供 Agent 读取。至此,这套方法从「为代码库写文档」扩展成了「为你的工作写文档」。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>这里还有一个四家共同的设计决策值得单独点出:<span style="font-weight: bold;">输出首先按照模型的读取需求组织,同时保持对人可读</span>。 这些结构化 Markdown 页面带有层级标题、页面间链接和摘要,目的是让 Agent 快速定位相关信息。模型是 Wiki 的主要读者之一,但不是唯一读者。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="font-size: 15px;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>GBrain:个人规模的开源实现</span></strong></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>GBrain 面向的是个人知识库,而不是代码库。它以 Markdown 为主要载体,包含 Schema 文件,也会构建主题之间的链接图谱。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>GBrain 默认采用嵌入式 PGLite,无需单独部署数据库服务或 Docker;它支持全文检索、向量检索和知识图谱,Embedding 默认启用,也可在初始化时关闭。其轻量化体现在无需额外部署基础设施,而不是完全不使用数据库或检索系统。文件仍然可以由人直接阅读。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>共性与分歧</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPRaXaaCiQstBwWDwH.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>四个系统的结构高度一致:以 Markdown 作为知识载体,包含 Schema 文件,在资料导入阶段编译知识,在源文档发生变化时重新生成,并按照 Agent 的读取需求组织页面。四个团队面对不同的问题,最后采用了相似的结构。这种跨场景的一致性是一项值得关注的工程信号,但还不能单独证明它们完全独立地得出了同一结论。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>它们真正的分歧在<span style="font-weight: bold;">维护方式</span>:它们真正的分歧在维护方式。Factory 将更新直接接入 CI;OpenWiki 也支持 GitHub Action 和本地定时任务;GBrain 提供定时同步机制。不同系统的差异,主要在于更新如何被触发,以及是否与源资料变化可靠绑定。这意味着后者的 Wiki 只能保持到「上一次命令执行时」的状态。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>边界在哪</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPVglkVEWPedggMtRg.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">规模。</span> Karpathy 给出的经验值是约 100 份源文档。再多就需要引入搜索,并且建议将 BM25 与向量检索结合使用。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">精度。 </span>信息是在资料导入阶段被压缩的,早期摘要一旦丢掉某个细节,之后所有基于它的回答都可能延续这个错误。直接检索原始分块不会以同样的方式固化摘要错误,但仍可能出现漏检、误召回或跨文档关系缺失。这里真正的交换,是用更低的重复推导成本,换取信息在编译过程中丢失或失真的风险。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">时效。</span> 页面的准确度只到上次更新为止。这也是 Factory 那套做法的价值所在:<span style="font-weight: bold;">一个失准的 Wiki 比没有 Wiki 更糟,因为错误的信息穿着正确信息的外衣</span>。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">成本。 </span>生成页面需要消耗 Token,你可能生成了一批从未被读取的页面;Lint 没有发生变化的页面,同样需要消耗 Token。</span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>Wiki 不等于记忆</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPYecBktnY6Paq4oW0.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: center;"><img src="https://pic.imgdb.cn/i/034BIPbh2q8xPEo77Mi9LM.png" class="rich_pages wxw-img js_insertlocalimg"/></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>最后是术语上的区分。这个领域的术语还没有精确下来,「记忆」正在被用于表达两种不同含义。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">第一种含义是对某个文档集的知识。 </span>Wiki 做的是这件事:它把文档、代码库或邮箱里的内容编译成结构化知识,告诉你这些文档里有什么。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">第二种含义是关于某个用户的记忆。</span> 这是完全不同的一类数据:一个人的偏好、他做过的决策、团队否决过的方案,以及 Agent 在其他场景里尝试某种方法之后得到的结果。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>这类数据的结构也不同——它绑定的是人,而不是文档集;它来自持续交互,而不是资料导入。系统还必须为每个用户修正相互矛盾的信息、淘汰过期内容、保留每条信息的来源,并在用户要求时删除数据。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>Wiki 能出色地完成第一件事,但完成不了第二件。<span style="font-weight: bold;">你的邮箱 Wiki 能告诉 Agent 邮箱里有什么,但它不会知道你周二在一次对话里改了主意,也不会知道某个方案在你的场景中已经失败过。</span></span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>这正是记忆层要解决的问题,Mem0 是其中一个方案:每条记忆绑定 </span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>user_id</span></span><span>,因而能跟随用户跨越不同会话、应用和 Agent;事实变化时更新原有记录,而不是不断追加新记录。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>需要强调的是,两者不是二选一的关系,而应该同时使用。<span style="font-weight: bold;">真正的误区是以为有了 Wiki 就等于有了用户记忆。</span></span></p></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>小结</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPe5PPhorz3eJpXt5k.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="white-space: normal;margin: 0px 0px 8px;padding: 0px;box-sizing: border-box;text-align: left;"><span>Agent Wiki 的核心判断是成立的:知识编译一次,然后持续更新,不要为每个问题重新构建一遍。压垮人类 Wiki 的是维护成本,而模型更适合承担这类持续、重复的工作,并能显著降低人工维护成本。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>落到实践上有三条:</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><ul style="list-style-type: disc;box-sizing: border-box;padding-left: 20px;list-style-position: outside;" class="list-paddingleft-2"><li style="box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>当文档集相对稳定,而且会被反复查询时,把文档编译成页面;</span></p></li><li style="box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>当文档集变大时,按照 Gist 的建议把检索加回来;</span></p></li><li style="box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>始终区分「对文档集的知识」和「对用户的记忆」——Wiki 提供前者,不提供后者。</span></p></li></ul></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="text-align: left;justify-content: flex-start;display: flex;flex-flow: row;margin: 10px 0px 0px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 100 100 0%;height: auto;box-sizing: border-box;"><section style="font-size: 16px;color: rgb(0, 66, 175);box-sizing: border-box;"><p style="margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><strong style="box-sizing: border-box;"><span>来源说明</span></strong></p></section></section><section style="display: inline-block;vertical-align: bottom;width: auto;align-self: flex-end;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;box-sizing: border-box;"><section style="text-align: right;margin: 0px;line-height: 0;box-sizing: border-box;"><section style="max-width: 100%;vertical-align: middle;display: inline-block;line-height: 0;width: 45px;height: auto;box-sizing: border-box;text-align: left;"><img src="https://pic.imgdb.cn/i/034BIPgtPd45hoJxzjCxd8.png" class="rich_pages wxw-img" style="vertical-align: middle;max-width: 100%;width: 100%;box-sizing: border-box;"/></section></section></section></section><section style="text-align: center;justify-content: center;display: flex;flex-flow: row;margin: 0px 0px 10px;box-sizing: border-box;"><section style="display: inline-block;vertical-align: middle;width: auto;flex: 100 100 0%;height: auto;align-self: center;box-sizing: border-box;"><section style="margin: 0px;box-sizing: border-box;"><section style="background-color: rgb(13, 80, 201);height: 1px;box-sizing: border-box;text-align: left;"></section></section></section><section style="display: inline-block;vertical-align: middle;width: auto;align-self: center;flex: 0 0 auto;min-width: 5%;max-width: 100%;height: auto;line-height: 0.1;padding: 5px;box-sizing: border-box;"><section style="transform: perspective(0px);-webkit-transform: perspective(0px);-moz-transform: perspective(0px);-o-transform: perspective(0px);transform-style: flat;box-sizing: border-box;"><section style="transform: rotateX(180deg);-webkit-transform: rotateX(180deg);-moz-transform: rotateX(180deg);-o-transform: rotateX(180deg);margin: 0px;box-sizing: border-box;"><section style="display: inline-block;width: 5px;height: 5px;vertical-align: top;overflow: hidden;border-radius: 167px;background-color: rgb(0, 66, 175);margin: 0px;box-sizing: border-box;"><section style="text-align: justify;box-sizing: border-box;"><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p></section></section></section></section></section></section><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span><br/></span></p><section style="box-sizing: border-box;"><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">关于本文:</span> 本文编译、译校自 Mem0 技术博客《The State of Agent Wikis》,核心框架与技术梳理均来自原文。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span><span style="font-weight: bold;">核查与修正:</span> 其一,原文称四个项目均在 Karpathy 的 Gist 之后出现。经核查,DeepWiki 至少在 2025 年 5 月已经公开发布,比 Gist 早约 11 个月;GBrain 与 Gist 基本同期。我们据此重写了时间线,并调整为「多个团队在不同时间、从不同场景出发,最终收敛到相似结构」的表述。</span></p><p style="margin: 0px 0px 10px;white-space: normal;padding: 0px;box-sizing: border-box;text-align: left;"><span>其二,原文称 GBrain「没有向量数据库、没有服务」。实际上,GBrain 默认采用嵌入式 PGLite,支持全文检索、向量检索和知识图谱,且默认启用 Embedding。我们将其修正为「无需单独部署数据库服务或 Docker」,以保留原文关于轻量化的判断。</span></p><p style="white-space: normal;margin: 0px;padding: 0px;box-sizing: border-box;text-align: left;"><span>其三,原文将 Gist 中「约 100 份源文档」的规模上限归于整套方案,经比对 Gist 原文,该上限针对的是以 </span><span style="color: #1E6BB8;font-family: Consolas, Monaco, Menlo, monospace;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: left;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgba(27, 31, 35, 0.05);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;"><span>index.md</span></span><span> 定位页面的导航方式,我们据此还原。此外,我们对原文中若干过于绝对的表述做了精确化处理——例如「Wiki 的读者是模型」「直接检索原始分块没有这个问题」——以避免与文中其他论述相互冲突。</span></p></section></section> <div class="content-mask">
<a href="javascript:void (0);" class="mask-text login-trigger">
<i class="iconfont icon-suo"></i>
登录查看剩余 70% 内容
<i class="iconfont icon-arrow-right-o"></i>
</a>
</div>
</div>
</div>
免费获取企业 AI 成熟度诊断报告,发现转型机会
关注公众号

扫码关注,获取最新 AI 资讯
3 步完成企业诊断,获取专属转型建议
已有 200+ 企业完成诊断