Karpathy 说 RAG 已死——1300万人围观了他的替代方案
来源: 心知 ai (微信公众号) | 日期: 2026-04-05 左右 原文: Karpathy 说 RAG 已死——1300万人围观了他的替代方案 精读日期: 2026-04-07
一句话总结
对 Karpathy LLM Wiki 的深度技术解析:核心差异在于「写循环」——RAG 是静态只读的,LLM Wiki 是动态读写的知识编译系统。
核心内容
RAG vs LLM Wiki 的本质区别
用编程语言做类比:
- RAG = 解释型语言:每次运行从源代码重新解析,不保留中间产物
- LLM Wiki = 编译型语言:源代码编译一次,生成优化后的可执行文件,之后直接使用
核心原文:“The knowledge is compiled once and then kept current, not re-derived on every query.”
为什么是 Markdown?(技术细节)
| 优势 | 说明 |
|---|---|
| LLM 原生格式 | 训练数据大量 Markdown,读写最舒适 |
| 纯文本 = 无损 | 不依赖特定应用,任何编辑器可打开 |
| 天然知识图谱 | [[wiki-links]] 支持双向链接 |
| 可版本控制 | 纯文本 + Git = 完美的 diff 和回滚 |
| Token 效率高 | 比 HTML/PDF 紧凑,上下文窗口利用率高 |
| 工具链完整 | Obsidian + Git + grep + Marp + Dataview |
index.md 替代向量搜索
在 ~100 篇来源、~数百页面规模下,index.md(几千 token 的目录文件)完全在 LLM 上下文窗口内,不需要向量数据库。只有 500+ 页面才需要引入 qmd(BM25 + 向量 + LLM 重排序)。
「写循环」是核心区分
HN 用户 darkhanakh 的精辟评论:
“The interesting bit here is the write loop… the LLM is authoring and maintaining the wiki itself… that’s knowledge synthesis.”
| 对比维度 | RAG | LLM Wiki |
|---|---|---|
| 语料库状态 | 静态 | 动态,每次 Ingest 更新整个网络 |
| 新信息处理 | 只添加新文档 | 交叉验证,矛盾被主动标记 |
| LLM 角色 | 只读检索 | 读写,主动创造和组织 |
| 知识积累 | 无 | 有,持续复利 |
上游缺失的拼图:Capture → Distill → Compile
作者(心知 ai)提出 Karpathy 方案只覆盖了 Compile 层,上游还缺两层:
- Capture(自动采集):从数字生活自动采集——屏幕活动、AI 对话、语音笔记、浏览器历史
- Distill(蒸馏):LLM Agent 过滤噪音,判断什么值得编译进 Wiki——教 LLM 理解「对你来说什么重要」
- Compile(编译):Karpathy 的 Raw → Wiki 管道
作者认为 “incredible new product” 的机会在蒸馏层,不在编译层。
Idea File:新的开源形式
Karpathy 提出在 Agent 时代,分享想法比分享代码更有效:“The document’s only job is to communicate the pattern. Your LLM can figure out the rest.”
金句摘录
- “The knowledge is compiled once and then kept current, not re-derived on every query.”
- “Obsidian is the IDE; the LLM is the programmer; the wiki is the codebase.”
- “Humans abandon wikis because the maintenance burden grows faster than the value. LLMs don’t get bored.”
- “This document is intentionally abstract. It describes the idea, not a specific implementation.”
- “在 Twitter 上,点赞是「不错」,收藏是「我回去要动手试」。”
Justin 视角
- 你的 memory 系统已经有蒸馏层:daily cron(4:00 AM)自动做日记归档、向量索引、认知蒸馏——这正是第二篇文章指出 Karpathy 方案缺失的 Distill 层。你比 Karpathy 的原始方案更完整
- 但缺少 Compile 层的「写循环」:你的 topic 文件(decisions.md, procedures.md 等)是 append-only 追加式的,缺少 LLM 主动的交叉引用更新、矛盾标记、知识网络维护
- Schema 层已经很强:CLAUDE.md 的记忆路由表 + 写入路由 + 搜索触发,本质上就是 Karpathy 说的 Schema
- Obsidian 的价值:不仅是编辑器,更是 [[双向链接]] + Graph View 的可视化知识网络——这正是 Wiki 编译层需要的基础设施
- qmd 值得关注:Shopify CEO Tobi Lutke 开源的本地 Markdown 搜索引擎,BM25 + 向量 + LLM 重排序,可能比你现在的 vec-search 方案更适合
延伸阅读
- Karpathy llm-wiki.md Gist
- qmd - Tobi Lutke 的 Markdown 搜索引擎
- Steph Ango (Obsidian 联合创始人) 的「污染缓解」概念——人类 vault 和 Agent vault 分离
- Vannevar Bush, “As We May Think” (1945) — Memex 构想