One Question, Two Correct Answers: Time-Aware Memory With Hindsight
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
One Question, Two Correct Answers: Time-Aware Memory With Hindsight
I asked our agent’s memory the same question twice: who approves discounts at TransPacific Haulage? The first time it said the CFO. The second time I added “as of July 2025”, and it said the Commercial Lead. Both answers were correct. That second answer is the part I want to talk about, because most agent memory I’ve seen only knows “now”, and an agent that only knows now gives confident, outdated advice.
我向我们代理的记忆系统提出了同一个问题两次:谁负责批准 TransPacific Haulage 的折扣?第一次它回答是首席财务官(CFO)。第二次我补充了“截至 2025 年 7 月”这一限定条件,它回答是商务主管(Commercial Lead)。两个答案都是正确的。我想讨论的是第二个答案,因为我所见过的大多数代理记忆系统只知道“现在”,而一个只知道“现在”的代理往往会给出自信但过时的建议。
What we built Precedent is a buyer-side negotiation copilot for procurement teams. Before a vendor renewal it writes a brief: which tactic to lead with, what to avoid, who really decides on discounts, and what to ask for. Every claim cites the memory it came from. We named it after legal precedent: no advice without a past case to cite.
我们构建的 Precedent 是一个面向采购团队的买方谈判副驾驶。在供应商续约之前,它会撰写一份简报:建议采用哪种策略、避免什么、谁真正决定折扣,以及要求什么。每一项主张都引用了其来源的记忆。我们以法律先例(legal precedent)为其命名:没有可引用的过往案例,就不提供建议。
The memory lives in Hindsight, running as a local server. One bank holds every negotiation, tagged per vendor. An agent on gpt-4.1 reads that memory through tools, and Hindsight uses gpt-4.1-mini for its own background work: extracting facts, consolidating them into beliefs, and rewriting a playbook per vendor. I owned the data, the evaluation and the question of time. This post is about all three.
记忆存储在 Hindsight 中,作为一个本地服务器运行。一个数据库保存了所有的谈判记录,并按供应商进行了标记。一个基于 gpt-4.1 的代理通过工具读取这些记忆,而 Hindsight 使用 gpt-4.1-mini 进行后台工作:提取事实、将其整合为信念,并为每个供应商重写行动指南。我负责数据、评估以及时间问题。这篇文章正是关于这三点。
Time matters in two different ways. What we knew grows. By July 2025 we had negotiated with TransPacific once, a volume commitment that lost, and the only approver we had seen was the Commercial Lead. In September 2025 their account manager took our payment-terms offer to the CFO, Ananya Rao, who approved 9% off. So the July answer was not wrong. It was everything we knew in July.
时间以两种不同的方式发挥作用。我们所知的知识在增长。到 2025 年 7 月,我们与 TransPacific 谈判过一次,那是一次失败的批量承诺,当时我们见到的唯一审批人是商务主管。2025 年 9 月,他们的客户经理将我们的付款条件报价提交给了首席财务官 Ananya Rao,她批准了 9% 的折扣。所以 7 月的答案并没有错,那只是我们在 7 月所知的一切。
The world changes. Northwind Cloudworks is the sharper case. Through early 2026, discounts were approved by Raj Menon, their Regional Sales Director. In April 2026 Northwind was acquired by Stratus Group, Raj left, and a new VP Revenue Operations, Alan Pierce, now signs. The tactic that had won for us twice, a competing quote, got only 10% the first time we tried it with him. An agent that only knows now handles neither case well. In the first, you can’t audit why it once believed something. In the second, it might happily tell you to call Raj.
世界在变化。Northwind Cloudworks 是一个更典型的案例。在 2026 年初之前,折扣由其区域销售总监 Raj Menon 批准。2026 年 4 月,Northwind 被 Stratus Group 收购,Raj 离职,新的营收运营副总裁 Alan Pierce 开始负责签字。我们曾两次获胜的策略——竞争性报价,在我们第一次对他尝试时仅获得了 10% 的折扣。一个只知道“现在”的代理无法很好地处理这两种情况。在第一种情况下,你无法审计它为何曾经相信某事;在第二种情况下,它可能会愉快地建议你给 Raj 打电话。
How time gets into the memory. Three things make this work, and none of them needed custom infrastructure on top of Hindsight. Every memory knows when it happened. Each negotiation is retained with its own date as the timestamp, not the date we loaded it, plus tags and structured metadata. Hindsight extracts facts from each note and keeps that occurred date on every one. In the screenshots above, every result carries its date. Newer evidence wins, and the history stays.
时间是如何进入记忆的。有三件事促成了这一点,且都不需要在 Hindsight 之上构建自定义基础设施。每一段记忆都知道它发生的时间。每次谈判都以其发生的日期作为时间戳保留,而不是我们加载它的日期,此外还有标签和结构化元数据。Hindsight 从每条笔记中提取事实,并保留每一条事实发生的日期。在上面的截图中,每个结果都带有日期。更新的证据胜出,而历史记录得以保留。
We tell Hindsight how to consolidate. The observations mission says: “When newer evidence contradicts an older belief, record the change rather than discarding the history.” We also store a standing directive in the bank itself, so it applies whenever Hindsight reasons over the memory, not just in our prompt. Hindsight also keeps every earlier version of each vendor’s playbook, with the memories each version was built from. When a belief changes, I can see when and why.
我们告诉 Hindsight 如何进行整合。观察任务指令写道:“当新的证据与旧的信念相矛盾时,记录下这种变化,而不是丢弃历史。”我们还在数据库中存储了一项常设指令,以便 Hindsight 在对记忆进行推理时始终适用,而不仅仅是在我们的提示词中。Hindsight 还保留了每个供应商行动指南的每一个早期版本,以及构建这些版本所依据的记忆。当信念发生改变时,我可以查看到改变的时间和原因。
You can ask what we knew on a date. The Memory explorer runs Hindsight’s recall with a query timestamp and keeps only what had happened by then. Observations are dropped from as-of queries, because Hindsight re-derives them later from all the evidence, so they can carry hindsight from the future. The whole call needs no LLM; the TransPacific queries took around 60 ms. The trace also shows which retrieval channel found each memory (semantic, keyword, graph or time) and the people and companies involved.
你可以询问我们在某个日期已知的情况。记忆浏览器使用查询时间戳运行 Hindsight 的召回功能,并仅保留在那之前发生的事情。观察结果会从“截至某日”的查询中剔除,因为 Hindsight 稍后会根据所有证据重新推导它们,因此它们可以携带来自未来的后见之明。整个调用过程不需要大语言模型;TransPacific 的查询耗时约 60 毫秒。追踪记录还显示了每个记忆是通过哪个检索通道(语义、关键词、图谱或时间)找到的,以及涉及的人员和公司。
Where the data comes from. That Northwind story only works if the history contains changes like that. No public dataset contains negotiation notes. Procurement registers record awards, not what was said on a call or what the buyer asked for first. The shortcut would be writing plausible notes about real companies, and I refused: invented call notes about real firms are fabrication. So the vendors are fictional: 12 of them and 61 negotiations, written in data/generate.py.
数据来源。Northwind 的故事只有在历史记录包含此类变化时才成立。没有任何公共数据集包含谈判笔记。采购登记册记录的是中标结果,而不是通话内容或买方最初的要求。捷径是编写关于真实公司的合理笔记,但我拒绝了:编造关于真实公司的通话笔记属于造假。因此,供应商是虚构的:共有 12 家供应商和 61 次谈判,编写在 data/generate.py 中。
Each vendor has a hidden profile that the notes are consistent with but never state. The agent has to infer “competing quotes work here” from several episodes. I added deliberate contradictions over time, like the Northwind acquisition, because a memory that only counts wins would miss them. The real-world input is market context: 19,133 contract awards from Estonia’s public procurement register. For SaaS licences that gives 1,193 awards, a median of EUR 96,097, and 53% of contracts with a single bidder. That tells the agent something useful: in a market with one bidder, a competing quote is a weaker threat than it sounds.
每个供应商都有一个隐藏的配置文件,笔记与该文件一致但从未明确说明。代理必须从几个片段中推断出“竞争性报价在这里有效”。我随着时间推移添加了故意的矛盾,比如 Northwind 的收购,因为只计算胜算的记忆会忽略这些。现实世界的输入是市场背景:来自爱沙尼亚公共采购登记册的 19,133 份合同授予记录。对于 SaaS 许可,这提供了 1,193 份授予记录,中位数为 96,097 欧元,且 53% 的合同只有单一竞标者。这告诉了代理一些有用的信息:在只有一个竞标者的市场中,竞争性报价的威胁性比听起来要弱。
Does the memory actually help? Reading memory is not the same as improving outcomes. To measure that I needed something to negotiate against, so I wrote a simulator. Each simulated vendor has hidden rules the agent never sees: one tactic that works, one that backfires, and a maximum discount.
记忆真的有帮助吗?读取记忆并不等同于改善结果。为了衡量这一点,我需要一个谈判对象,所以我编写了一个模拟器。每个模拟供应商都有代理永远无法看到的隐藏规则:一种有效的策略、一种适得其反的策略,以及一个最高折扣。