Lost Temple

来源:Benjamin Oppold (@elpresidank) — X Thread 核心论文:arXiv:2603.27116 — The Price of Meaning 配套文章:The AI Corner — Your AI agent is going to hallucinate at scale

全文翻译

1/6 主流方案的根本缺陷

当前主流的 AI Agent 记忆构建方式 — Embedding、RAG、Vector Search — 已被证明在规模化时必然遗忘和编造(arXiv:2603.27116)。修复方案不是更好的 Embedding。而是停止用几何来存储意义。

The dominant way we build AI agent memory — embeddings, RAG, vector search — is provably doomed to forget and fabricate as it scales. The fix isn’t a better embedding. It’s to stop storing meaning as geometry.

2/6 两种意义:几何 vs. 结构

Embedding 用邻近度存储意义:“它离什么近?” 这会随着规模增长而拥挤和衰减。代码(code)有第二种意义:一个符号在 AST、类型图、Schema 中的位置。精确的、离散的、通过导航而非最近邻恢复。不衰减。没有错误回忆。

Embeddings store meaning as proximity: “what is this near?” That crowds and decays. Code has a second kind: where a symbol sits — in the AST, the type graph, the schema. Exact, discrete, recovered by navigating, not nearest-neighbor. No decay. No false recall.

3/6 解锁:Schema Annotation

关键解锁是 @EffectTS_ 的 Schema annotations:将一个事物的意义只存储一次在 Schema 上,按需恢复。一个 Schema 同时完成三项不会漂移的工作:

The unlock is @EffectTS_ Schema annotations: store a thing’s meaning ONCE on the schema, recover it on demand. One schema then does three jobs that can’t drift: the index you retrieve from, the mold you hand an agent, the contract that validates its output.

4/6 从 Prompt 到 Constrain

一旦意义变成了精确的结构,你就不再"提示"Agent,而是开始"约束"它:

它无法在结构上产生幻觉。

Once meaning is exact structure, you stop prompting an agent and start constraining it: context from the symbol’s 2-hop neighborhood, output shape fixed by the schema (invalid = unrepresentable), known facts pre-filled as anchors. It can’t hallucinate structure.

5/6 诚实的版本

诚实的版本:Harness(框架)是确定性的,模型不是。你不断缩小模型被允许发明的表面积,直到唯一留给它创作的,是真正需要理解力的那部分。最小的创造性残差,被围栏挡在检查器之后。

The honest version: the harness is deterministic, not the model. You shrink the surface it’s allowed to invent on until the only thing left to author is the part that genuinely needs understanding. The smallest creative residual, fenced behind a checker.

6/6 灵感来源

这些在笔者坐下来研究 @GiulioCanti 的 Schema 工作之前都没有真正 click。核心理念是"意义可从基数中恢复,而非在数据中重复"。笔者把这个模式称为 Context as Topology。

None of this clicked until I sat with @GiulioCanti’s work on Schema — “meaning recoverable from the base, not duplicated in the data” is the whole idea. I call the pattern Context as Topology.


配套文章关键段落

2026 年初一篇论文几乎没有人读过。它叫《The Price of Meaning》。这是一个形式化证明:大多数团队正在构建的整类 AI 记忆系统从根基上就是有缺陷的。每一个 RAG pipeline。每一个 Vector Database。每一个基于 Embedding 邻近度的 Agent 记忆。证明表明,让它们在小规模下工作的同一种几何,在大规模下迫使它们遗忘,并编造它们从未被告知过的内容。记忆越大,退化越严重。


精选回复

@vladimir_vg: 我也在想这个问题。还没结晶成思路,只是一个直觉:它本质上就是一种拓扑。LLM 通过 prompting 对它进行收缩、扩展或修改。几个密集的 prompt 短语就像让 LLM 去解开的结。

@chikoevm: 这简直是烈火真金,终于有人看穿了 Agent 记忆的 BS,现在再看不回去了。

@Maichi9969: 区块链的不可变账本能解决 AI Agent 面临的记忆碎片化问题吗?


深度解读

这篇文章回答的问题

为什么基于 Embedding 相似度的 AI 记忆系统在规模化时必然失败,以及什么替代架构可以逃脱?

这篇文章应该回答但没回答的问题

对于非代码领域(自然语言文档、用户行为日志等没有 AST/Schema 的数据),“结构化意义"到底怎么定义?Thread 假设了代码的天然结构可以推广到一切领域——这个跳跃的论证是空白的。

论文核心论点

arXiv:2603.27116(《The Price of Meaning》)证明了四个形式化结论:

  1. 有限有效秩:语义有用的表示具有有限的 semantic effective rank。Embedding 维度不是越高越好。
  2. 竞争者质量:有限局部维度意味着检索邻域中存在正的竞争者质量。每次检索,相似但不相关的条目都会挤进来。
  3. 保留衰减到零:在增长的记忆下,保留率衰减到零;幂律到达统计下产生幂律遗忘曲线。记忆越多,记住的比例越小。
  4. 虚假回忆不可避免:对于满足 delta-convexity 条件的关联诱饵,无法通过阈值调节消除虚假回忆。调高检索阈值不能解决幻觉问题。

论文测试了五种架构:Vector Retrieval、Graph Memory、Attention-based Context、BM25 Filesystem Retrieval、Parametric Memory。结论:纯语义系统直接表现为遗忘和错误回忆;带推理增强的系统部分抑制了症状,但将优雅降级变成了灾难性失败;完全逃逸干扰的系统,代价是放弃语义泛化能力。

两种意义:几何邻近 vs. 拓扑位置

拓扑意义(文章主张的方向):一个事物在哪里——在 AST、类型图、Schema 中的精确位置。恢复方式是导航(navigation)。精确、离散——要么在那个位置,要么不在。不衰减。就像文件系统路径 /src/auth/login.ts——你不需要相似度搜索,直接导航。

几何意义(当前主流):一个事物靠近什么——Embedding 空间中的向量距离。恢复方式是最近邻搜索。近似、连续——越拥挤越模糊。随着记忆增长,保留率衰减到零。就像把所有东西扔进一个大房间,用"靠得近不近"来找。

Schema-as-Source-of-Truth

EffectTS 的 Schema annotation 系统是这种思路的参考实现。一个 Schema 同时做三件事:

  1. 检索索引:Schema 自身就是索引结构。不需要 Embedding 相似度匹配。
  2. 生成模具:LLM 知道输出的结构必须长什么样。不是 prompt 里说"请返回 JSON”,而是 Schema 本身就定义了合法的形状。
  3. 验证契约:LLM 的输出必须通过 Schema 验证。无效的输出 = 不可表示(invalid = unrepresentable)。

核心理念:意义可从基数中恢复,而非在数据中重复。

选型决策

场景推荐架构原因
代码分析 / IDE AgentSchema-as-Topology代码天然有 AST、类型图
结构化数据处理Schema-as-Topology数据库 Schema、API 定义天然有结构
客服 / FAQ Bot混合:RAG + 后置验证非结构化知识库为主,但可用 Schema 约束输出
研究助手 / 文献综述RAG + 后置验证论文内容天然无结构
创意写作纯 LLM(不约束)约束会杀死创造力

诚实的限制

  1. 领域局限:Schema annotation 在代码/结构化数据领域非常优雅,但 Thread 完全没有讨论非结构化领域的推广方案。
  2. 实现复杂度:维护"三合一"Schema 的工程成本不低——Schema 需同时满足检索、生成、验证三方面约束。
  3. 利益相关:作者推广 EffectTS,配套 Playbook 在 paywall 后面,“解决方案"的呈现可能带有营销色彩。

翻译解读 by Cloudcold | 2026-06-06