云计算百科
云计算领域专业知识百科平台

从 RAG 到 LLM Wiki:Agent 记忆的下一步,也许是你的知识库

从 RAG 到 LLM Wiki:Agent 记忆的下一步,也许是你的知识库

最近在学习 Agent 的记忆机制,发现一个有意思的问题:Agent 的「记忆」困境,和我们自己的知识管理困境,其实是同一个问题。这篇文章从 RAG 的局限出发,讲清楚 LLM Wiki 到底做对了什么,以及它为什么可能改变我们管理个人知识的方式。


一、Agent 的记忆困境

大语言模型能处理很长的上下文——现在的模型窗口可以到百万 token 级别。但实际用下来,到了 30-40 万 token 性能就开始下降。更关键的是,每次新对话,之前的记忆就清零了。

这带来三个问题:

  • 上下文碎片化:上次对话讨论过的内容,这次不记得了
  • 重复推演:同样的问题,每次都要重新分析一遍
  • 被动响应:不会主动发现知识矛盾,也不会主动补充缺失的信息
  • 打个比方:你有一个能力很强的员工,但他每天早上都会失忆。你每天都要重新告诉他项目背景、技术栈、之前踩过的坑。他每次都能给出好答案,但第二天又忘了。

    补充说明:Transformer 模型的「上下文窗口」就像一个固定大小的工作记忆区。窗口越大,能同时处理的信息越多,但成本也越高,而且模型对中间位置的信息关注度会下降(Lost-in-the-Middle 效应)。

    这三个问题,其实我们自己也有。笔记散落在不同的工具里,搜索时才发现同一件事记了三遍,从来不主动整理过时的内容。Agent 的记忆困境,本质上就是知识管理的困境。


    二、RAG:最常用的「外挂记忆」

    RAG(Retrieval-Augmented Generation,检索增强生成)是目前最常见的解决方案。一句话概括:给 AI 装一个外部搜索引擎,让它在回答问题前先去知识库里找相关内容。

    工作流程很简单:

    用户提问


    ┌──────────────┐
    │ 向量检索 │ ← 把问题转成向量,在文档库里找最相似的内容
    └──────┬───────┘


    ┌──────────────┐
    │ 上下文增强 │ ← 把找到的内容塞进提示词
    └──────┬───────┘


    ┌──────────────┐
    │ 生成回答 │ ← 基于检索到的内容生成答案
    └──────────────┘

    补充说明:「向量检索」是把文本转成一组数字(向量),然后通过计算向量之间的距离来找语义上最相似的内容。就像给每篇文章打上一个「语义坐标」,找内容变成了找最近的邻居。

    RAG 的优势很明显:支持大规模文档库(百万级)、可以实时更新知识、生成结果有事实依据。我在之前的 Dify-RAG 实战文章里详细讲过怎么搭建,这里不重复了。

    但 RAG 有几个根本性的局限:

  • 文本切片割裂:把一篇长文档切成小段时,相关的信息可能被分到不同片段,导致检索遗漏
  • 重复推演:每次提问都要重新检索相同的文档,不会「记住」上次的推理过程
  • 被动响应:不会主动发现文档之间的矛盾,也不会主动补充缺失的知识
  • 用一个比喻来说:RAG 就像一个每次都要去图书馆查同一本书的人。他每次都能找到答案,但从来不会把常用的内容记在脑子里,也不会发现书架上有两本内容冲突的书。

    RAG 解决了「找不到」的问题,但没有解决「重复找」和「不会整理」的问题。


    三、LLM Wiki:从「被动检索」到「主动构建」

    LLM Wiki 是一种新的知识管理范式,核心思想可以用四个字概括:增量编译。

    什么是增量编译?想象你有一个知识库,每次学到新东西,你不是随手记在某个笔记本里就完了,而是重新整理一遍整个知识库——把新知识和已有的知识关联起来,更新过时的内容,补充缺失的环节。这就是增量编译。

    补充说明:

    • 知识图谱:用「节点」和「连线」表示实体和关系的图结构。比如「飞控计算机」是一个节点,「v2.0 增加了自动驾驶功能」是一条连线。
    • 多跳推理:需要多步查找才能回答的问题。比如「A 规范的制定依据是什么?」需要先找到 A 规范,再找到它的制定依据,这就是两跳。
    • 推理链沉淀:把 AI 之前回答某个问题时的推理过程保存下来,下次遇到类似问题可以直接复用,不用从头推理。

    LLM Wiki 相比 RAG 的三个创新:

  • 知识图谱构建:自动识别实体关系,把零散的知识点连接成网络
  • 推理链沉淀:把多次对话的推理过程存储为可复用的逻辑链
  • 复合查询处理:支持多跳推理,而不是只做单次检索
  • RAG 和 LLM Wiki 的本质区别:

    RAG 模式: LLM Wiki 模式:

    新知识 → 存进文档库 新知识 → 增量编译
    (堆积) (整理)
    ↓ ↓
    查询时 → 检索 → 生成 查询时 → 直接从知识图谱取用
    (被动) (主动)

    #mermaid-svg-w31mvhexZmWGex54{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-w31mvhexZmWGex54 .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-w31mvhexZmWGex54 .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-w31mvhexZmWGex54 .error-icon{fill:#552222;}#mermaid-svg-w31mvhexZmWGex54 .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-w31mvhexZmWGex54 .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-w31mvhexZmWGex54 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-w31mvhexZmWGex54 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-w31mvhexZmWGex54 .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-w31mvhexZmWGex54 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-w31mvhexZmWGex54 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-w31mvhexZmWGex54 .marker{fill:#333333;stroke:#333333;}#mermaid-svg-w31mvhexZmWGex54 .marker.cross{stroke:#333333;}#mermaid-svg-w31mvhexZmWGex54 svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-w31mvhexZmWGex54 p{margin:0;}#mermaid-svg-w31mvhexZmWGex54 .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-w31mvhexZmWGex54 .cluster-label text{fill:#333;}#mermaid-svg-w31mvhexZmWGex54 .cluster-label span{color:#333;}#mermaid-svg-w31mvhexZmWGex54 .cluster-label span p{background-color:transparent;}#mermaid-svg-w31mvhexZmWGex54 .label text,#mermaid-svg-w31mvhexZmWGex54 span{fill:#333;color:#333;}#mermaid-svg-w31mvhexZmWGex54 .node rect,#mermaid-svg-w31mvhexZmWGex54 .node circle,#mermaid-svg-w31mvhexZmWGex54 .node ellipse,#mermaid-svg-w31mvhexZmWGex54 .node polygon,#mermaid-svg-w31mvhexZmWGex54 .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-w31mvhexZmWGex54 .rough-node .label text,#mermaid-svg-w31mvhexZmWGex54 .node .label text,#mermaid-svg-w31mvhexZmWGex54 .image-shape .label,#mermaid-svg-w31mvhexZmWGex54 .icon-shape .label{text-anchor:middle;}#mermaid-svg-w31mvhexZmWGex54 .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-w31mvhexZmWGex54 .rough-node .label,#mermaid-svg-w31mvhexZmWGex54 .node .label,#mermaid-svg-w31mvhexZmWGex54 .image-shape .label,#mermaid-svg-w31mvhexZmWGex54 .icon-shape .label{text-align:center;}#mermaid-svg-w31mvhexZmWGex54 .node.clickable{cursor:pointer;}#mermaid-svg-w31mvhexZmWGex54 .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-w31mvhexZmWGex54 .arrowheadPath{fill:#333333;}#mermaid-svg-w31mvhexZmWGex54 .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-w31mvhexZmWGex54 .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-w31mvhexZmWGex54 .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-w31mvhexZmWGex54 .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-w31mvhexZmWGex54 .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-w31mvhexZmWGex54 .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-w31mvhexZmWGex54 .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-w31mvhexZmWGex54 .cluster text{fill:#333;}#mermaid-svg-w31mvhexZmWGex54 .cluster span{color:#333;}#mermaid-svg-w31mvhexZmWGex54 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-w31mvhexZmWGex54 .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-w31mvhexZmWGex54 rect.text{fill:none;stroke-width:0;}#mermaid-svg-w31mvhexZmWGex54 .icon-shape,#mermaid-svg-w31mvhexZmWGex54 .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-w31mvhexZmWGex54 .icon-shape p,#mermaid-svg-w31mvhexZmWGex54 .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-w31mvhexZmWGex54 .icon-shape .label rect,#mermaid-svg-w31mvhexZmWGex54 .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-w31mvhexZmWGex54 .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-w31mvhexZmWGex54 .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-w31mvhexZmWGex54 :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    新知识输入

    是否首次?

    执行完整推理链

    检索历史推理链

    更新知识图谱

    复用中间结果

    生成回答

    用一个更直观的比喻:RAG 是「笔记」——你把东西记下来,需要的时候去翻。LLM Wiki 是「Wiki」——你把东西整理成结构化的页面,每次有新知识都更新 Wiki,下次需要的时候直接查 Wiki,不用再翻原始笔记。

    这就是 LLM Wiki 的核心价值:知识不是被「存」起来的,而是被「编译」成更有价值的结构。 每次整理都让知识库变得更聪明,产生复利效应。


    四、GBrain:让 Agent 学会「主动思考」

    LLM Wiki 解决了「被动检索」的问题,但还是需要人去触发。GBrain 在此基础上更进一步,让 Agent 具备了主动学习的能力。

    GBrain 增加了三个核心能力:

  • 矛盾检测:自动发现知识库中的冲突。比如新旧版本的价格不一致、两个文档对同一个约定的描述不同。
  • 主动探索:发现知识缺口时,自动发起补充检索。比如发现某个概念没有解释,主动去搜索相关资料。
  • 行动规划:根据知识状态制定优化方案。比如发现 FAQ 过时了,自动生成更新建议。
  • #mermaid-svg-x2VHZUVLUQF2um3i{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-x2VHZUVLUQF2um3i .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-x2VHZUVLUQF2um3i .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-x2VHZUVLUQF2um3i .error-icon{fill:#552222;}#mermaid-svg-x2VHZUVLUQF2um3i .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-x2VHZUVLUQF2um3i .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-x2VHZUVLUQF2um3i .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-x2VHZUVLUQF2um3i .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-x2VHZUVLUQF2um3i .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-x2VHZUVLUQF2um3i .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-x2VHZUVLUQF2um3i .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-x2VHZUVLUQF2um3i .marker{fill:#333333;stroke:#333333;}#mermaid-svg-x2VHZUVLUQF2um3i .marker.cross{stroke:#333333;}#mermaid-svg-x2VHZUVLUQF2um3i svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-x2VHZUVLUQF2um3i p{margin:0;}#mermaid-svg-x2VHZUVLUQF2um3i .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-x2VHZUVLUQF2um3i .cluster-label text{fill:#333;}#mermaid-svg-x2VHZUVLUQF2um3i .cluster-label span{color:#333;}#mermaid-svg-x2VHZUVLUQF2um3i .cluster-label span p{background-color:transparent;}#mermaid-svg-x2VHZUVLUQF2um3i .label text,#mermaid-svg-x2VHZUVLUQF2um3i span{fill:#333;color:#333;}#mermaid-svg-x2VHZUVLUQF2um3i .node rect,#mermaid-svg-x2VHZUVLUQF2um3i .node circle,#mermaid-svg-x2VHZUVLUQF2um3i .node ellipse,#mermaid-svg-x2VHZUVLUQF2um3i .node polygon,#mermaid-svg-x2VHZUVLUQF2um3i .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-x2VHZUVLUQF2um3i .rough-node .label text,#mermaid-svg-x2VHZUVLUQF2um3i .node .label text,#mermaid-svg-x2VHZUVLUQF2um3i .image-shape .label,#mermaid-svg-x2VHZUVLUQF2um3i .icon-shape .label{text-anchor:middle;}#mermaid-svg-x2VHZUVLUQF2um3i .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-x2VHZUVLUQF2um3i .rough-node .label,#mermaid-svg-x2VHZUVLUQF2um3i .node .label,#mermaid-svg-x2VHZUVLUQF2um3i .image-shape .label,#mermaid-svg-x2VHZUVLUQF2um3i .icon-shape .label{text-align:center;}#mermaid-svg-x2VHZUVLUQF2um3i .node.clickable{cursor:pointer;}#mermaid-svg-x2VHZUVLUQF2um3i .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-x2VHZUVLUQF2um3i .arrowheadPath{fill:#333333;}#mermaid-svg-x2VHZUVLUQF2um3i .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-x2VHZUVLUQF2um3i .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-x2VHZUVLUQF2um3i .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-x2VHZUVLUQF2um3i .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-x2VHZUVLUQF2um3i .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-x2VHZUVLUQF2um3i .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-x2VHZUVLUQF2um3i .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-x2VHZUVLUQF2um3i .cluster text{fill:#333;}#mermaid-svg-x2VHZUVLUQF2um3i .cluster span{color:#333;}#mermaid-svg-x2VHZUVLUQF2um3i 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-x2VHZUVLUQF2um3i .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-x2VHZUVLUQF2um3i rect.text{fill:none;stroke-width:0;}#mermaid-svg-x2VHZUVLUQF2um3i .icon-shape,#mermaid-svg-x2VHZUVLUQF2um3i .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-x2VHZUVLUQF2um3i .icon-shape p,#mermaid-svg-x2VHZUVLUQF2um3i .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-x2VHZUVLUQF2um3i .icon-shape .label rect,#mermaid-svg-x2VHZUVLUQF2um3i .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-x2VHZUVLUQF2um3i .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-x2VHZUVLUQF2um3i .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-x2VHZUVLUQF2um3i :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    定期扫描知识库

    有矛盾?

    标记冲突

    有知识缺口?

    主动检索补充

    继续监控

    生成更新建议

    执行更新

    从被动到主动,Agent 开始像一个有自我驱动力的员工——不只是等你问才回答,而是主动发现问题、补充知识、优化流程。

    注:以下数据来自公开报道,仅供参考。某电商平台部署 GBrain 后,客服响应时效提升约 40%,知识库自动更新频率提高 15 倍,人工干预需求减少约 70%。


    五、OpenClaw 的 memory-wiki:一个实际实现

    理论讲完了,看看实际的实现。OpenClaw 的 memory-wiki 插件是 LLM Wiki 理念在智能体记忆系统中的一个落地。

    两层架构

    OpenClaw 的记忆系统分为两层:

    ┌─────────────────────────────────────────────┐
    │ memory-wiki(编译 Wiki 层) │
    │ – 编译后的 Wiki 页面 │
    │ – 富来源综合 │
    │ – 仪表盘 │
    │ – Wiki 搜索 / 获取 / 应用 │
    ├─────────────────────────────────────────────┤
    │ 主动记忆插件(记忆运行时层) │
    │ – 召回 │
    │ – 语义搜索 │
    │ – 记忆提取 │
    │ – Dreaming(记忆巩固) │
    └─────────────────────────────────────────────┘

    主动记忆负责实时的召回和搜索,memory-wiki 负责把持久知识编译成结构化的 Wiki。两者协同工作,各司其职。

    知识图谱式组织

    memory-wiki 的存储采用类似知识图谱的方式:

    目录内容说明
    sources/ 导入的原始材料 原始文档、对话记录
    entities/ 持久事物 人物、系统、项目、对象
    concepts/ 抽象概念 想法、模式、策略
    syntheses/ 编译后的摘要 整理后的知识汇总
    reports/ 生成的仪表盘 知识状态可视化

    这种组织方式的好处是:知识不是按时间顺序堆积,而是按类型和关系组织。找东西的时候,不是翻聊天记录,而是查 Wiki。

    三种运行模式

    模式说明适用场景
    isolated(默认) 独立的 Vault,不依赖主动记忆插件 自包含的知识存储
    bridge 通过 SDK 从主动记忆插件读取数据 需要和主动记忆联动
    unsafe-local 本地私有路径,实验性 本地开发测试

    召回机制

    当两层都启用时,可以跨越两个层级进行搜索:

    用户查询

    ├─→ memory_search(主动记忆层:语义搜索)

    └─→ wiki_search / wiki_get(Wiki 层:结构化查询)


    合并结果 → 生成回答

    这种设计的核心理念是分层记忆:短期上下文、长期事实、结构化知识各司其职,而不是把所有记忆混在一起。

    补充说明:OpenClaw 的 memory-wiki 是默认关闭的独立功能,使用独立的存储区域。它和主动记忆的分工是:主动记忆负责实时召回和语义搜索,memory-wiki 负责把持久知识编译成可导航的 Wiki。


    六、技术选型:哪种适合你?

    当前 LLM 长期记忆系统主要分为三条技术路线:

    技术路线核心原理代表实现
    向量数据库 把文本转成向量,通过距离计算找相似内容 Pinecone、Weaviate、Chroma
    知识图谱 用节点和连线表示实体关系,通过关系推理 Neo4j、GraphRAG
    LLM Wiki 把知识预编译成结构化 Markdown,持续维护 Karpathy LLM Wiki、OpenClaw memory-wiki

    三者的对比:

    维度向量数据库知识图谱LLM Wiki
    数据组织 非结构化向量 结构化实体-关系图 结构化 Markdown
    检索方式 语义相似度 关系推理 / 多跳查询 结构化查询 + 语义搜索
    适用场景 广泛相似性匹配 多跳关系推理 专业领域知识管理
    构建成本 中等
    维护成本 中等(增量编译)

    场景匹配:

    场景推荐方案
    实时更新的结构化数据查询 向量数据库(RAG)
    需要深度推理的复杂问题 知识图谱
    专业领域知识管理 LLM Wiki
    需要自主进化的智能系统 GBrain

    #mermaid-svg-7u5WRzStEDiIlwwA{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-7u5WRzStEDiIlwwA .edge-animation-slow{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 50s linear infinite;stroke-linecap:round;}#mermaid-svg-7u5WRzStEDiIlwwA .edge-animation-fast{stroke-dasharray:9,5!important;stroke-dashoffset:900;animation:dash 20s linear infinite;stroke-linecap:round;}#mermaid-svg-7u5WRzStEDiIlwwA .error-icon{fill:#552222;}#mermaid-svg-7u5WRzStEDiIlwwA .error-text{fill:#552222;stroke:#552222;}#mermaid-svg-7u5WRzStEDiIlwwA .edge-thickness-normal{stroke-width:1px;}#mermaid-svg-7u5WRzStEDiIlwwA .edge-thickness-thick{stroke-width:3.5px;}#mermaid-svg-7u5WRzStEDiIlwwA .edge-pattern-solid{stroke-dasharray:0;}#mermaid-svg-7u5WRzStEDiIlwwA .edge-thickness-invisible{stroke-width:0;fill:none;}#mermaid-svg-7u5WRzStEDiIlwwA .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-svg-7u5WRzStEDiIlwwA .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-svg-7u5WRzStEDiIlwwA .marker{fill:#333333;stroke:#333333;}#mermaid-svg-7u5WRzStEDiIlwwA .marker.cross{stroke:#333333;}#mermaid-svg-7u5WRzStEDiIlwwA svg{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;font-size:16px;}#mermaid-svg-7u5WRzStEDiIlwwA p{margin:0;}#mermaid-svg-7u5WRzStEDiIlwwA .label{font-family:\”trebuchet ms\”,verdana,arial,sans-serif;color:#333;}#mermaid-svg-7u5WRzStEDiIlwwA .cluster-label text{fill:#333;}#mermaid-svg-7u5WRzStEDiIlwwA .cluster-label span{color:#333;}#mermaid-svg-7u5WRzStEDiIlwwA .cluster-label span p{background-color:transparent;}#mermaid-svg-7u5WRzStEDiIlwwA .label text,#mermaid-svg-7u5WRzStEDiIlwwA span{fill:#333;color:#333;}#mermaid-svg-7u5WRzStEDiIlwwA .node rect,#mermaid-svg-7u5WRzStEDiIlwwA .node circle,#mermaid-svg-7u5WRzStEDiIlwwA .node ellipse,#mermaid-svg-7u5WRzStEDiIlwwA .node polygon,#mermaid-svg-7u5WRzStEDiIlwwA .node path{fill:#ECECFF;stroke:#9370DB;stroke-width:1px;}#mermaid-svg-7u5WRzStEDiIlwwA .rough-node .label text,#mermaid-svg-7u5WRzStEDiIlwwA .node .label text,#mermaid-svg-7u5WRzStEDiIlwwA .image-shape .label,#mermaid-svg-7u5WRzStEDiIlwwA .icon-shape .label{text-anchor:middle;}#mermaid-svg-7u5WRzStEDiIlwwA .node .katex path{fill:#000;stroke:#000;stroke-width:1px;}#mermaid-svg-7u5WRzStEDiIlwwA .rough-node .label,#mermaid-svg-7u5WRzStEDiIlwwA .node .label,#mermaid-svg-7u5WRzStEDiIlwwA .image-shape .label,#mermaid-svg-7u5WRzStEDiIlwwA .icon-shape .label{text-align:center;}#mermaid-svg-7u5WRzStEDiIlwwA .node.clickable{cursor:pointer;}#mermaid-svg-7u5WRzStEDiIlwwA .root .anchor path{fill:#333333!important;stroke-width:0;stroke:#333333;}#mermaid-svg-7u5WRzStEDiIlwwA .arrowheadPath{fill:#333333;}#mermaid-svg-7u5WRzStEDiIlwwA .edgePath .path{stroke:#333333;stroke-width:2.0px;}#mermaid-svg-7u5WRzStEDiIlwwA .flowchart-link{stroke:#333333;fill:none;}#mermaid-svg-7u5WRzStEDiIlwwA .edgeLabel{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-7u5WRzStEDiIlwwA .edgeLabel p{background-color:rgba(232,232,232, 0.8);}#mermaid-svg-7u5WRzStEDiIlwwA .edgeLabel rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-7u5WRzStEDiIlwwA .labelBkg{background-color:rgba(232, 232, 232, 0.5);}#mermaid-svg-7u5WRzStEDiIlwwA .cluster rect{fill:#ffffde;stroke:#aaaa33;stroke-width:1px;}#mermaid-svg-7u5WRzStEDiIlwwA .cluster text{fill:#333;}#mermaid-svg-7u5WRzStEDiIlwwA .cluster span{color:#333;}#mermaid-svg-7u5WRzStEDiIlwwA 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-7u5WRzStEDiIlwwA .flowchartTitleText{text-anchor:middle;font-size:18px;fill:#333;}#mermaid-svg-7u5WRzStEDiIlwwA rect.text{fill:none;stroke-width:0;}#mermaid-svg-7u5WRzStEDiIlwwA .icon-shape,#mermaid-svg-7u5WRzStEDiIlwwA .image-shape{background-color:rgba(232,232,232, 0.8);text-align:center;}#mermaid-svg-7u5WRzStEDiIlwwA .icon-shape p,#mermaid-svg-7u5WRzStEDiIlwwA .image-shape p{background-color:rgba(232,232,232, 0.8);padding:2px;}#mermaid-svg-7u5WRzStEDiIlwwA .icon-shape .label rect,#mermaid-svg-7u5WRzStEDiIlwwA .image-shape .label rect{opacity:0.5;background-color:rgba(232,232,232, 0.8);fill:rgba(232,232,232, 0.8);}#mermaid-svg-7u5WRzStEDiIlwwA .label-icon{display:inline-block;height:1em;overflow:visible;vertical-align:-0.125em;}#mermaid-svg-7u5WRzStEDiIlwwA .node .label-icon path{fill:currentColor;stroke:revert;stroke-width:revert;}#mermaid-svg-7u5WRzStEDiIlwwA :root{–mermaid-font-family:\”trebuchet ms\”,verdana,arial,sans-serif;}

    记忆系统分层

    短期上下文

    长期事实

    结构化知识

    对话历史

    向量数据库

    知识图谱 / LLM Wiki

    没有银弹——不同场景用不同方案,或者组合使用。向量数据库擅长「找相似的」,知识图谱擅长「找关联的」,LLM Wiki 擅长「整理和复用」。


    七、我的思考:LLM Wiki 作为个人知识库

    学完这些,我一直在想一个问题:LLM Wiki 的理念,能不能用在个人知识管理上?

    我觉得可以,而且可能比用在 Agent 上更有价值。原因有三个:

    知识产生复利。 每次你整理笔记,不是在「浪费时间」,而是在「编译知识」。整理后的知识更容易检索、更容易关联、更容易复用。就像投资一样,越早开始整理,复利效应越大。

    结构化而非碎片化。 现在的笔记工具(Notion、Obsidian)都是按时间或按文件夹组织。但知识不是线性的——一个概念可能和十个不同的主题相关。Wiki 的组织方式天然适合这种网状结构。

    增量编译,边学边整理。 不需要一次性把所有笔记整理完。每次学到新东西,花几分钟把它编译进知识库——更新相关页面、补充关联、标记过时内容。成本很低,但长期收益很大。

    我在想,如果用 LLM Wiki 的方式管理技术笔记,大概是这样的:

    技术笔记 Vault/
    ├── sources/ ← 原始笔记、文章链接、对话记录
    ├── entities/ ← 技术栈、工具、框架
    ├── concepts/ ← 设计模式、架构思想、最佳实践
    ├── syntheses/ ← 整理后的技术方案、对比总结
    └── reports/ ← 学习进度、知识图谱可视化

    每次写完一篇技术博客,就把核心知识点「编译」进 Vault——更新相关实体、补充概念关联、标记过时内容。博客本身是 source,Vault 里的知识才是资产。

    补充说明:Karpathy 的 LLM Wiki 和 OpenClaw 的 memory-wiki 都是这个方向的探索。Karpathy 把它叫做「编译器模式」——原始材料是「源代码」,Wiki 是「编译产物」。


    回顾

    从 RAG 的「被动检索」到 LLM Wiki 的「主动构建」,不只是技术方案的升级,更是一种思维方式的转变:

    • RAG:存起来,需要的时候找 → 解决「找不到」
    • LLM Wiki:编译起来,需要的时候直接用 → 解决「重复找」和「不会整理」
    • GBrain:主动发现问题,自动补充和更新 → 解决「不主动」

    LLM Wiki 不只是 Agent 的记忆方案,也是一种知识管理的思维方式。如果你也在管理大量技术笔记,可以试试「增量编译」的思路——不用一次性整理完,每次学新东西花几分钟编译进知识库,让知识产生复利。


    赞(0)
    未经允许不得转载:网硕互联帮助中心 » 从 RAG 到 LLM Wiki:Agent 记忆的下一步,也许是你的知识库
    分享到: 更多 (0)

    评论 抢沙发

    评论前必须登录!