AI 记忆的时机错了:该在用时想,不该在记时想
AI 智能体一直有个笨办法:做完一件事,立刻把过程压缩成「经验」存起来,等以后遇到相似任务再翻出来用。问题在于,它存的时候根本不知道以后会问什么,等于在不知道考题前就划了重点,还永久扔掉了没划进去的内容。这篇论文把顺序倒过来:先原样保留所有经历,等新任务来了,再当场按需提炼一份刚好够用的记忆。这个「用时再想」的思路,在三个标准测试环境里,成功率比最强的旧方法分别高出 16.2、16.3 和 3.9 个百分点。更关键的是,哪怕提炼器完全没训练过,光靠「按需提炼」这个动作本身就已经追平甚至超过旧方法——说明问题不在提炼得够不够好,而在提炼的时机根本选错了。它不是你明天能用上的东西,但它指出了一个更省力的方向:别让 AI 提前猜你要什么,让它到时候再想。
📄 原文摘要(英文)
Agentic memory systems reuse past experience to improve future performance, yet most existing designs curate memory at write time: once a task is completed, its trajectory is distilled into a fixed artifact, such as a reflection, workflow, skill, or reasoning strategy, that is later retrieved by similarity. This forces the system to decide what is worth remembering before the future query is known, irreversibly discarding information and producing a query-independent summary that must serve many possible downstream tasks. Learning such a write-time curator is also difficult because the value of a storage decision may only become apparent when a relevant query arrives, potentially many tasks later, creating a long-horizon credit-assignment problem. We instead retain raw trajectories and defer curation until read time, when the current task is known. Given the retrieved traces and the new task, a memory curator synthesizes a compact, task-adaptive payload tailored to the immediate need. Because this payload is consumed on the same task, the curator can be trained directly from immediate task success, avoiding delayed utility signals and the need to artificially group related tasks. Across ALFWorld, WebShop, and τ^2-bench, our Just-in-Time Memory (JitMem) consistently outperforms no-memory agents as well as heuristic and learned write-time memory methods, improving over the strongest baseline by 16.2, 16.3, and 3.9 absolute success-rate points, respectively. Notably, even an untrained curator is already competitive with or surpasses these baselines, showing that task-adaptive read-time curation itself is a major source of the gain; training the curator further compounds the improvement.