Skip to content

Hindsight is 20/20: Building Agent Memory that Retains, Recalls, and Reflects

MemoryAgentTemporal Graph18500+30+Vectorize.io华盛顿邮报弗吉尼亚理工大学

Latimer C, Boschi N, Neeser A, et al. Hindsight is 20/20: Building Agent Memory that Retains, Recalls, and Reflects[J]. arXiv preprint arXiv:2512.12818v1, 2025.

https://github.com/vectorize-io/hindsight

https://hindsight.vectorize.io


Hindsight:构建能够保留、回忆与反思的智能体记忆

Abstract

Agent memory has been touted as a dimension of growth for LLM-based applications, enabling agents that can accumulate experience, adapt across sessions, and move beyond single-shot question answering. The current generation of agent memory systems treats memory as an external layer that extracts salient snippets from conversations, stores them in vector or graph-based stores, and retrieves top-k items into the prompt of an otherwise stateless model. While these systems improve personalization and context carry-over, they still blur the line between evidence and inference, struggle to organize information over long horizons, and offer limited support for agents that must explain their reasoning. We present Hindsight, a memory architecture that treats agent memory as a structured, first-class substrate for reasoning by organizing it into four logical networks that distinguish world facts, agent experiences, synthesized entity summaries, and evolving beliefs. This framework supports three core operations---retain, recall, and reflect---that govern how information is added, accessed, and updated. Under this abstraction, a temporal, entity-aware memory layer incrementally turns conversational streams into a structured, queryable memory bank, while a reflection layer reasons over this bank to produce answers and to update information in a traceable way. On key long-horizon conversational memory benchmarks like LongMemEval and LoCoMo, Hindsight with an open-source 20B model lifts overall accuracy from 39% to 83.6% over a full-context baseline with the same backbone and outperforms full-context GPT-4o. Scaling the backbone further pushes Hindsight to 91.4% on LongMemEval and up to 89.61% on LoCoMo (vs. 75.78% for the strongest prior open system), consistently outperforming existing memory architectures on multi-session and open-domain questions.

智能体记忆被视为基于 LLM 的应用的一个增长维度,使智能体能够积累经验、跨会话适应,并超越一次性问答。 当前一代智能体记忆系统把记忆视为一个外部层:从对话中抽取显著片段,将其存储在向量或图存储中,再把 top-k 条目检索到原本无状态模型的提示中。 尽管这些系统改善了个性化和上下文延续,但它们仍然模糊证据与推断之间的界线,难以在长时间跨度上组织信息,也只能有限地支持必须解释其推理过程的智能体。 我们提出 Hindsight,这是一种把智能体记忆视为结构化、一等推理基底的记忆架构;它将记忆组织为四个逻辑网络,以区分世界事实、智能体经验、合成的实体摘要和不断演化的信念。 该框架支持三项核心操作——保留、回忆和反思——用于控制信息如何被加入、访问和更新。 在这一抽象下,一个具备时间与实体感知能力的记忆层逐步把对话流转化为结构化、可查询的记忆库,而反思层则在该记忆库上推理,以生成答案并以可追踪的方式更新信息。 在 LongMemEval 和 LoCoMo 等关键长程对话记忆基准上,使用开源 20B 模型的 Hindsight 相比采用相同骨干模型的完整上下文基线,将总体准确率从 39% 提升到 83.6%,并超过完整上下文 GPT-4o。 进一步扩展骨干模型后,Hindsight 在 LongMemEval 上达到 91.4%,在 LoCoMo 上达到 89.61%(最强的既有开放系统为 75.78%),并在多会话和开放域问题上持续优于现有记忆架构。

1. Introduction

AI agents are increasingly expected to behave less like stateless question answering systems and more like long-term partners: they are expected to remember past interactions, build up and track knowledge about the world, and maintain stable perspectives over time. However, the current generation of agent memory systems today are still built around short-context retrieval-augmented generation (RAG) pipelines and generic large language models (LLMs). Such designs treat memory as an external layer that extracts salient snippets from conversations, stores them in vector or graph-based stores, and retrieves top-k items into the prompt of an otherwise stateless model.

人们日益期望 AI 智能体不再像无状态问答系统,而更像长期伙伴:它们应当记住过去的交互,积累并追踪有关世界的知识,并随时间保持稳定的观点。 然而,当前一代智能体记忆系统仍然围绕短上下文检索增强生成(RAG)流水线和通用大语言模型(LLM)构建。 这类设计把记忆视为一个外部层:从对话中抽取显著片段,将其存储在向量或图存储中,再把 top-k 条目检索到原本无状态模型的提示中。

As a result, current approaches to modeling agent memory struggle with three recurring challenges. First, they are unable to preserve and granularly access long-term information across sessions. Second, AI agents are unable to epistemically distinguish what the agent has observed from what it believes. Finally, such agents are notorious for their inability to exhibit preference consistency, i.e., expressing a stable reasoning style and viewpoint across interactions rather than producing locally plausible but globally inconsistent responses.

因此,当前的智能体记忆建模方法反复面临三项挑战。 第一,它们无法跨会话保存并细粒度访问长期信息。 第二,AI 智能体无法在认识论层面区分自己观察到的内容与相信的内容。 最后,这类智能体因无法表现出偏好一致性而广受诟病,也就是说,它们不能跨交互表达稳定的推理风格和观点,而是生成局部看似合理、整体却不一致的响应。

Recent work has begun to address these challenges through dedicated memory architectures for agents. Systems like MemGPT introduce operating system-like memory management, while Zep proposes temporal knowledge graphs as an internal data structure. Other approaches focus on continual learning, reinforcement-based memory management, or production-ready memory systems. While these systems improve personalization and context carry-over, they still blur the line between evidence and inference, can struggle to selectively organize information over long horizons, and offer limited support for agents that must explain why they answered a question a certain way.

近期工作开始通过面向智能体的专用记忆架构来应对这些挑战。 MemGPT 等系统引入类似操作系统的记忆管理,而 Zep 则提出把时间知识图谱作为内部数据结构。 其他方法关注持续学习、基于强化学习的记忆管理或面向生产的记忆系统。 尽管这些系统改善了个性化和上下文延续,但它们仍然模糊证据与推断之间的界线,可能难以在长时间跨度上选择性组织信息,也只能有限地支持必须解释为何以特定方式回答问题的智能体。

We present Hindsight, a memory architecture for long-lived AI agents that addresses these challenges by unifying long-term factual recall with preference-conditioned reasoning. Each agent in Hindsight is backed by a structured memory bank that accumulates everything the agent has seen, done, and decided over time, and a reasoning layer that uses this memory to answer questions, execute workflows, form opinions, and update beliefs in a consistent way. Conceptually, Hindsight ties together two components: TEMPR (Temporal Entity Memory Priming Retrieval), which implements the retain and recall operations over long-term memory, and CARA (Coherent Adaptive Reasoning Agents), which implements the reflect operation over that memory. TEMPR builds a temporal, entity-aware memory graph and exposes an agent-optimized retrieval interface, while CARA integrates configurable disposition behavioral parameters into the reasoning process and maintains an explicit opinion network that evolves over time.

我们提出 Hindsight,这是一种面向长寿命 AI 智能体的记忆架构,通过统一长期事实回忆与偏好条件推理来应对这些挑战。 Hindsight 中的每个智能体都有一个结构化记忆库作为支撑,该记忆库随时间累积智能体见过、做过和决定过的一切;同时还有一个推理层,利用这些记忆回答问题、执行工作流、形成观点并以一致的方式更新信念。 从概念上看,Hindsight 联结了两个组件:TEMPR(Temporal Entity Memory Priming Retrieval,时间实体记忆启动检索),负责在长期记忆上实现保留回忆操作;CARA(Coherent Adaptive Reasoning Agents,连贯自适应推理智能体),负责在该记忆上实现反思操作。 TEMPR 构建具备时间与实体感知能力的记忆图,并提供为智能体优化的检索接口;CARA 则把可配置的性情行为参数整合进推理过程,并维护一个随时间演化的显式观点网络。

At the core of Hindsight is a simple abstraction: a memory bank organized into four logical networks (world, experience, opinion, observation) and three core operations (retain, recall, and reflect, as mentioned earlier). The world and experience networks store objective facts about the external world and the agent's own experiences. The opinion network stores subjective beliefs with confidence scores that can be updated as new evidence arrives. The observation network stores preference-neutral summaries of entities synthesized from underlying facts. TEMPR implements retain and recall by extracting narrative facts with temporal ranges, resolving entities and constructing graph links, and retrieving memories via multi-strategy search. CARA implements reflect by combining retrieved memories with an agent profile (name, background, and disposition behavioral parameters) to generate preference-shaped responses and to form and reinforce opinions. As we will demonstrate empirically, this design provides several performance advantages over existing memory systems.

Hindsight 的核心是一个简单抽象:把记忆库组织为四个逻辑网络(世界经验观点观察)和三项核心操作(前文提到的保留、回忆与反思)。 世界网络和经验网络存储关于外部世界以及智能体自身经历的客观事实。 观点网络存储带有置信度分数的主观信念,并可在新证据到来时更新。 观察网络存储由底层事实合成的、不带偏好的实体摘要。 TEMPR 通过抽取带时间范围的叙事事实、解析实体并构建图链接,以及通过多策略搜索检索记忆来实现保留和回忆。 CARA 通过把检索到的记忆与智能体画像(姓名、背景和性情行为参数)结合,生成受偏好塑造的响应,并形成和强化观点,从而实现反思。 正如我们将在实验中展示的那样,该设计相比现有记忆系统具有多项性能优势。

Our contributions are:

1. A unified memory architecture for agents. Hindsight's organization of memory into separate networks with core operations helps separate evidence, synthesize summaries better, and supports evolving beliefs, while supporting epistemic clarity and traceability.

2. Retain, recall and reflect layers specialized for agent memory. Our key operational primitives help turn conversational transcripts into a structured, queryable memory bank with ability to reason over this bank and update beliefs in a stable, auditable manner.

3. Empirical evaluation on long-horizon conversational benchmarks. We evaluate Hindsight on LongMemEval and LoCoMo: with an open-source 20B backbone it lifts overall accuracy from 39.0% to 83.6% over a full-context baseline on LongMemEval and from 75.78% to 85.67% on LoCoMo, and with larger backbones reaches 91.4% and 89.61% respectively, matching or surpassing prior memory systems and frontier-backed full-context baselines.

我们的贡献如下:

1. 面向智能体的统一记忆架构。 Hindsight 把记忆组织为带有核心操作的独立网络,有助于分离证据、更好地合成摘要并支持不断演化的信念,同时提供认识论清晰性和可追踪性。

2. 专门面向智能体记忆的保留、回忆和反思层。 我们的关键操作原语有助于把对话记录转化为结构化、可查询的记忆库,并能够在该记忆库上推理,以稳定、可审计的方式更新信念。

3. 在长程对话基准上的实证评估。 我们在 LongMemEval 和 LoCoMo 上评估 Hindsight:使用开源 20B 骨干时,它在 LongMemEval 上相比完整上下文基线把总体准确率从 39.0% 提升至 83.6%,在 LoCoMo 上从 75.78% 提升至 85.67%;使用更大骨干时则分别达到 91.4% 和 89.61%,达到或超过先前记忆系统以及由前沿模型支撑的完整上下文基线。

Recent work in agent memory spans context management systems that handle LLM window constraints, structured memory architectures built on temporal knowledge graphs, evaluation benchmarks that test these systems, and cognitive frameworks inspired by human memory. We group related work into two categories and discuss how Hindsight differs.

近期智能体记忆工作涵盖处理 LLM 窗口约束的上下文管理系统、构建在时间知识图谱上的结构化记忆架构、用于测试这些系统的评估基准,以及受人类记忆启发的认知框架。 我们把相关工作分为两类,并讨论 Hindsight 的不同之处。

2.1 Memory Architectures and Systems

Tiered context management systems. Early systems extended context using tiered architectures. MemGPT pages information between active prompt and archival storage, treating memory as unstructured text blocks without separating facts from beliefs. LIGHT handles conversations up to 10 million tokens using episodic memory, working memory, and scratchpad buffers, but does not distinguish subjective beliefs from objective observations.

分层上下文管理系统。 早期系统使用分层架构扩展上下文。 MemGPT 在活动提示与归档存储之间分页调度信息,把记忆视为非结构化文本块,而不区分事实与信念。 LIGHT 使用情景记忆、工作记忆和草稿区缓冲区处理最多 1000 万 token 的对话,但不区分主观信念与客观观察。

Structured memory with knowledge graphs. Several systems use knowledge graphs for retrieval. Zep builds temporal knowledge graphs with bi-temporal modeling that tracks when facts are valid versus when they were recorded, but focuses on objective facts without modeling subjective beliefs or behavioral profiles. A-Mem uses the Zettelkasten method to create atomic notes with LLM-generated links that evolve over time, but treats all memory uniformly without separating facts from opinions. Mem0 focuses on production efficiency with dense retrieval and graph representations, handling fact conflicts through database updates rather than belief evolution. Memory-R1 uses reinforcement learning to train agents on memory operations to maximize QA accuracy, but does not focus on cognitive structure and behavioral profile consistency. MemVerse handles multimodal memory through a dual-path architecture combining retrieval and parametric memory via fine-tuning, which raises editability issues that Hindsight avoids by using only external memory. KARMA targets embodied AI with 3D scene graphs for spatial reasoning in robotics, not conversational agents. Table 1 compares these systems across key architectural features.

采用知识图谱的结构化记忆。 多个系统使用知识图谱进行检索。 Zep 通过双时间建模构建时间知识图谱,追踪事实何时有效以及何时被记录,但它关注客观事实,而不建模主观信念或行为画像。 A-Mem 使用卡片盒笔记法创建带有 LLM 生成链接且随时间演化的原子笔记,但统一处理所有记忆,不区分事实与观点。 Mem0 通过密集检索和图表示关注生产效率,并通过数据库更新而非信念演化来处理事实冲突。 Memory-R1 使用强化学习训练智能体执行记忆操作,以最大化问答准确率,但并不关注认知结构和行为画像一致性。 MemVerse 通过结合检索与经微调得到的参数记忆的双路径架构处理多模态记忆,这会引出可编辑性问题;Hindsight 只使用外部记忆,从而避免了该问题。 KARMA 面向具身 AI,使用 3D 场景图完成机器人空间推理,而不是面向对话智能体。 表1比较了这些系统的关键架构特征。

表1:记忆架构比较。✓:具备该特征;×:不具备该特征。Hindsight 将客观事实与主观观点分离,维护由画像调节的性情行为参数推理,并支持带置信度分数的动态观点演化。
FeatureMemGPTLIGHTZepA-MemMem0Memory-R1MemVerseKARMAHindsight
(Ours)
Separates facts/opinions××××××××
Temporal reasoning×××××××
Entity-aware graph××××
Opinion evolution××××××××
Behavioral parameters××××××××
Confidence scores××××××××
External-only memory×
Multi-strategy retrieval××××Partial××

2.2 Benchmarks and Cognitive Foundations

Evaluation benchmarks. Recent benchmarks that aim to evaluate long-context reasoning and selective recall have grown in prominence. LoCoMo features very long dialogues (up to 35 sessions) wherein LLMs and traditional RAG systems struggle with long-range temporal and causal reasoning. LongMemEval tests information extraction, multi-session reasoning, and temporal reasoning across conversations featuring upto 1.5 million tokens. MemoryBench tests continual learning from feedback and finds that existing systems fail to use feedback effectively without forgetting. These benchmarks show that current systems are unable to maintain consistent behavioral profiles or handle opinion evolution.

评估基准。 旨在评估长上下文推理和选择性回忆的近期基准越来越受重视。 LoCoMo 包含非常长的对话(最多 35 个会话),LLM 和传统 RAG 系统在其中难以完成长距离时间与因果推理。 LongMemEval 在包含多达 150 万 token 的对话上测试信息抽取、多会话推理和时间推理。 MemoryBench 测试从反馈中持续学习的能力,并发现现有系统无法在不遗忘的情况下有效利用反馈。 这些基准表明,当前系统无法保持一致的行为画像或处理观点演化。

Cognitive foundations. Several surveys have attempted to connect agent memory to human memory models. Recent work categorizes memory by source, form, and operations, noting that most work focuses on task completion over consistency and that parametric memory is hard to interpret. Other work draws parallels between episodic/semantic memory and RAG/knowledge graphs, pointing out gaps in implicit memory and forgetting. The memory quadruple framework highlights key facets of memory---storage, persistence, access, and controllability---arguing for external memory that supports dynamic updates. Work on cognitive memory distinguishes explicit and implicit memory and notes that LLMs struggle with human-like knowledge integration. Recent findings show that LLMs lack true working memory and must externalize state into context windows.

认知基础。 多项综述尝试把智能体记忆与人类记忆模型联系起来。 近期工作按来源、形式和操作对记忆进行分类,并指出多数工作更关注任务完成而非一致性,而且参数记忆难以解释。 其他工作把情景记忆和语义记忆分别类比于 RAG 和知识图谱,并指出隐式记忆与遗忘方面的缺口。 记忆四元组框架强调记忆的关键方面——存储、持久性、访问和可控性——并主张采用支持动态更新的外部记忆。 认知记忆研究区分显式记忆和隐式记忆,并指出 LLM 难以实现类似人类的知识整合。 近期发现表明,LLM 缺乏真正的工作记忆,必须把状态外化到上下文窗口中。

While earlier work has focused on storage, retrieval, and scale, recent developments in agent systems blur what agents observe versus what they believe, cannot maintain stable behavioral profiles across long interactions, and have no way to evolve subjective beliefs over time. In the rest of the paper, we demonstrate how Hindsight addresses these gaps.

尽管早期工作关注存储、检索和规模,但智能体系统的近期发展仍会混淆智能体观察到的内容与相信的内容,无法在长时间交互中保持稳定的行为画像,也没有办法使主观信念随时间演化。 在本文其余部分,我们将展示 Hindsight 如何弥补这些缺口。

3. Hindsight Overview

Hindsight is a memory architecture for AI agents that unifies long-term factual recall with preference-conditioned reasoning. Each agent is backed by a memory bank that accumulates interactions encountered over time, and a reasoning layer that uses this memory to answer questions, form opinions, and update its beliefs in a consistent way.

Hindsight 是一种面向 AI 智能体的记忆架构,统一了长期事实回忆与偏好条件推理。 每个智能体都有一个随时间累积所遇交互的记忆库作为支撑,以及一个利用这些记忆回答问题、形成观点并以一致方式更新信念的推理层。

3.1 Four-Network Memory Organization

At the core of Hindsight is a memory bank organized into four logical networks, each serving a distinct epistemic role. Let M={W,B,O,S} denote the four networks that partition the memory space, where each network maintains a specialized subset of facts. The world network W stores objective facts about the external world---factual statements independent of the agent's perspective or preferences, where each fact fwW captures information such as relationships, attributes, or events observed in the environment. The experience network B stores biographical information about the agent itself, written in the first person, where each fact fbB represents the agent's own experiences, actions, or recommendations. The opinion network O stores subjective judgments formed by the agent, where each opinion foO is a tuple (t,c,τ) with t as the opinion text, c[0,1] as a confidence score representing belief strength, and τ as the timestamp of formation. The observation network S stores preference-neutral summaries of entities synthesized from multiple underlying facts, where each observation fsS provides a compact, objective profile derived from facts in W and B. Together, these networks provide a structured mental model of the agent's world knowledge, personal history, subjective beliefs, and synthesized entity profiles.

Hindsight 的核心是一个由四个逻辑网络组织而成的记忆库,每个网络承担不同的认识论角色。 M={W,B,O,S} 表示划分记忆空间的四个网络,每个网络维护一个专门的事实子集。 世界网络 W 存储关于外部世界的客观事实,即独立于智能体视角或偏好的事实陈述;其中每个事实 fwW 捕获关系、属性或在环境中观察到的事件等信息。 经验网络 B 以第一人称存储关于智能体自身的传记信息,其中每个事实 fbB 表示智能体自己的经历、行动或建议。 观点网络 O 存储智能体形成的主观判断,其中每个观点 foO 都是一个三元组 (t,c,τ)t 是观点文本,c[0,1] 是表示信念强度的置信度分数,τ 是形成时间戳。 观察网络 S 存储由多个底层事实合成的、不带偏好的实体摘要,其中每项观察 fsS 都提供一个从 WB 中的事实推导出的紧凑客观画像。 这些网络共同提供了一个关于智能体世界知识、个人历史、主观信念和合成实体画像的结构化心智模型。

World Network: “Alice works at Google in Mountain View on the AI team”
Experience Network: “I recommended Yosemite National Park to Alice for hiking”
Opinion Network: “Python is better for data science because of libraries like pandas” (Confidence: 0.85)
Observation Network: “Alice is a software engineer at Google specializing in machine learning”
图1:四个记忆网络中所存事实的示例。每个网络在组织智能体知识时承担不同的认识论角色。

3.2 Three Core Operations

Hindsight exposes the four-network memory structure through three core operations that govern how information is added, accessed, and updated. Let B denote a memory bank, which is a named container that holds the four networks M={W,B,O,S} and an associated agent profile. Let D denote input data (e.g., conversational transcripts or documents to be retained), let Q denote a query, and let k denote a token budget. The three operations are defined as follows:

Hindsight 通过三项核心操作开放四网络记忆结构,这些操作控制信息如何被加入、访问和更新。 B 表示一个记忆库,它是一个具名容器,包含四个网络 M={W,B,O,S} 以及相关的智能体画像。 D 表示输入数据(例如要保留的对话记录或文档),Q 表示查询,k 表示 token 预算。 三项操作定义如下:

Retain(B,D)M takes a memory bank B and input data D, ingests the conversational transcripts or other inputs in D, and converts them into narrative facts with temporal ranges, canonical entities, and graph links, extracting facts from D, classifying each fact into one of the four networks, and updating the memory graph (when new evidence arrives, existing beliefs in O are also updated through an opinion reinforcement mechanism).

Retain(B,D)M 接收记忆库 B 和输入数据 D,摄取 D 中的对话记录或其他输入,并把它们转换为带有时间范围、规范实体和图链接的叙事事实;该过程从 D 中抽取事实,把每个事实分类到四个网络之一,并更新记忆图(新证据到来时,O 中的现有信念也会通过观点强化机制更新)。

Recall(B,Q,k){f1,,fn} takes as input memory bank B, query Q, and token budget k, and retrieves a variable-sized set of relevant memories from B in response to query Q, combining semantic vector search, keyword search, graph traversal, and temporal filtering into a unified multi-strategy retrieval pipeline that returns the n most relevant facts such that their combined token count does not exceed k.

Recall(B,Q,k){f1,,fn} 以记忆库 B、查询 Q 和 token 预算 k 为输入,根据查询 QB 中检索一个大小可变的相关记忆集合;它把语义向量搜索、关键词搜索、图遍历和时间过滤组合成统一的多策略检索流水线,返回 n 个最相关的事实,并确保它们的 token 总数不超过 k

Finally, Reflect(B,Q,Θ)(r,O) takes memory bank B, query Q, and behavioral profile Θ (consisting of disposition behavioral parameters (skepticism, literalism, empathy) and a bias-strength parameter), generates a response r to query Q whose reasoning and tone are shaped by Θ, first invoking recall to retrieve relevant memories from B, then applying preference-conditioned generation to produce a response, where new opinions may be formed during this process, resulting in an updated opinion network O.

最后,Reflect(B,Q,Θ)(r,O) 接收记忆库 B、查询 Q 和行为画像 Θ(由性情行为参数——怀疑性、字面性、共情性——以及偏置强度参数组成),为查询 Q 生成推理方式和语气受 Θ 塑造的响应 r;它首先调用回忆从 B 中检索相关记忆,然后应用偏好条件生成来产生响应,在此过程中可能形成新观点,最终得到更新后的观点网络 O

End-to-end Hindsight architecture
图2:Hindsight 端到端架构。系统通过 TEMPR 的保留流水线处理输入数据,构建包含世界、经验、观点和观察四个网络的结构化记忆库;回忆流水线执行四路并行检索、RRF 融合与交叉编码器重排;CARA 的反思操作结合事实与行为画像生成偏好条件响应,并更新观点网络。

3.3 Component Architecture

The two main components of Hindsight implement these operations with distinct responsibilities: TEMPR realizes the retain and recall stages. It builds the four-network memory graph via LLM-powered narrative fact extraction, entity resolution, and link construction. TEMPR provides a retrieval interface optimized for agents, with token budgets and multi-hop discovery over temporal and entity-aware links. The retain pipeline processes input data by extracting narrative facts, generating embeddings, resolving entities, and constructing four types of graph links: temporal, semantic, entity, and causal.

Hindsight 的两个主要组件以不同职责实现这些操作: TEMPR 实现保留和回忆阶段。 它通过由 LLM 驱动的叙事事实抽取、实体解析和链接构建来建立四网络记忆图。 TEMPR 提供为智能体优化的检索接口,支持 token 预算以及在时间与实体感知链接上的多跳发现。 保留流水线通过抽取叙事事实、生成嵌入、解析实体,并构建时间、语义、实体和因果四类图链接来处理输入数据。

CARA realizes the reflect stage. It integrates configurable disposition behavioral parameters into the reasoning process, operates over Hindsight's networks to separate facts from beliefs, and maintains a dynamic opinion network via opinion formation and reinforcement. The behavioral profile consists of three disposition parameters (skepticism, literalism, empathy), each ranging from 1 to 5, and a bias-strength parameter between 0 and 1. CARA uses this profile to modulate the generation process, ensuring that responses align with the configured behavioral style. Figure 2 provides a comprehensive view of the end-to-end architecture, showing the data flow from input through TEMPR's retain and recall pipelines, the four-network memory bank structure, and CARA's preference-conditioned reflect operation.

CARA 实现反思阶段。 它把可配置的性情行为参数整合进推理过程,在 Hindsight 的网络上运行以分离事实与信念,并通过观点形成和强化来维护动态观点网络。 行为画像由三个性情参数(怀疑性、字面性和共情性)以及一个偏置强度参数组成;每个性情参数取值为 1 到 5,偏置强度参数取值为 0 到 1。 CARA 使用该画像调节生成过程,确保响应符合配置的行为风格。 图2全面展示了端到端架构,包括输入经过 TEMPR 的保留与回忆流水线的数据流、四网络记忆库结构,以及 CARA 的偏好条件反思操作。

3.4 Design Principles

The architecture of Hindsight is designed around several goals that recur throughout the paper. First, we aim for epistemic clarity, wherein facts, observations, and opinions are kept structurally distinct so that developers and users can see what the agent knows versus what it believes. The four-network organization M={W,B,O,S} provides explicit separation between objective evidence (W,B), subjective beliefs (O), and synthesized summaries (S). Second, each memory unit f carries temporal metadata (τs,τe,τm) where τs and τe define the occurrence interval and τm denotes the mention time, enabling precise historical queries and recency-aware ranking. This achieves temporal awareness, wherein for a query with constraint [τstart,τend], the system retrieves facts where the occurrence interval overlaps with the query range.

Hindsight 的架构围绕本文反复出现的多项目标设计。 第一,我们追求认识论清晰性,在结构上区分事实、观察和观点,使开发者和用户能够看清智能体知道什么以及相信什么。 四网络组织 M={W,B,O,S} 明确分离了客观证据(W,B)、主观信念(O)和合成摘要(S)。 第二,每个记忆单元 f 都带有时间元数据 (τs,τe,τm),其中 τsτe 定义发生区间,τm 表示提及时间,从而支持精确历史查询和新近性感知排序。 这实现了时间感知:对于约束为 [τstart,τend] 的查询,系统检索发生区间与查询范围重叠的事实。

Third, this approach supports Entity-aware reasoning leveraging graph links over shared entities, semantic similarity, temporal proximity, and causal relationships support multi-hop discovery of indirectly related information. The memory graph is the underlying data structure that connects all memory units: formally, G=(V,E) where V is the set of all memory units (facts stored in the four networks) and E is the set of weighted edges between them. Each edge eE has a type {temporal,semantic,entity,causal} and weight we[0,1], enabling traversal-based retrieval. Finally, Hindsight aims for preference consistency, disposition behavioral parameters (skepticism, literalism, empathy) and a bias-strength parameter ensure that agents express stable perspectives over time while still allowing their beliefs to evolve as new evidence arrives, where the confidence score c in each opinion (t,c,τ)O is updated through a reinforcement mechanism when supporting or contradicting evidence is retained.

第三,该方法支持实体感知推理,利用共享实体、语义相似性、时间邻近性和因果关系上的图链接,对间接相关信息进行多跳发现。 记忆图是连接所有记忆单元的底层数据结构:形式上,G=(V,E),其中 V 是所有记忆单元(存储在四个网络中的事实)的集合,E 是它们之间加权边的集合。 每条边 eE 都有类型 {temporal,semantic,entity,causal} 和权重 we[0,1],从而支持基于遍历的检索。 最后,Hindsight 追求偏好一致性:性情行为参数(怀疑性、字面性、共情性)和偏置强度参数确保智能体随时间表达稳定观点,同时仍允许其信念随新证据到来而演化;当保留支持或反驳证据时,每个观点 (t,c,τ)O 中的置信度分数 c 会通过强化机制更新。

The following sections instantiate Hindsight's architecture. Section 4 describes TEMPR, which implements Hindsight's retain and recall operations and builds the four-network memory graph. Section 5 then presents CARA, which implements the reflect operation and shows how preference-aware reasoning is layered on top of this memory substrate. Section 6 describes the unified integration of these components followed by experimental results.

以下各节具体说明 Hindsight 的架构。 第 4 节描述 TEMPR,它实现 Hindsight 的保留与回忆操作并构建四网络记忆图。 随后,第 5 节介绍 CARA,它实现反思操作,并展示如何在这一记忆基底上叠加偏好感知推理。 第 6 节描述这些组件的统一整合,之后给出实验结果。

4. TEMPR: Retain and Recall

As described earlier, TEMPR (Temporal Entity Memory Priming Retrieval) implements Hindsight's retain and recall operations. It is responsible for turning raw conversational transcripts into a structured, temporal, entity-aware memory graph, and for retrieving variable amounts of relevant information for downstream reasoning. We first describe how TEMPR retains information by organizing memories, extracting narrative facts, and constructing an entity-aware graph. We then describe how it recalls information using a four-way parallel retrieval architecture with fusion and neural re-ranking. The neural components used in this pipeline, including the embedding model for semantic retrieval, the cross encoder reranker, and the downstream LLM, can all be treated as configurable modules rather than fixed backbones.

如前所述,TEMPR(时间实体记忆启动检索)实现 Hindsight 的保留与回忆操作。 它负责把原始对话记录转化为结构化、具备时间与实体感知能力的记忆图,并为下游推理检索数量可变的相关信息。 我们首先描述 TEMPR 如何通过组织记忆、抽取叙事事实和构建实体感知图来保留信息。 随后,我们描述它如何使用具有融合和神经重排的四路并行检索架构来回忆信息。 该流水线使用的神经组件,包括用于语义检索的嵌入模型、交叉编码器重排器和下游 LLM,都可以视为可配置模块,而不是固定骨干。

4.1 Retain: Building a Temporal Entity Memory Graph

4.1.1 Memory Organization

As introduced in Section 3, Hindsight organizes memories into four networks to separate objective information, subjective beliefs, and synthesized summaries. TEMPR instantiates this design by storing each extracted fact in exactly one network and attaching it to the shared memory graph. Each fact f is assigned a type (f){world,experience,opinion,observation} that determines its target network.

如第 3 节所述,Hindsight 把记忆组织为四个网络,以分离客观信息、主观信念和合成摘要。 TEMPR 通过把每个抽取事实仅存入一个网络,并将其附着到共享记忆图上来实现这一设计。 每个事实 f 都被分配一个类型 (f){world,experience,opinion,observation},该类型决定其目标网络。

Each memory is stored as a self-contained node that combines natural language, vector representations, and temporal metadata. Formally, a memory unit is a tuple:

每条记忆都被存储为一个结合自然语言、向量表示和时间元数据的自包含节点。 形式上,一个记忆单元是如下元组:

f=(u,b,t,v,τs,τe,τm,,c,x)

where u is a unique identifier, b is the bank identifier, t is the narrative text, vRd is the embedding vector, τs and τe define the occurrence interval, τm is the mention timestamp, is the fact type, c[0,1] is an optional confidence score (for opinions), and x contains auxiliary metadata such as context, access count, and full-text search vectors. These fields allow TEMPR to treat each memory as a single unit for storage, graph construction, and retrieval, while supporting both semantic and lexical search as well as temporal and opinion-aware reasoning.

其中,u 是唯一标识符,b 是记忆库标识符,t 是叙事文本,vRd 是嵌入向量,τsτe 定义发生区间,τm 是提及时间戳, 是事实类型,c[0,1] 是可选的置信度分数(用于观点),x 包含上下文、访问次数和全文搜索向量等辅助元数据。 这些字段使 TEMPR 能够把每条记忆作为单个单元进行存储、图构建和检索,同时支持语义与词汇搜索以及时间感知和观点感知推理。

4.1.2 LLM-Based Narrative Fact Extraction

TEMPR uses an open-source LLM to convert conversational transcripts into narrative facts and associated metadata. Compared to rule-based or sentence-level pipelines, this approach lets us extract self-contained facts that preserve cross-turn context and reasoning.

TEMPR 使用开源 LLM 把对话记录转换为叙事事实及相关元数据。 相比基于规则或句子级的流水线,该方法使我们能够抽取保留跨轮次上下文和推理的自包含事实。

Chunking Strategy. We use coarse-grained chunking, extracting 2--5 comprehensive facts per conversation. Each fact is intended to cover an entire exchange rather than a single utterance, be narrative and self-contained, include all relevant participants, and preserve the pragmatic flow of the interaction. Figure 3 illustrates this approach. Instead of storing five fragmented facts, we store a single narrative fact that makes downstream retrieval and reasoning less sensitive to local segmentation decisions.

分块策略。 我们采用粗粒度分块,每段对话抽取 2--5 个综合事实。 每个事实都旨在覆盖完整交流而不是单条话语,采用叙事形式且自包含,纳入所有相关参与者,并保留交互的语用流程。 图3展示了这一方法。 我们不存储五个碎片化事实,而是存储一个叙事事实,使下游检索和推理对局部分割决策不那么敏感。

Fragmented Extraction (Avoided)
Five separate facts:
  • “Bob suggested Summer Vibes”
  • “Alice wanted something unique”
  • “They considered Sunset Sessions”
  • “Alice likes Beach Beats”
  • “They chose Beach Beats”
Narrative Extraction (Used)
Single narrative fact:

Alice and Bob discussed naming their summer party playlist. Bob suggested “Summer Vibes” because it is catchy and seasonal, but Alice wanted something more unique. Bob then proposed “Sunset Sessions” and “Beach Beats,” with Alice favoring “Beach Beats” for its playful and fun tone. They ultimately decided on “Beach Beats” as the final name.

图3:碎片化事实抽取与叙事事实抽取的比较。TEMPR 使用叙事抽取创建全面、自包含的事实,以保留多个对话轮次中的上下文和推理。

Extraction Pipeline. The extraction model is prompted to produce structured output containing the narrative text of each fact, normalized temporal information (including ranges), participants and their roles, a fact type indicating the target network, and a set of mentioned entities (see the Appendix for the complete prompt template and the structured output schema). Internally, we decompose this into the following steps: 1) coreference resolution over the conversation to identify entity mentions and their referents; 2) temporal expression normalization and range extraction to convert relative time references (last week'', in March'') into absolute timestamps (τs,τe); 3) participant attribution to determine who did or said what in the conversation; 4) preservation of explicit reasoning or justifications when present in the dialogue; 5) fact type classification to assign (f){world,experience,opinion,observation} based on the nature of the statement; and 6) entity extraction to identify PERSON, ORGANIZATION, LOCATION, PRODUCT, CONCEPT, and OTHER entity types. Before embedding, we augment each fact with a human-readable time reference derived from the normalized timestamps, which improves temporal awareness during retrieval and reranking.

抽取流水线。 抽取模型根据提示生成结构化输出,其中包含每个事实的叙事文本、规范化时间信息(包括范围)、参与者及其角色、指示目标网络的事实类型,以及一组被提及实体(完整提示模板和结构化输出 schema 见附录)。 在内部,我们把它分解为以下步骤:1) 在对话上执行共指消解,以识别实体提及及其指代对象;2) 对时间表达进行规范化和范围抽取,把相对时间指代(“上周”“三月”)转换为绝对时间戳 (τs,τe)3) 对参与者进行归属,确定对话中谁做了什么或说了什么;4) 保留对话中出现的显式推理或理由;5) 根据陈述性质进行事实类型分类,分配 (f){world,experience,opinion,observation}6) 执行实体抽取,识别 PERSON、ORGANIZATION、LOCATION、PRODUCT、CONCEPT 和 OTHER 类型的实体。 在生成嵌入之前,我们用从规范化时间戳导出的人类可读时间指代增强每个事实,从而改善检索和重排期间的时间感知能力。

4.1.3 Entity Resolution and Linking

Entity resolution links memories that refer to the same underlying entity, enabling multi-hop reasoning over the memory graph. Recognition and Disambiguation. The LLM used for fact extraction (described above) also identifies entity mentions during fact extraction. We then map mentions to canonical entities using a combination of string and name similarity (e.g., Levenshtein distance), co-occurrence patterns with other entities, and temporal proximity of mentions. Let M be the set of all entity mentions and E be the set of canonical entities. The resolution function ρ:ME maps each mention mM to a canonical entity eE by maximizing a similarity score:

实体解析把指向同一底层实体的记忆连接起来,从而支持在记忆图上进行多跳推理。 识别与消歧。 上述用于事实抽取的 LLM 也会在事实抽取期间识别实体提及。 随后,我们综合使用字符串与名称相似度(例如 Levenshtein 距离)、与其他实体的共现模式,以及实体提及的时间邻近性,把提及映射到规范实体。 M 为所有实体提及的集合,E 为规范实体集合。 解析函数 ρ:ME 通过最大化相似度分数,把每个提及 mM 映射到规范实体 eE

ρ(m)=argmaxeE[αsimstr(m,e)+βsimco(m,e)+γsimtemp(m,e)]

where simstr, simco, and simtemp are string similarity, co-occurrence similarity, and temporal proximity scores respectively, and α,β,γ are weighting coefficients. Entity Link Structure. Each canonical entity eE induces edges of type entity between all memories that mention it. Formally, for any two memory units fi and fj that both mention entity e, we create a bidirectional link:

其中,simstrsimcosimtemp 分别是字符串相似度、共现相似度和时间邻近性分数,α,β,γ 是加权系数。 实体链接结构。 每个规范实体 eE 都会在所有提及它的记忆之间产生类型为 entity 的边。 形式上,对于同时提及实体 e 的任意两个记忆单元 fifj,我们创建一条双向链接:

eij=(fi,fj,w=1.0,=entity,e)

These entity links enable graph traversal to surface indirectly related facts. For example, conversations about the same person across distant time spans that would be difficult to retrieve with vector or keyword search alone can be discovered through entity links.

这些实体链接使图遍历能够找到间接相关的事实。 例如,仅用向量或关键词搜索难以检索到的、跨越遥远时间段且涉及同一个人的对话,可以通过实体链接发现。

In addition to entity links, the memory graph G=(V,E) contains three other edge types. Let V be the set of all memory units and E be the set of directed edges. Each edge eE is a tuple (fi,fj,w,) where fi,fjV are memory units, w[0,1] is a weight, and is the link type.

除实体链接外,记忆图 G=(V,E) 还包含另外三种边。 V 为所有记忆单元的集合,E 为有向边集合。 每条边 eE 都是一个元组 (fi,fj,w,),其中 fi,fjV 是记忆单元,w[0,1] 是权重, 是链接类型。

1) Temporal Links. For any two memories fi and fj with temporal metadata, we create a temporal link if they are close in time. The weight decays as temporal distance increases:

1) 时间链接。 对于带有时间元数据的任意两条记忆 fifj,如果它们在时间上接近,我们就创建一条时间链接。 权重随时间距离增大而衰减:

wijtemp=exp(Δtijσt)

where Δtij is the time difference between fi and fj, and σt is a decay parameter.

其中,Δtijfifj 之间的时间差,σt 是衰减参数。

2) Semantic Links. For any two memories fi and fj with embeddings vi,vjRd, we create a semantic link if their cosine similarity exceeds a threshold θs:

2) 语义链接。 对于嵌入为 vi,vjRd 的任意两条记忆 fifj,如果它们的余弦相似度超过阈值 θs,我们就创建一条语义链接:

wijsem={vivjvivj,if vivjvivjθs,0,otherwise.

3) Causal Links. Causal relationships are extracted by the LLM and represent cause-effect relationships. These links are upweighted during traversal to favor explanatory connections. Let CV×V be the set of causal relationships identified by the LLM. For (fi,fj)C, we create a causal link with weight wijcausal=1.0 and type {causes,caused_by,enables,prevents}. Together, entity, temporal, semantic, and causal links support multi-hop discovery across the memory graph, allowing TEMPR to surface information that is related by identity, time, meaning, or explanation rather than by surface form alone.

3) 因果链接。 因果关系由 LLM 抽取,表示原因与结果之间的关系。 遍历期间会提高这些链接的权重,以优先考虑解释性连接。 CV×V 为 LLM 识别出的因果关系集合。 对于 (fi,fj)C,我们创建一条权重为 wijcausal=1.0、类型为 {causes,caused_by,enables,prevents} 的因果链接。 实体、时间、语义和因果链接共同支持在记忆图上进行多跳发现,使 TEMPR 能够找到通过身份、时间、含义或解释相关,而不只是表面形式相似的信息。

4.1.5 The Observation Paradigm

Observations provide structured, objective summaries of entities that sit on top of raw narrative facts. Motivation and Design. For simple entity-centric queries (e.g., ``Tell me about Alice''), retrieving all underlying facts can be inefficient and redundant. Instead, we maintain synthesized profiles (observations) that summarize salient properties of each entity and can be referenced directly in responses (see the Appendix for the complete observation generation prompt). Let FeV be the set of all facts that mention entity e. An observation oe is generated by applying an LLM-based summarization function:

观察是在原始叙事事实之上建立的、关于实体的结构化客观摘要。 动机与设计。 对于简单的实体中心查询(例如“介绍一下 Alice”),检索所有底层事实可能既低效又冗余。 因此,我们维护概括每个实体显著属性的合成画像(观察),并可在响应中直接引用这些画像(完整观察生成提示见附录)。 FeV 为所有提及实体 e 的事实集合。 通过应用基于 LLM 的摘要函数生成观察 oe

oe=SummarizeLLM(Fe)

where the LLM is instructed to produce a concise, preference-neutral summary. Observations vs. Opinions. Observations and opinions differ along several dimensions that matter for reasoning. Observations are generated without behavioral profile influence, whereas opinions are explicitly shaped by the bank's disposition behavioral parameters (skepticism, literalism, empathy). Observations provide objective summaries of entities (e.g., roles, attributes), while opinions capture subjective evaluations and judgments. Observations do not carry confidence scores, but opinions include a confidence score c[0,1] representing belief strength. Observations are produced via background synthesis and regenerated when underlying facts change, whereas opinions are formed during reflection and updated via reinforcement.

其中,LLM 被要求生成简洁且不带偏好的摘要。 观察与观点。 观察和观点在多个与推理相关的维度上存在差异。 观察的生成不受行为画像影响,而观点会明确受到记忆库的性情行为参数(怀疑性、字面性、共情性)塑造。 观察提供实体的客观摘要(例如角色、属性),而观点捕获主观评价和判断。 观察不带有置信度分数,而观点包含表示信念强度的置信度分数 c[0,1] 观察通过后台合成产生,并在底层事实变化时重新生成;观点则在反思期间形成并通过强化更新。

Background Processing. Observation generation and regeneration run asynchronously to maintain low-latency writes while gradually improving the quality of entity-centric summaries. When new facts mentioning entity e are retained, a background task is triggered to recompute oe based on the updated set Fe.

后台处理。 观察生成和再生成以异步方式运行,在保持低延迟写入的同时逐步提高实体中心摘要的质量。 当保留了提及实体 e 的新事实时,会触发后台任务,根据更新后的集合 Fe 重新计算 oe

4.2 Recall: Agent-Optimized Retrieval Architecture

Given the memory graph described above, TEMPR must retrieve variable amounts of relevant context for a query while respecting the downstream LLM's context window. Unlike conventional search systems that expose a fixed top-k interface, our setting requires an agent-optimized retrieval layer. The caller can trade off latency and coverage, and the system must exploit both the graph structure and temporal metadata of memories. To accomplish the above objective, TEMPR combines several complementary retrieval strategies into a single pipeline with Reciprocal Rank Fusion and neural reranking. The result is a recall mechanism that can surface both directly and indirectly related memories (via entities, time, and causal links), and present them in a form that fits within a specified token budget.

给定上述记忆图,TEMPR 必须在遵守下游 LLM 上下文窗口的同时,为查询检索数量可变的相关上下文。 与提供固定 top-k 接口的传统搜索系统不同,我们的设置需要一个为智能体优化的检索层。 调用方可以在延迟和覆盖范围之间权衡,而系统必须同时利用图结构和记忆的时间元数据。 为实现上述目标,TEMPR 把多种互补检索策略组合为一条包含倒数排名融合和神经重排的流水线。 由此得到的回忆机制既能找到直接相关记忆,也能找到通过实体、时间和因果链接间接相关的记忆,并以适合指定 token 预算的形式呈现它们。

4.2.1 Agent-Optimized Retrieval Interface

Rather than exposing a fixed top-k interface, TEMPR lets the caller specify how much context to retrieve and how much effort to spend finding it. Formally, the retrieval function is:

TEMPR 不提供固定的 top-k 接口,而是允许调用方指定要检索多少上下文以及投入多少检索工作量。 形式上,检索函数为:

Recall(B,Q,k){f1,,fn}

where B is the memory bank, Q is the query, and k is a token budget aligned with the downstream LLM's context window. An optional cost or latency budget may also be specified to cap how aggressively to expand search. The returned set satisfies:

其中,B 是记忆库,Q 是查询,k 是与下游 LLM 上下文窗口对齐的 token 预算。 还可以指定可选的成本或延迟预算,以限制搜索扩展的激进程度。 返回集合满足:

i=1n|fi|k

where |fi| denotes the token count of fact fi. This allows agents to request ``just enough'' memory for simple questions, or to spend more budget on broader, multi-hop recall when the task is complex.

其中,|fi| 表示事实 fi 的 token 数量。 这使智能体能够为简单问题请求“恰好足够”的记忆,或在任务复杂时为更广泛的多跳回忆投入更多预算。

4.2.2 Four-Way Parallel Retrieval

To populate the candidate set for a query, TEMPR runs four retrieval channels in parallel, each capturing a different notion of relevance. Let Q be the query with embedding vQRd and text tQ.

为了填充查询的候选集合,TEMPR 并行运行四个检索通道,每个通道捕获一种不同的相关性概念。 Q 为嵌入为 vQRd、文本为 tQ 的查询。

Semantic Retrieval (Vector Similarity). The semantic retrieval channel performs vector similarity search using cosine similarity between the query embedding vQ and memory embeddings. Let V be the set of all memory units in the target network. The semantic score for each memory f with embedding vf is:

语义检索(向量相似度)。 语义检索通道使用查询嵌入 vQ 与记忆嵌入之间的余弦相似度执行向量相似性搜索。 V 为目标网络中所有记忆单元的集合。 嵌入为 vf 的每条记忆 f 的语义分数为:

ssem(Q,f)=vQvfvQvf

We use an HNSW-based pgvector index to efficiently retrieve the top-k memories by semantic score:

我们使用基于 HNSW 的 pgvector 索引,按语义分数高效检索 top-k 条记忆:

Rsem=argmaxSV,|S|=kfSssem(Q,f)

This channel is responsible for capturing conceptual similarity and paraphrases, and typically provides high recall on meaning-level matches even when surface forms differ.

该通道负责捕获概念相似性和释义,即使表面形式不同,通常也能在含义级匹配上提供高召回率。

Keyword Retrieval (BM25). In parallel, we run a lexical channel using a full-text search with BM25 ranking over a GIN index on the memory text. Let BM25(tQ,f) denote the BM25 score for query text tQ and memory f. The top-k keyword matches are:

关键词检索(BM25)。 与此同时,我们运行一个词汇通道,在记忆文本的 GIN 索引上使用带 BM25 排名的全文搜索。 BM25(tQ,f) 表示查询文本 tQ 与记忆 f 的 BM25 分数。 top-k 关键词匹配为:

Rbm25=argmaxSV,|S|=kfSBM25(tQ,f)

This channel excels at precise matching of proper nouns and technical terms (e.g., specific API names or dataset identifiers) and complements the semantic channel by recovering items that might be underrepresented or ambiguous in the embedding space.

该通道擅长精确匹配专有名词和技术术语(例如特定 API 名称或数据集标识符),并通过找回在嵌入空间中可能表示不足或含义模糊的条目来补充语义通道。

Graph Retrieval (Spreading Activation). The third channel exploits the memory graph G=(V,E) via spreading activation. Beginning with the top semantic hits as entry points, we perform breadth-first search with activation propagation. Let A(f,t) denote the activation of memory f at step t. Initially, A(f,0)=ssem(Q,f) for entry points and A(f,0)=0 otherwise. At each step, activation propagates along edges:

图检索(扩散激活)。 第三个通道通过扩散激活利用记忆图 G=(V,E) 我们以语义检索的最高排名结果为入口点,执行带激活传播的广度优先搜索。 A(f,t) 表示记忆 f 在步骤 t 的激活值。 初始时,入口点满足 A(f,0)=ssem(Q,f),其他节点满足 A(f,0)=0 在每一步,激活值沿边传播:

A(fj,t+1)=max(fi,fj,w,)E[A(fi,t)wδμ()]

where δ(0,1) is a decay factor and μ() is a link-type multiplier. Causal and entity edges have μ()>1, while weak semantic or long-range temporal edges have μ()1. This process surfaces memories that are not obviously similar to the query text but are connected through shared entities, nearby events, or causal chains.

其中,δ(0,1) 是衰减因子,μ() 是链接类型乘数。 因果边和实体边满足 μ()>1,而较弱的语义边或长距离时间边满足 μ()1 该过程可以找到与查询文本并无明显相似性,但通过共享实体、邻近事件或因果链相连的记忆。

Temporal Graph Retrieval. When a temporal constraint is detected in the query, we invoke a temporal graph retrieval channel backed by a hybrid temporal parser. We first run a rule-based analyzer that uses two off-the-shelf date parsing libraries with multilingual support to normalize explicit and relative expressions (for example, yesterday'', last weekend'', or ``June 2024'') into a date range. This heuristic path handles the majority of queries at low latency. For queries that cannot be resolved heuristically, we fall back to a lightweight sequence-to-sequence model (here, we use google/flan-t5-small), which converts the remaining temporal expressions into a concrete date range [τstart,τend]. We then match against the occurrence intervals of memories:

时间图检索。 当查询中检测到时间约束时,我们调用一个由混合时间解析器支持的时间图检索通道。 我们首先运行基于规则的分析器,使用两个支持多语言的现成日期解析库,把显式和相对表达(例如“昨天”“上周末”或“2024 年 6 月”)规范化为日期范围。 该启发式路径能以低延迟处理大多数查询。 对于无法通过启发式方法解析的查询,我们回退到轻量级序列到序列模型(这里使用 google/flan-t5-small),把剩余时间表达转换为具体日期范围 [τstart,τend] 随后,我们与记忆的发生区间进行匹配:

Rtemp={fV:[τsf,τef][τstart,τend]}

Graph traversal is restricted to memories in Rtemp, prioritizing events that actually occurred in the requested period. Each memory is scored by temporal proximity to the query range:

图遍历被限制在 Rtemp 中的记忆上,优先考虑实际发生在所请求时段内的事件。 每条记忆依据其与查询范围的时间邻近性评分:

stemp(Q,f)=1|τmidfτmidQ|Δτ/2

where τmidf and τmidQ are the midpoints of the fact's occurrence interval and the query range, and Δτ=τendτstart is the query range duration. Running these four channels in parallel yields a diverse set of candidates: semantically similar memories, exact lexical matches, graph-neighbor memories connected via entities and causal links, and time-constrained events aligned with the query's temporal intent.

其中,τmidfτmidQ 分别是事实发生区间和查询范围的中点,Δτ=τendτstart 是查询范围持续时间。 并行运行这四个通道会产生多样化候选集合:语义相似记忆、精确词汇匹配、通过实体和因果链接相连的图邻居记忆,以及与查询时间意图对齐的时间受限事件。

4.2.3 Reciprocal Rank Fusion (RRF)

After parallel retrieval, TEMPR merges the four ranked lists using Reciprocal Rank Fusion. Let R1,R2,R3,R4 denote the ranked lists from the four channels. For each candidate memory f, let ri(f) denote its rank in list Ri (with ri(f)= if fRi). The fused score is:

并行检索后,TEMPR 使用倒数排名融合合并四个排名列表。 R1,R2,R3,R4 表示来自四个通道的排名列表。 对于每条候选记忆 f,令 ri(f) 表示它在列表 Ri 中的排名(若 fRi,则 ri(f)=)。 融合分数为:

RRF(f)=i=141k+ri(f)

where k is a small constant (e.g., k=60). Intuitively, each strategy contributes a larger amount when it places f near the top of its list, and items that appear high in multiple lists accumulate more evidence. RRF has several advantages over score-based fusion in this setting. Because it is rank-based, it does not rely on raw scores being calibrated across systems. It is also robust to missing items. If a candidate does not appear in a particular list, that strategy simply contributes nothing rather than penalizing it. Finally, memories that are consistently retrieved across different channels naturally rise to the top, reflecting multi-evidence support.

其中,k 是一个较小常数(例如 k=60)。 直观而言,当某项策略把 f 排在列表前列时,它的贡献更大;在多个列表中都排名靠前的条目会积累更多证据。 在该设置下,RRF 相比基于分数的融合具有多项优势。 由于它基于排名,因此不依赖跨系统校准原始分数。 它对缺失条目也很稳健。 如果某个候选未出现在特定列表中,该策略只是不产生贡献,而不会惩罚该候选。 最后,在不同通道中持续被检索到的记忆会自然上升到顶部,体现多证据支持。

4.2.4 Neural Cross-Encoder Reranking

After RRF fusion, TEMPR applies a neural cross-encoder reranker to refine precision on the top candidates. We use cross-encoder/ms-marco-MiniLM-L-6-v2, which jointly encodes the query and each candidate memory and outputs a relevance score. Let CE(Q,f) denote the cross-encoder score. The final ranking is:

RRF 融合后,TEMPR 应用神经交叉编码器重排器,提高顶部候选的精确率。 我们使用 cross-encoder/ms-marco-MiniLM-L-6-v2,它联合编码查询和每条候选记忆,并输出相关性分数。 CE(Q,f) 表示交叉编码器分数。 最终排名为:

Rfinal=argsortfRRRFCE(Q,f)

Compared to purely embedding-based similarity, the cross-encoder can model rich query-document interactions learned from supervised passage-ranking data, rather than relying on independent vector representations. In our setting, we also include formatted temporal information in the input text, allowing the reranker to incorporate simple temporal cues when deciding which memories are most relevant.

相比纯粹基于嵌入的相似度,交叉编码器能够建模从有监督段落排名数据中学到的丰富查询—文档交互,而不是依赖独立向量表示。 在我们的设置中,输入文本还包含格式化时间信息,使重排器在判断哪些记忆最相关时能够纳入简单时间线索。

4.2.5 Token Budget Filtering

In the final stage, TEMPR enforces the caller's token budget so that the selected memories fit within the downstream LLM's context window. Starting from the reranked list Rfinal, we iterate over candidates in order and include each memory's text until the cumulative token count reaches the specified k:

在最后阶段,TEMPR 强制执行调用方的 token 预算,使选定记忆能够放入下游 LLM 的上下文窗口。 从重排列表 Rfinal 开始,我们按顺序遍历候选,并纳入每条记忆的文本,直到累计 token 数达到指定的 k

Routput={f1,,fn:i=1n|fi|ki=1n+1|fi|>k}

where fiRfinal are ordered by relevance. This simple packing step ensures that the model receives as much relevant information as possible without exceeding its context capacity.

其中,fiRfinal 按相关性排序。 这个简单的装填步骤确保模型在不超过上下文容量的情况下接收尽可能多的相关信息。

5. CARA: Coherent Adaptive Reasoning Agents

As described earlier, CARA (Coherent Adaptive Reasoning Agents) implements the reflect operation. Given the long-term memory bank built and maintained by TEMPR, CARA turns retrieved facts and observations into preference-conditioned reasoning and a layer of explicitly stored opinions that can change over time. CARA treats an agent's behavioral profile as a first-class part of the system configuration rather than as a one-off prompt decoration. Each memory bank is associated with a configurable disposition profile (skepticism, literalism, empathy) and a concise background description, and CARA uses this profile when forming and updating opinions over the world and experience networks. Concretely, CARA provides four key capabilities: disposition-profile integration, Hindsight memory integration, opinion formation and reinforcement, and background merging with conflict resolution.

如前所述,CARA(连贯自适应推理智能体)实现了反思操作。 给定由 TEMPR 构建和维护的长期记忆库,CARA 将检索到的事实与观察转化为偏好条件推理,并形成一层可随时间变化的显式存储观点。 CARA 将智能体的行为画像视为系统配置的一等组成部分,而不是一次性的提示装饰。 每个记忆库都关联一个可配置的性情画像(怀疑性、字面性、共情性)和一段简洁的背景描述,CARA 在基于世界网络和经历网络形成与更新观点时使用该画像。 具体而言,CARA 提供四项关键能力:性情画像整合、Hindsight 记忆整合、观点形成与强化,以及带冲突解决的背景合并。

5.1 Motivation

To motivate CARA, consider two configurations of the same agent discussing remote work. In the first configuration, given a behavioral profile with low skepticism (S=1), flexible interpretation (L=2), and high empathy (E=5), an agent might form the opinion: “Remote work enables creative flexibility and spontaneous innovation.” In the second configuration, given high skepticism (S=5), highly literal interpretation (L=5), and low empathy (E=1), the same facts might instead yield: “Remote work lacks the structure and accountability needed for consistent performance.” Both configurations access identical factual information from the Hindsight memory bank, but their behavioral profiles bias how they weight different aspects (viz. flexibility vs. structure) and what conclusions they draw. CARA provides a mechanism to specify such behavioral profiles and to systematically shape opinion formation and updating as a function of these configuration choices.

为说明 CARA,考虑同一个智能体讨论远程工作的两种配置。 在第一种配置中,给定低怀疑性(S=1)、灵活解释(L=2)和高共情性(E=5)的行为画像,智能体可能形成这样的观点:“远程工作带来了创造性灵活性和自发创新。” 在第二种配置中,给定高怀疑性(S=5)、高度字面化解释(L=5)和低共情性(E=1),相同事实可能反而产生这样的观点:“远程工作缺少维持稳定绩效所需的结构与问责机制。” 两种配置访问 Hindsight 记忆库中完全相同的事实信息,但其行为画像会影响它们如何权衡不同方面(即灵活性与结构)以及得出何种结论。 CARA 提供一种机制来指定此类行为画像,并根据这些配置选择系统地塑造观点的形成与更新。

5.2 Preference Model

CARA first defines a preference space that can be parameterized and verbalized for prompting.

CARA 首先定义一个可参数化并可用语言表达以供提示使用的偏好空间。

5.2.1 Disposition Parameters

We use a three-dimensional disposition space as an interpretable set of ordered preference dimensions. Let Θ=(S,L,E,β) denote a behavioral profile where:

我们使用三维性情空间作为一组可解释的有序偏好维度。 Θ=(S,L,E,β) 表示行为画像,其中:

S{1,,5}(Skepticism; 1 = trusting, 5 = skeptical)L{1,,5}(Literalism; 1 = flexible, 5 = literal)E{1,,5}(Empathy; 1 = detached, 5 = empathetic)β[0,1](Bias strength: controls influence of preferences)

The bias strength parameter β controls how strongly the behavioral profile should shape opinion formation. When β=0, reasoning is primarily fact-based. When β=0.5, there is moderate influence from the behavioral profile. When β=1, there is strong preference-conditioned behavior.

偏置强度参数 β 控制行为画像塑造观点形成的程度。 β=0 时,推理主要基于事实。 β=0.5 时,行为画像产生中等程度的影响。 β=1 时,会产生强烈的偏好条件行为。

Rationale for using Disposition Parameters. We adopt these dimensions because they offer a compact, interpretable parameterization of reasoning style (trusting vs. skeptical, flexible vs. literal, detached vs. empathetic), intuitive axes that can be verbalized in prompts (e.g., “skeptical but highly empathetic”), and a simple interface for users configuring different agent styles.

**使用性情参数的理由。**我们采用这些维度,因为它们为推理风格(信任与怀疑、灵活与字面、疏离与共情)提供了紧凑且可解释的参数化形式、可在提示中用语言表达的直观轴线(例如“怀疑但高度共情”),以及供用户配置不同智能体风格的简单接口。

Intended Effects on Reasoning. CARA uses the behavioral profile to modulate prompts so that different configurations encourage different emphases when forming opinions. The mapping from preference values to reasoning behavior is achieved through natural language verbalization in system prompts. Higher Skepticism encourages more cautious evaluation of claims, greater emphasis on evidence quality, and reluctance to accept unsupported statements; lower Skepticism encourages more trusting and exploratory behavior. Similarly, higher Literalism encourages closer attention to exact wording and explicit instructions; lower Literalism encourages reading between the lines, inferring implicit goals, and using abstraction. Finally, higher Empathy encourages taking emotional context and interpersonal impact into account, using more supportive and face-saving language; lower Empathy encourages more blunt, task-first communication.

**对推理的预期影响。**CARA 使用行为画像调节提示,使不同配置在形成观点时鼓励不同的侧重点。 偏好值到推理行为的映射通过系统提示中的自然语言表达实现。 较高的怀疑性鼓励更谨慎地评估主张、更重视证据质量并避免接受缺乏支持的陈述;较低的怀疑性则鼓励更信任、更具探索性的行为。 类似地,较高的字面性鼓励更密切关注确切措辞和明确指令;较低的字面性鼓励领会言外之意、推断隐含目标并使用抽象。 最后,较高的共情性鼓励考虑情绪语境和人际影响,使用更具支持性和顾全面子的语言;较低的共情性则鼓励更直接、任务优先的交流。

5.3 Bank Profile Structure

Each memory bank has an associated profile that encodes the agent's identity and disposition configuration in a form suitable for prompting and reasoning. Formally, a bank profile is a tuple:

每个记忆库都有一个关联画像,以适合提示和推理的形式编码智能体的身份与性情配置。 形式上,记忆库画像是一个元组:

P=(n,Θ,h)

where n is the agent's name, Θ=(S,L,E,β) is the behavioral profile, and h is a short background description written in the first person.

其中,n 是智能体名称,Θ=(S,L,E,β) 是行为画像,h 是以第一人称书写的简短背景描述。

5.3.1 Preference Description Generation

The numeric behavioral profile Θ is verbalized into natural language so it can be injected into system messages. Let ϕ:ΘString be a verbalization function that converts numeric values to descriptive text. For example:

数值行为画像 Θ 被转述为自然语言,以便注入系统消息。 ϕ:ΘString 为将数值转换为描述性文本的语言化函数。 例如:

ϕ(Θ)=“You are generally trusting, interpret language flexibly, and are highly empathetic ...”

This verbalization connects the numeric preference configuration to the LLM's behavior by providing an explicit description of how the agent is intended to reason and communicate.

这种语言化通过明确描述智能体预期如何推理和交流,将数值偏好配置与 LLM 的行为联系起来。

5.4 Opinion Network and Opinion Formation

5.4.1 Opinion Structure

Opinions are stored in the opinion network O, separate from world and bank facts. Each opinion is a self-contained memory that records both the judgment and the context in which it was formed. Formally, an opinion is a tuple:

观点存储在观点网络 O 中,与世界事实和记忆库事实分离。 每个观点都是一个自包含记忆,同时记录判断以及形成判断时的语境。 形式上,观点是一个元组:

o=(t,c,τ,b,E)

where t is the opinion statement (including a brief rationale), c[0,1] is the confidence score representing strength of conviction, τ is the timestamp when the opinion was formed, b is the bank identifier, and E is the set of entities mentioned in the opinion.

其中,t 是观点陈述(包括简短理由),c[0,1] 是表示确信强度的置信度分数,τ 是观点形成时的时间戳,b 是记忆库标识符,E 是观点中提及的实体集合。

5.4.2 Opinion Formation Process

Opinion formation sits at the interface between TEMPR and CARA (Figure 4). When a query calls for a subjective judgment, CARA performs the following steps (see the appendix for the complete opinion formation prompt template):

观点形成位于 TEMPR 与 CARA 的接口处(图 4)。 当查询需要主观判断时,CARA 执行以下步骤(完整的观点形成提示模板见附录):

1. use TEMPR to retrieve relevant world facts and experiences (and any existing opinions) for the query Q, where FQ=Recall(B,Q,k) is the retrieved set;

2. construct a system message s that includes the bank's name n, background h, and verbalized behavioral profile ϕ(Θ);

3. run a reflect step in which the LLM produces both a natural language answer r and candidate opinion updates, where the generation is conditioned on s, FQ, and the behavioral profile Θ; and

4. parse the structured output and store any new or updated opinions in the opinion network O.

1. 使用 TEMPR 为查询 Q 检索相关的世界事实与经历(以及任何已有观点),其中 FQ=Recall(B,Q,k) 是检索集合;

2. 构造系统消息 s,其中包括记忆库名称 n、背景 h 和语言化的行为画像 ϕ(Θ)

3. 执行反思步骤,LLM 同时生成自然语言回答 r 和候选观点更新,其中生成以 sFQ 和行为画像 Θ 为条件;以及

4. 解析结构化输出,并将任何新增或更新后的观点存入观点网络 O

CARA reflect loop
图4:CARA 的反思循环。给定输入查询,智能体通过 TEMPR 回忆记忆、构建上下文、加载记忆库特定画像(背景与性情),并执行性情条件生成,同时更新观点记忆和观察记忆。

The behavioral profile Θ and its bias-strength parameter β determine how strongly this reflect step is encouraged to lean into the configured style. For low bias values (β0), system messages emphasize objectivity and downplay stylistic constraints. For intermediate values (β0.5), they balance factual neutrality with preference-conditioned behavior. For high bias values (β1), prompts explicitly encourage stronger, more opinionated language aligned with the specified preferences.

行为画像 Θ 及其偏置强度参数 β 决定反思步骤被鼓励贴近配置风格的程度。 对于较低的偏置值(β0),系统消息强调客观性并弱化风格约束。 对于中等偏置值(β0.5),系统消息在事实中立性与偏好条件行为之间取得平衡。 对于较高的偏置值(β1),提示会明确鼓励与指定偏好一致的更强烈、更具观点性的语言。

Each opinion formed in this way includes a confidence score c[0,1], which we interpret as belief strength. Values near 1.0 indicate very strong conviction, mid-range values indicate moderate or tentative beliefs, and low values indicate weak, easily revisable views. This scalar makes it possible to track not only what the agent believes, but also how firmly it holds those beliefs, which is important when opinions are later reinforced or revised as new evidence arrives.

以这种方式形成的每个观点都包含置信度分数 c[0,1],我们将其解释为信念强度。 接近 1.0 的值表示非常强的确信,中间值表示中等或暂定的信念,较低值表示薄弱且易于修正的看法。 这一标量不仅能够跟踪智能体相信什么,还能跟踪其持有这些信念的坚定程度;当新证据到来、观点随后得到强化或修正时,这一点十分重要。

Trusting, Flexible, Empathetic Profile (S=1,L=2,E=5)

Opinion Formed:

“Remote work is a net positive because it removes commute time and creates space for more flexible, self-directed work.”

Emphasis: Autonomy, flexibility, creative freedom

Skeptical, Literal, Detached Profile (S=5,L=5,E=1)

Opinion Formed:

“Remote work risks undermining consistent performance because it makes it harder to maintain structure, oversight, and shared routines.”

Emphasis: Structure, accountability, consistency
图5:偏好条件观点形成示例。两个具有相反行为画像的智能体访问关于远程工作的相同事实,却根据各自配置的性情参数形成不同观点。

Figure 5 illustrates how different behavioral profiles lead to systematically different opinions when presented with the same factual evidence.

图 5说明了在面对相同事实证据时,不同的行为画像如何系统地产生不同观点。

5.5 Opinion Reinforcement

So far, we have described how CARA forms new opinions. In a long-lived system, those opinions should also be able to evolve as new information is retained. When new facts arrive via TEMPR's retain pathway, CARA updates any related opinions in three steps:

到目前为止,我们已经描述了 CARA 如何形成新观点。 在长期运行的系统中,随着新信息被保留,这些观点也应能够演化。 当新事实通过 TEMPR 的保留路径到来时,CARA 分三个步骤更新任何相关观点:

1) Identify Candidates. Use entity overlap and semantic similarity to find opinions that are plausibly related to the new facts. For each new fact f with entities Ef and embedding vf, we identify candidate opinions:

**1)识别候选项。**使用实体重叠和语义相似性,寻找可能与新事实相关的观点。 对于每个具有实体 Ef 和嵌入 vf 的新事实 f,我们识别候选观点:

Ocand={oO:|EoEf|>0 or sim(vo,vf)>θ}

where sim(vo,vf) is the cosine similarity between the opinion and fact embeddings, and θ is a similarity threshold.

其中,sim(vo,vf) 是观点嵌入与事实嵌入之间的余弦相似度,θ 是相似度阈值。

2) Assess the Evidence. For each candidate opinion oOcand, classify the relationship between the new facts and the current opinion. Let Assess(o,f) be a function that returns one of {reinforce,weaken,contradict,neutral} based on LLM analysis of the relationship.

**2)评估证据。**对于每个候选观点 oOcand,对新事实与当前观点之间的关系进行分类。 Assess(o,f) 为一个函数,它根据 LLM 对该关系的分析,返回 {reinforce,weaken,contradict,neutral} 之一。

3) Apply an Update. Adjust the opinion's confidence score (and, for strong contradictions or refinements, optionally its text) according to the assessed relationship. Let c be the current confidence and c be the updated confidence. The update rule is:

**3)应用更新。**根据评估出的关系调整观点的置信度分数(对于强烈反驳或细化,也可选择调整其文本)。 c 为当前置信度,c 为更新后的置信度。 更新规则为:

c={min(c+α,1.0)if Assess(o,f)=reinforcemax(cα,0.0)if Assess(o,f)=weakenmax(c2α,0.0)if Assess(o,f)=contradictcif Assess(o,f)=neutral

where α(0,1) is a step size parameter. For contradicting evidence, we may also update the opinion text t to reflect the new nuance.

其中,α(0,1) 是步长参数。 对于反驳性证据,我们也可以更新观点文本 t 以反映新的细微差别。

The update logic is designed to keep opinion trajectories stable but responsive. Small amounts of evidence lead to small changes, preventing opinions from oscillating in response to individual examples, while repeated reinforcement or strong contradictions can substantially shift the confidence. The behavioral profile can also influence how quickly opinions move (for example, a more cautious configuration may use a smaller α), although we leave detailed exploration of such settings to future work. Overall, reinforcement ensures that opinions reflect both the system's initial configuration (via the behavioral profile Θ) and its subsequent evidence, rather than being fixed at creation time or overwritten wholesale when new information appears.

更新逻辑旨在使观点轨迹保持稳定但又能响应变化。 少量证据只会引起小幅变化,防止观点因单个样例而来回摆动;而反复强化或强烈反驳则可以大幅改变置信度。 行为画像也能影响观点变化的速度(例如,更谨慎的配置可以使用更小的 α),不过我们将对此类设置的详细探索留待未来工作。 总体而言,强化确保观点同时反映系统的初始配置(通过行为画像 Θ)及其后续证据,而不是在创建时固定不变,或在新信息出现时被整体覆盖。

5.6 Background Merging

In addition to opinions, an agent's background description h evolves as users provide more biographical information. If handled naively, this can quickly lead to contradictions or unwieldy, concatenated prompts. Over time, new background snippets may complement existing information (e.g., adding work history where none existed), conflict with prior statements (e.g., “born in Texas” vs. “born in Colorado”), or refine previous information (e.g., “works in tech” vs. “works as a machine learning engineer at a startup”).

除观点外,随着用户提供更多个人经历信息,智能体的背景描述 h 也会演化。 如果简单处理,这很快会导致冲突或难以管理的拼接提示。 随着时间推移,新的背景片段可能补充已有信息(例如在原本没有工作经历时添加工作经历)、与先前陈述冲突(例如“出生于得克萨斯州”与“出生于科罗拉多州”),或细化先前信息(例如“从事科技行业”与“在一家初创公司担任机器学习工程师”)。

To keep the background coherent, CARA uses an LLM-powered merging procedure. Given the current background h and a new snippet hnew, we prompt the model to produce a revised background h that 1) resolves direct conflicts in favor of the new information when appropriate, 2) appends non-conflicting details to enrich the description, 3) maintains a consistent first-person voice (“I” rather than “You”), and 4) remains concise (e.g., targeting a length under a few hundred characters). Formally, the merging function is:

为保持背景连贯,CARA 使用由 LLM 驱动的合并过程。 给定当前背景 h 和新片段 hnew,我们提示模型生成修订后的背景 h,它会:**1)**在适当情况下以新信息为准解决直接冲突,**2)**附加不冲突的细节以丰富描述,**3)**保持一致的第一人称语态(使用“我”而不是“你”),以及 **4)**保持简洁(例如,将长度控制在数百字符以内)。 形式上,合并函数为:

h=MergeLLM(h,hnew)
Background Merging Example
Current Background:

“I was born in Colorado.”

New Snippet:

“You were born in Texas and have 10 years of startup experience.”

Merged Background:

“I was born in Texas and have 10 years of startup experience.”

图6:背景合并示例。冲突的出生地以新信息为准得到解决,并加入新的工作经历细节。

Figure 6 illustrates this process. As a preprocessing step, user-provided snippets are normalized into first person before merging, so that inputs such as “You are a creative engineer” become “I am a creative engineer.” This keeps the internal representation consistent with the way backgrounds are referenced in prompts. By maintaining a single, merged background per bank, CARA keeps identity information compact and coherent even as new biographical details accumulate over time.

图 6说明了这一过程。 作为预处理步骤,用户提供的片段会在合并前统一转换为第一人称,因此“你是一名富有创造力的工程师”这样的输入会变为“我是一名富有创造力的工程师”。 这使内部表示与提示中引用背景的方式保持一致。 通过为每个记忆库维护一份合并后的背景,即使新的个人经历细节随时间累积,CARA 也能使身份信息保持紧凑和连贯。

5.7 Preference-Conditioned Reasoning Examples

We conclude this section with brief examples showing how CARA produces distinct and evolving viewpoints using the same underlying memory.

本节最后通过简短示例展示 CARA 如何使用相同的底层记忆产生不同且不断演化的观点。

5.7.1 Example: Opinion Evolution

CARA's reinforcement mechanism also supports opinion change over time. Suppose a bank starts with the opinion:

CARA 的强化机制也支持观点随时间变化。 假设一个记忆库从以下观点开始:

o0=(“Python is the best general-purpose language for data science”, c0=0.70, τ0)

As new facts are retained via TEMPR, related evidence can strengthen or weaken this belief. For instance, a fact about Python's dominant ecosystem in AI/ML might lead to a modest increase in confidence:

随着新事实通过 TEMPR 被保留,相关证据可以强化或削弱这一信念。 例如,一条关于 Python 在 AI/ML 中占主导地位的生态系统的事实,可能会使置信度适度上升:

o1=(“Python is the best general-purpose language for data science”, c1=0.85, τ1)

Later facts about performance advantages and growing adoption of alternatives (e.g., Julia or Rust in certain domains) might decrease confidence and encourage a more qualified opinion:

随后,关于替代方案性能优势及采用率不断提高的事实(例如 Julia 或 Rust 在某些领域中的情况),可能会降低置信度,并促成一个更审慎的观点:

o2=(“Python is strong for data science but has trade-offs”, c2=0.55, τ2)

In this way, opinions become trajectories rather than static labels. They start from an initial, preference-conditioned formation step and are subsequently adjusted as new evidence accumulates. Taken together, these mechanisms show how CARA turns the static memory structures provided by TEMPR into a configurable, preference-conditioned reasoning process. In Section 6, we combine TEMPR and CARA into the unified Hindsight architecture and examine the end-to-end properties and empirical behavior of the full system.

通过这种方式,观点成为轨迹而非静态标签。 它们始于初始的偏好条件形成步骤,随后随着新证据累积而调整。 综合来看,这些机制展示了 CARA 如何将 TEMPR 提供的静态记忆结构转变为可配置的偏好条件推理过程。 在第 6 节中,我们将 TEMPR 和 CARA 结合为统一的 Hindsight 架构,并考察完整系统的端到端特性与实证行为。

6. Putting it all together: Unified Hindsight Architecture

We have now described TEMPR, which implements Hindsight's retain and recall operations (Section 4), and CARA, which implements the reflect operation (Section 5). In this section, we show how these components compose into a single end-to-end system and highlight the system-level properties that emerge from their interaction. At a high level, Hindsight turns raw conversational input into a structured memory bank and then uses that bank to support preference-conditioned reasoning over time.

至此,我们已经介绍了实现 Hindsight 保留回忆操作的 TEMPR(第 4 节),以及实现反思操作的 CARA(第 5 节)。 本节展示这些组件如何组成一个端到端系统,并强调其相互作用产生的系统级特性。 从高层来看,Hindsight 将原始对话输入转化为结构化记忆库,然后使用该记忆库支持随时间展开的偏好条件推理。

6.1 Integration: Retain, Recall, Reflect

The Hindsight system integrates TEMPR and CARA into a unified architecture centered on three core operations. We summarize each operation here for completeness, using the same definitions introduced in Section 3.

Hindsight 系统将 TEMPR 和 CARA 整合为一个以三项核心操作为中心的统一架构。 为完整起见,我们在此使用第 3 节介绍的相同定义概述每项操作。

Retain. The retain operation stores information into memory banks. Formally, given a memory bank B and input data D, the retain function is:

**保留。**保留操作将信息存入记忆库。 形式上,给定记忆库 B 和输入数据 D,保留函数为:

Retain(B,D)M={W,B,O,S}

where M is the updated four-network memory structure. The retain pipeline performs the following steps:

其中,M 是更新后的四网络记忆结构。 保留流水线执行以下步骤:

1. LLM-powered fact extraction with temporal ranges to convert D into a set of structured facts F={f1,,fn};

2. entity recognition and resolution to map entity mentions to canonical entities E;

3. graph link construction to create edges of type temporal, semantic, entity, and causal in the memory graph G=(V,E);

4. automatic opinion reinforcement for existing beliefs when new evidence arrives, where for each opinion oO, we identify related new facts and update the confidence score according to the reinforcement rules defined in Section 5; and

5. background merging to keep the bank profile coherent over time using the merging function h=MergeLLM(h,hnew).

1. 由 LLM 驱动、带时间范围的事实提取,将 D 转换为结构化事实集合 F={f1,,fn}

2. 通过实体识别与解析,将实体提及映射到规范实体 E

3. 构建图链接,在记忆图 G=(V,E) 中创建时间、语义、实体和因果类型的边;

4. 当新证据到来时自动强化已有信念:对于每个观点 oO,识别相关新事实,并依据第 5 节定义的强化规则更新置信度分数;以及

5. 使用合并函数 h=MergeLLM(h,hnew) 合并背景,使记忆库画像随时间保持连贯。

Recall. The recall operation retrieves memories using multi-strategy search. Formally, given a memory bank B, query Q, and token budget k, the recall function is:

**回忆。**回忆操作使用多策略搜索检索记忆。 形式上,给定记忆库 B、查询 Q 和 token 预算 k,回忆函数为:

Recall(B,Q,k){f1,,fn}

where i=1n|fi|k and the returned facts are ordered by relevance. The recall pipeline performs the following steps:

其中,i=1n|fi|k,返回的事实按相关性排序。 回忆流水线执行以下步骤:

1. four-way parallel retrieval (semantic, keyword, graph, temporal) to generate candidate sets Rsem,Rbm25,Rgraph,Rtemp;

2. Reciprocal Rank Fusion to combine ranked lists using

1. 四路并行检索(语义、关键词、图、时间),生成候选集合 Rsem,Rbm25,Rgraph,Rtemp

2. 使用倒数排序融合合并排序列表:

RRF(f)=R{Rsem,Rbm25,Rgraph,Rtemp}1k+rankR(f)

3. neural cross-encoder reranking for final precision using CE(Q,f) scores; and

4. token budget filtering to ensure i=1n|fi|k by greedily selecting the top-ranked facts until the budget is exhausted.

3. 使用 CE(Q,f) 分数进行神经交叉编码器重排,以获得最终精度;以及

4. 通过贪心选择排名最高的事实直至预算耗尽,执行 token 预算过滤以确保 i=1n|fi|k

Reflect. The reflect operation generates preference-conditioned responses. Formally, given a memory bank B, query Q, and preference profile Θ, the reflect function is:

**反思。**反思操作生成偏好条件响应。 形式上,给定记忆库 B、查询 Q 和偏好画像 Θ,反思函数为:

Reflect(B,Q,Θ)(r,O)

where r is the generated response and O is the updated opinion network. The reflect pipeline performs the following steps:

其中,r 是生成的响应,O 是更新后的观点网络。 反思流水线执行以下步骤:

1. use TEMPR to retrieve relevant memories from world, experience, opinion, and observation networks: FQ=Recall(B,Q,k);

2. load the bank's preference profile Θ=(S,L,E,β) and background h;

3. generate a response whose reasoning and tone are influenced by the configured preferences and bias-strength parameter β, where the generation is conditioned on the system message s=Verbalize(n,h,Θ) and retrieved facts FQ;

4. form new opinions with confidence scores when appropriate, where for each new opinion o=(t,c,τ,b,E), we add o to the opinion network O; and

5. store opinions for future retrieval and reinforcement, updating O=O{o1,,om}.

1. 使用 TEMPR 从世界网络、经历网络、观点网络和观察网络中检索相关记忆:FQ=Recall(B,Q,k)

2. 加载记忆库的偏好画像 Θ=(S,L,E,β) 和背景 h

3. 生成推理方式和语气受配置偏好及偏置强度参数 β 影响的响应,其中生成以系统消息 s=Verbalize(n,h,Θ) 和检索事实 FQ 为条件;

4. 在适当情况下形成带置信度分数的新观点:对于每个新观点 o=(t,c,τ,b,E),将 o 添加到观点网络 O;以及

5. 存储观点以供未来检索和强化,将其更新为 O=O{o1,,om}

Together, these operations define a full loop: new experiences are retained into structured memory, recalled as needed for a given query, and reflected upon in a way that updates the agent's beliefs and identity configuration.

这些操作共同定义了一个完整循环:新经历被保留到结构化记忆中,在给定查询需要时被回忆,并通过反思更新智能体的信念与身份配置。

7. Experiments

We evaluate Hindsight on two long-term conversational memory benchmarks to measure its ability to retain, recall, and reason over extended interactions. Our evaluation focuses on how well the system maintains coherent memory across many sessions and whether TEMPR and CARA together support accurate, preference-conditioned reasoning.

我们在两个长期对话记忆基准上评估 Hindsight,以衡量其在长时间交互中保留、回忆和推理的能力。 我们的评估重点考察系统在多个会话中维持连贯记忆的能力,以及 TEMPR 和 CARA 能否共同支持准确的偏好条件推理。

7.1 Datasets

We use two benchmarks designed to test long-term memory in conversational agents.

我们使用两个为测试对话智能体长期记忆而设计的基准。

7.1.1 LongMemEval

LongMemEval tests chat assistants on conversations that span many sessions and require recalling information from hundreds of thousands of tokens. The benchmark includes 500 questions that evaluate five core abilities:

LongMemEval 在跨越多个会话、需要从数十万 token 中回忆信息的对话上测试聊天助手。 该基准包含 500 个问题,用于评估五项核心能力:

  • Information Extraction (IE): Retrieving basic facts from past conversations.
  • Multi-session Reasoning (MR): Connecting information across different sessions.
  • Temporal Reasoning (TR): Understanding when events occurred and their temporal relationships.
  • Knowledge Update (KU): Handling updated or contradictory information over time.
  • Abstention (ABS): Recognizing when information is not available rather than guessing.
  • 信息提取(IE):从过去的对话中检索基本事实。
  • 多会话推理(MR):连接不同会话中的信息。
  • 时间推理(TR):理解事件发生的时间及其时间关系。
  • 知识更新(KU):处理随时间更新或相互矛盾的信息。
  • 拒答(ABS):在信息不可用时识别这一情况,而不是进行猜测。

The benchmark provides two conversation settings: the S setting with around 115,000 tokens spanning roughly 50 sessions, and the M setting with approximately 1.5 million tokens across about 500 sessions. Both settings test the same abilities but at different scales.

该基准提供两种对话设置:S 设置包含约 115,000 个 token,跨越大约 50 个会话;M 设置包含约 150 万个 token,跨越约 500 个会话。 两种设置测试相同的能力,但规模不同。

7.1.2 LoCoMo

LoCoMo evaluates very long-term conversational memory using 50 human-human conversations collected over multiple sessions. Each conversation averages 304.9 turns, 9,209.2 tokens, and 19.3 sessions, with some extending up to 35 sessions. The dataset includes multimodal information such as images shared during conversations, making it more realistic than text-only benchmarks. Questions test whether agents can recall personal details, preferences, past events, and context shared across distant sessions. Table 2 summarizes statistics for both benchmarks.

LoCoMo 使用跨多个会话收集的 50 段人类对话评估超长期对话记忆。 每段对话平均包含 304.9 轮、9,209.2 个 token 和 19.3 个会话,部分对话延伸至 35 个会话。 该数据集包含对话中分享的图像等多模态信息,因此比纯文本基准更贴近现实。 问题用于测试智能体能否回忆个人细节、偏好、过去事件以及跨远距离会话共享的语境。 表 2汇总了两个基准的统计信息。

表2:LongMemEval 和 LoCoMo 数据集的统计信息。
StatisticLongMemEvalLoCoMo
Number of conversationsVaries (S/M)50
Questions500Varies
Avg. turns per conversation--304.9
Avg. tokens per conversation115k (S), 1.5M (M)9,209.2
Avg. sessions per conversation~50 (S), ~500 (M)19.3
Max sessions~50035
MultimodalNoYes (images)
Core abilities tested5 (IE, MR, TR, KU, ABS)Memory recall

7.2 Evaluation Metrics

We use an LLM-as-a-judge approach to evaluate response quality (see the appendix for the complete judge prompt templates). For each test question, Hindsight generates a response using its memory retrieval and reflection pipeline. We then present both the generated response and the ground truth answer to a separate judge LLM, which scores the response on correctness and completeness.

我们使用 LLM 评判方法评估响应质量(完整的评判提示模板见附录)。 对于每个测试问题,Hindsight 使用其记忆检索与反思流水线生成响应。 然后,我们将生成的响应和真实答案一并交给独立的评判 LLM,由其对响应的正确性与完整性评分。

The judge assigns binary correctness scores (0 or 1) for factual accuracy, checking whether the response contains the correct information and does not introduce errors. For questions requiring multi-hop reasoning or temporal awareness, the judge also checks whether the response demonstrates appropriate use of retrieved memories and temporal context. For the abstention ability in LongMemEval, we measure whether Hindsight correctly declines to answer when information is missing, rather than guessing or hallucinating facts.

评判模型为事实准确性分配二元正确性分数(0 或 1),检查响应是否包含正确信息且未引入错误。 对于需要多跳推理或时间感知的问题,评判模型还会检查响应是否恰当地使用了检索记忆和时间语境。 对于 LongMemEval 中的拒答能力,我们衡量 Hindsight 能否在信息缺失时正确拒绝回答,而不是猜测或虚构事实。

7.3 Experimental Setup

We evaluate Hindsight using GPT-OSS-20b as the underlying LLM for both TEMPR's fact extraction and CARA's reflection operations. All experiments use the same model configuration to isolate the contribution of the memory architecture from model-specific improvements. For evaluation, we use GPT-OSS-120b as the judge LLM with temperature set to 0.0 to ensure consistent and deterministic scoring across all responses.

我们使用 GPT-OSS-20b 作为 TEMPR 事实提取与 CARA 反思操作的底层 LLM 来评估 Hindsight。 所有实验均使用相同的模型配置,以将记忆架构的贡献与模型特定改进区分开来。 在评估中,我们使用 GPT-OSS-120b 作为评判 LLM,并将温度设为 0.0,以确保所有响应的评分一致且确定。

During retention, we process each conversation session through TEMPR's extraction pipeline, which produces narrative facts, builds entity links, and updates the memory graph. For each test question, we retrieve memories using the four-way parallel recall mechanism (semantic, keyword, graph, temporal) with Reciprocal Rank Fusion and neural reranking. Retrieved memories are then passed to CARA's reflection step, which generates the final response conditioned on the bank's behavioral profile.

在保留期间,我们通过 TEMPR 的提取流水线处理每个对话会话,该流水线生成叙事事实、构建实体链接并更新记忆图。 对于每个测试问题,我们使用带有倒数排序融合和神经重排的四路并行回忆机制(语义、关键词、图、时间)检索记忆。 随后,检索到的记忆被传递给 CARA 的反思步骤,该步骤以记忆库的行为画像为条件生成最终响应。

We configure memory banks with neutral behavioral profiles (disposition parameters skepticism, literalism, and empathy all set to 3) and low bias strength (0.2) for these experiments, since the benchmarks test factual recall rather than preference-conditioned reasoning. This setup allows us to measure the core memory and retrieval capabilities without introducing strong opinion formation. Token budgets for retrieval are set to <add> tokens for LongMemEval and <add> tokens for LoCoMo, balancing coverage and context efficiency. These budgets are well within the context windows of modern LLMs while providing enough retrieved information for multi-hop reasoning.

由于这些基准测试事实回忆而非偏好条件推理,我们在实验中为记忆库配置中性行为画像(怀疑性、字面性和共情性三个性情参数均设为 3)和较低的偏置强度(0.2)。 这一设置使我们能够在不引入强烈观点形成的情况下衡量核心记忆与检索能力。 LongMemEval 的检索 token 预算设为 <add>,LoCoMo 的检索 token 预算设为 <add>,以平衡覆盖范围与上下文效率。 这些预算远低于现代 LLM 的上下文窗口,同时为多跳推理提供了足够的检索信息。

For the Hindsight (OSS-20B) configuration, both the memory stack (TEMPR and CARA) and the answer generation model are instantiated with GPT-OSS-20b. For the Hindsight (OSS-120B) and Hindsight (Gemini-3) configurations, the Hindsight memory system itself (fact extraction, memory graph construction, and retrieval) is powered by GPT-OSS-120b. The Hindsight (Gemini-3) rows in both benchmarks use Gemini-3 Pro only as the final answer generator over the retrieved memories, while the underlying memory architecture and the LLM-as-a-judge remain based on GPT-OSS-120b.

对于 Hindsight (OSS-20B) 配置,记忆栈(TEMPR 和 CARA)与答案生成模型均使用 GPT-OSS-20b 实例化。 对于 Hindsight (OSS-120B)Hindsight (Gemini-3) 配置,Hindsight 记忆系统本身(事实提取、记忆图构建与检索)由 GPT-OSS-120b 驱动。 两个基准中的 Hindsight (Gemini-3) 行仅使用 Gemini-3 Pro 作为基于检索记忆的最终答案生成器,而底层记忆架构和 LLM 评判仍基于 GPT-OSS-120b

Baseline results. We describe next how we benchmark Hindsight against existing approaches. For LongMemEval (Table 3), baseline scores for Full-context GPT-4o, Zep (GPT-4o), and the three Supermemory configurations (GPT-4o, GPT-5, Gemini-3 Pro) are taken directly from the Supermemory technical report and use their published GPT-4o LLM-as-a-judge setup. For LoCoMo (Table 4), baseline scores for Backboard, Memobase, Zep, Mem0, Mem0-Graph, LangMem, and OpenAI are presented here as claimed on the official Backboard LoCoMo benchmark results. We treat these numbers as reported reference points rather than our independently reproduced baselines.

**基线结果。**下面介绍我们如何将 Hindsight 与现有方法进行比较。 对于 LongMemEval(表 3),Full-context GPT-4o、Zep(GPT-4o)和三种 Supermemory 配置(GPT-4o、GPT-5、Gemini-3 Pro)的基线分数直接取自 Supermemory 技术报告,并使用其发布的 GPT-4o LLM 评判设置。 对于 LoCoMo(表 4),Backboard、Memobase、Zep、Mem0、Mem0-Graph、LangMem 和 OpenAI 的基线分数按照 Backboard 官方 LoCoMo 基准结果中的声明呈现。 我们将这些数字视为报告的参考点,而不是我们独立复现的基线。

Our Hindsight results on both benchmarks are evaluated with a GPT-OSS-120B LLM-as-a-judge for all methods to ensure consistent scoring; in the Gemini-3 configuration, Gemini-3 is used only for answer generation, while memory retrieval and judging remain powered by GPT-OSS-120B. Readers wishing to reproduce our results or re-evaluate Hindsight can download our code and re-run benchmarks as described in Section 8. We provide access to our Github repository and an interactive results viewer.

为了确保评分一致,我们在两个基准上对所有方法的 Hindsight 结果均使用 GPT-OSS-120B 作为 LLM 评判;在 Gemini-3 配置中,Gemini-3 仅用于答案生成,而记忆检索与评判仍由 GPT-OSS-120B 驱动。 希望复现我们的结果或重新评估 Hindsight 的读者可以下载代码,并按照第 8 节所述重新运行基准。 我们提供 GitHub 仓库和交互式结果查看器的访问入口。

7.4 Results on LongMemEval

表3:LongMemEval 基准(S 设置,500 个问题)上的结果。Hindsight 使用 OSS-120B 时总体准确率达到 89.0%,使用 Gemini-3 Pro 时达到 91.4%,优于包括采用前沿模型的 Supermemory 在内的所有基线系统。Full-context(OSS-20B)基线展示了没有 Hindsight 记忆架构时相同基础模型的性能,使用 OSS-20B 后提升 44.6 个百分点。每行最佳结果以粗体表示,所有数值均为百分比。
Question TypeFull-contextFull-contextZepSupermemorySupermemorySupermemoryHindsightHindsightHindsight
(GPT-4o)(OSS-20B)(GPT-4o)(GPT-4o)(GPT-5)(Gemini-3)(OSS-20B)(OSS-120B)(Gemini-3)
single-session-user81.438.692.997.197.198.695.7100.097.1
single-session-assistant94.680.480.496.4100.098.294.698.296.4
single-session-preference20.020.056.770.076.770.066.786.780.0
knowledge-update78.260.383.388.587.289.784.692.394.9
temporal-reasoning45.131.662.476.781.282.079.785.791.0
multi-session44.321.157.971.475.276.779.781.287.2
Overall60.239.071.281.684.685.283.689.091.4

Table 3 compares Hindsight to full-context baselines and prior memory systems on the LongMemEval S setting. The two Full-context baselines pass the entire conversation history to the model as raw context without any structured memory, while Zep and Supermemory pair dedicated memory layers with strong frontier models (GPT-4o, GPT-5, Gemini-3). In contrast, our primary configuration uses a smaller open-source 20B model (GPT-OSS-20B) for both retention and reflection, chosen to be deployable on a single high-end consumer GPU rather than only in large datacenter settings.

表 3比较了 Hindsight、完整上下文基线和先前记忆系统在 LongMemEval S 设置上的表现。 两个完整上下文基线将全部对话历史作为原始上下文传给模型,不使用任何结构化记忆;Zep 和 Supermemory 则将专用记忆层与强大的前沿模型(GPT-4o、GPT-5、Gemini-3)结合。 相比之下,我们的主要配置使用较小的开源 20B 模型(GPT-OSS-20B)同时执行保留与反思,选择该模型是为了能够部署在单张高端消费级 GPU 上,而不是只能用于大型数据中心环境。

Despite this weaker base model, Hindsight with OSS-20B achieves 83.6% overall accuracy, a +44.6 point gain over the Full-context OSS-20B baseline (39.0%), and even surpasses Full-context GPT-4o (60.2%). Relative to other memory systems, Hindsight+OSS-20B matches or exceeds the performance of Zep+GPT-4o (71.2%) and Supermemory+GPT-4o (81.6%), demonstrating that the memory architecture, rather than sheer model size, is carrying much of the performance. The largest gains over the Full-context OSS-20B baseline appear exactly in the long-horizon categories LongMemEval was designed to stress: multi-session questions improve from 21.1% to 79.7% and temporal reasoning from 31.6% to 79.7%, and preference questions increase from 20.0% to 66.7%, indicating that TEMPR’s graph- and time-aware retrieval substantially mitigates context dilution at scale.

尽管基础模型较弱,采用 OSS-20B 的 Hindsight 仍达到 83.6% 的总体准确率,比 Full-context OSS-20B 基线(39.0%)高 44.6 个百分点,甚至超过 Full-context GPT-4o(60.2%)。 相较其他记忆系统,Hindsight+OSS-20B 达到或超过 Zep+GPT-4o(71.2%)和 Supermemory+GPT-4o(81.6%)的性能,这表明主要性能来自记忆架构,而不仅仅是模型规模。 相较 Full-context OSS-20B 基线,最大的提升恰好出现在 LongMemEval 旨在强调的长程类别中:多会话问题从 21.1% 提升至 79.7%,时间推理从 31.6% 提升至 79.7%,偏好问题从 20.0% 提升至 66.7%;这表明 TEMPR 的图感知与时间感知检索在大规模场景中显著缓解了上下文稀释。

Scaling the underlying model further amplifies these gains. With OSS-120B, Hindsight reaches 89.0% overall accuracy, outperforming Supermemory with GPT-4o and GPT-5 (81.6% and 84.6%), and with Gemini-3 Pro it attains 91.4%, the best result across all systems and model backbones. Because the Full-context OSS-20B baseline uses the same base model as Hindsight but with no structured memory, the consistent improvements across all question types provide direct evidence that the memory layer drives the observed performance rather than frontier-scale parameters alone.

扩大底层模型会进一步放大这些收益。 使用 OSS-120B 时,Hindsight 的总体准确率达到 89.0%,超过采用 GPT-4o 和 GPT-5 的 Supermemory(81.6% 和 84.6%);使用 Gemini-3 Pro 时则达到 91.4%,取得所有系统与模型骨干中的最佳结果。 由于 Full-context OSS-20B 基线使用与 Hindsight 相同的基础模型但没有结构化记忆,因此所有问题类型上的一致提升直接证明,观察到的性能由记忆层驱动,而不只是来自前沿规模参数。

7.5 Results on LoCoMo

Table 4 reports accuracy on LoCoMo. Across all backbone sizes, Hindsight consistently outperforms prior open memory systems such as Memobase, Zep, Mem0, and LangMem, raising overall accuracy from 75.78% (Memobase) to 83.18% with OSS-20B and 85.67% with OSS-120B. With Gemini-3 as the answer generator, Hindsight attains 89.61% overall accuracy and the highest Open Domain score (95.12%), effectively matching Backboard’s claimed 90.00% overall performance while doing so with a fully open-source memory stack, released evaluation code, and an interactive results viewer (Section 8). These results show that the gains from our memory architecture on LongMemEval transfer to realistic, multi-session human conversations.

表 4报告了 LoCoMo 上的准确率。 在所有骨干规模下,Hindsight 始终优于 Memobase、Zep、Mem0 和 LangMem 等先前开源记忆系统;总体准确率从 Memobase 的 75.78% 提升至 OSS-20B 的 83.18% 和 OSS-120B 的 85.67%。 使用 Gemini-3 作为答案生成器时,Hindsight 的总体准确率达到 89.61%,并取得最高的开放域分数(95.12%);它使用完全开源的记忆栈、已发布的评估代码和交互式结果查看器(第 8 节),同时基本追平 Backboard 声称的 90.00% 总体性能。 这些结果表明,我们的记忆架构在 LongMemEval 上的收益能够迁移到真实的多会话人类对话中。

表4:LoCoMo 基准上的结果。不同问题类型及总体的准确率(%),比较先前记忆系统与采用不同骨干模型的 Hindsight 架构。Backboard 数值取自其报告结果,无法独立复现。采用 Gemini-3 Pro 的 Hindsight 获得非常接近的总体分数和最佳开放域性能。
MethodSingle-HopMulti-HopOpen DomainTemporalOverall
Backboard89.3675.0091.2091.9090.00
Memobase (v0.0.37)70.9246.8877.1785.0575.78
Zep74.1166.0467.7179.7975.14
Mem0-Graph65.7147.1975.7158.1368.44
Mem067.1351.1572.9355.5166.88
LangMem62.2347.9271.1223.4358.10
OpenAI63.7942.9262.2921.7152.90
Hindsight (OSS-20B)74.1164.5890.9676.3283.18
Hindsight (OSS-120B)76.7962.5093.6879.4485.67
Hindsight (Gemini-3)86.1770.8395.1283.8089.61

8. Code Availability

We release our implementation of Hindsight at github.com/vectorize-io/hindsight. The repository provides (i) the full memory architecture, including retain/recall/reflect pipelines and the four-network memory representation; (ii) scripts and configuration files to run LongMemEval and LoCoMo with different backbones and judging setups; and (iii) utilities for fact extraction, graph construction, and analysis of retrieved memories. To facilitate inspection and comparison of runs, we also provide the Hindsight Benchmarks Viewer, which hosts per-question results that users can drill into, retrieved memory contexts, model and judge configurations, and aggregate metrics for all Hindsight variants reported in this paper.

我们在 github.com/vectorize-io/hindsight 发布 Hindsight 的实现。 该仓库提供:(i)完整记忆架构,包括保留/回忆/反思流水线和四网络记忆表示;(ii)使用不同骨干模型与评判设置运行 LongMemEval 和 LoCoMo 的脚本及配置文件;以及(iii)用于事实提取、图构建和检索记忆分析的工具。 为便于检查和比较不同运行,我们还提供 Hindsight 基准查看器,其中包含可逐题深入查看的结果、检索记忆上下文、模型与评判配置,以及本文报告的所有 Hindsight 变体的汇总指标。

9. Conclusion

We have introduced Hindsight, an approach to treat agent memory as a first-class substrate for reasoning, rather than a thin retrieval layer around a stateless model. By organizing an agent’s long-term memory into world, bank, observation, and opinion networks and implementing retain, recall, and reflect as explicit operations, the architecture separates evidence from synthesized summaries and beliefs while remaining compatible with modern LLMs. Our experimental results demonstrate that this structure matters in practice and clearly leads to significant improvements in performance.

我们提出了 Hindsight,它将智能体记忆视为推理的一等基底,而不是围绕无状态模型构建的薄检索层。 通过将智能体的长期记忆组织为世界网络、记忆库网络、观察网络和观点网络,并将保留、回忆与反思实现为显式操作,该架构在保持与现代 LLM 兼容的同时,将证据与合成摘要及信念分离。 我们的实验结果表明,这种结构在实践中十分重要,并且确实带来了显著的性能提升。

Looking ahead, we see several directions for extending this work. On the modeling side, learning to jointly optimize fact extraction, graph construction, and retrieval—rather than treating them as fixed pipelines—could further improve robustness and efficiency, especially in noisy, open-domain settings. A reinforcement learning loop would be ideal to explore the interplay between retain, recall, and reflect as done here.

展望未来,我们看到若干扩展本工作的方向。 在建模方面,学习联合优化事实提取、图构建和检索,而不是将它们视为固定流水线,能够进一步提升鲁棒性与效率,尤其是在嘈杂的开放域环境中。 强化学习循环将非常适合探索本文所实现的保留、回忆与反思之间的相互作用。

On the application side, we plan to integrate Hindsight with richer tool-use and workflow orchestration, exploring more diverse benchmarks than the conversational setting considered here. Finally, extending the opinion and belief layer to support controlled forgetting, time-aware belief revision, and privacy-aware memory management offers a path toward long-lived agents.

在应用方面,我们计划将 Hindsight 与更丰富的工具使用和工作流编排相结合,探索比本文所考虑的对话设置更为多样的基准。 最后,扩展观点与信念层以支持受控遗忘、时间感知信念修正和隐私感知记忆管理,为构建长期运行的智能体提供了一条路径。