Agent 的 knowledge base 和 memory
怎么管?

英文问法What goes into the agent's knowledge base, and who writes to it? · How do you keep an agent's memory from growing without bound? · What if the agent writes a wrong conclusion into its memory?

考过Unity 自己的材料:FlashVector §4.1(六类文档)和 §4.2 Refine。per-model card 这个说法只出现在论文的 Figure 2 里,正文没有单独讲 · 会不会这样问是推断,没有 Unity 自己的面经原题 · 别家面经里相近的原题:阿里控股 agent infra 开发工程师一面(校招,面试 2026-08-17)「记忆机制是怎么做到,长期记忆可能有badcase怎么解决?」(牛客)

先弄清楚:每个概念是什么

Knowledge base
agent 动手前查的资料库。FlashVector 的分两部分,人维护的文档和 agent 写回的状态。
Per-model card
每个模型一张,记上次 run 的结论。Figure 2 的图中文字是 "each run starts from the last run's findings"。
Refine
四步循环之外的一步。整个 run 结束后执行一次,把结果写回 knowledge base。
In-place 更新
改写原有的条目,不在末尾追加。像病历首页,每次就诊只更新当前诊断。

看图:谁写,什么时候取和写回

人维护的文档(六类) Business Logic Model Server Feature Store ML Model Hardware Optimization Cookbook per-model card agent 写回的状态 接受和拒绝的改动 verify 接受的容差阈值 run summary 只取当前这一层的 上次 run 的结论 run 开始:取文档和 card 四步循环,多轮 run 结束:Refine 写回 in-place
图 1:run 开始时取当前这一层的文档和这个模型的 card。run 结束后 Refine 把结果 in-place 写回 card,下一次 run 从这里开始。

30 秒回答

I'd split it into docs that humans curate and state that the agent writes back. FlashVector has six doc categories, from business logic to an optimization cookbook, plus a per-model card. At the start of a run the agent retrieves only the docs for the layer it is working on. At the end it updates the card in place with what was accepted and what was rejected, so the next run starts from conclusions and the memory stays bounded. The risk is that a wrong conclusion keeps misleading later runs, so write-backs should carry evidence and get reviewed.

FlashVector 怎么取,怎么写回

环节做法
人写什么六类文档:Business Logic、Model Server、Feature Store、ML Model、Hardware、Optimization Cookbook(专家总结的优化规则)
怎么取run 开始时取 serving layer 对应的文档;Diagnose 只拿被抽中那一层的
写回什么接受和拒绝的改动、run summary、verify 接受的容差阈值
怎么写Refine 做 in-place 更新,不追加,所以 memory 有上限

拒绝的改动也记,下次 run 就不会再试同一个失败方案。论文说 in-place 更新 "bounds the amount of memory the agent maintains",还能减轻 "catastrophic forgetting and hallucinations"。

存储介质、检索方式、谁 review 写回、怎么回滚、并发写,这五点论文没写,适合留作反问。

同类系统的做法

系统Knowledge 和 memory
KernelEvolve(Meta)按层级组织的文件系统 knowledge base,硬件文档超过 100 篇;成功的策略提炼成 skill 写回
KernelArcconclusions-only shared memory,只存通过 verify 的 win 和 trap,保留期可配置
Baseten把成功记成可复用的模式,把失败记成 caveat 和 root cause

共同点是 memory 只存结论,失败也要记。

必答点

追问

agent 把一个错的结论写进了 card,会怎样?

后面每次 run 都从这个结论出发,一直被误导。所以每条写回要带证据并有人 review。

几个 run 同时写同一张 card 怎么办?

论文没写。我会给 card 加版本号,写之前比对版本,变了就重读再合并,和 edit tool 的 hash 检查同理。

模型或硬件换了,card 里的旧结论还能用吗?

论文没写旧结论怎么失效。我会让每条结论带上当时的 release 和硬件,对不上的就重新 verify。

来源FlashVector §1、§4.1、§4.2 Refine 和 Triggering、Algorithm 1、Figure 2、Figure 3 · KernelEvolve · KernelArc · Baseten:Agentic kernels in production · ml-八股 08 第 29 题 · 调研笔记 1.4 节和对照表