ContextFact:为长期对话智能体保留上下文相关事实
ContextFact: Remembering Facts in Context for Long-Term Conversational Agents
AI总结:
该研究针对长期对话智能体的事实记忆问题,提出ContextFact模型,通过关联上下文保留的事实记忆与源导向实体表示,在Qwen3.5-27B骨干下以21%基准证据令牌量实现SOTA,在LoCoMo、LongMemEval-S上获高准确率。
摘要:
基于大语言模型构建的智能体必须在与用户的多次交互中保持对话连续性。然而,长期对话会将事实分散在多个对话轮次和会话中,导致难以在充足上下文条件下检索到正确证据。因此,此类对话的记忆需在保留事实及其上下文的同时,保持证据的选择性可访问性。我们首先研究记忆构建与检索单元边界对答案可获得性及证据访问的影响:读取整个记忆库会暴露出仅通过检索选择无法解决的缺口,表明部分上下文需在记忆构建阶段保留;相邻轮次分组在匹配的唯一轮次预算下可提升证据访问效果,而更宽的窗口则无法持续发挥作用。这一发现促使我们保留事实特定的局部上下文,同时将跨会话证据单独组织。我们提出ContextFact,该模型将保留上下文的事实记忆与基于来源的实体表示关联:在会话内,它收集解释每个事实所需的上下文;在会话间,它对齐重复出现的指称对象并回溯源对话,以重建与支持性事实关联的连贯实体表示。在查询阶段,ContextFact检索事实和实体视图,对其进行独立重排序,并使用实体关联扩展来呈现相关事实;完整的实体表示随后提供有序的跨会话证据。以Qwen3.5-27B为骨干模型,ContextFact实现了最先进的性能,同时仅使用最强评估基准模型消耗的证据令牌的21%,在LoCoMo数据集上获得86.49%的整体评判准确率,在LongMemEval-S数据集上获得91.00%的准确率。受控消融实验验证了保留上下文的事实边界和基于来源的实体重建的有效性,而实体读取在添加更多事实之外还提升了多跳推理准确率。
英文摘要:
Agents built on large language models must maintain continuity across repeated interactions with users. However, long-term conversations scatter facts across turns and sessions, making it difficult to retrieve the right evidence with enough context. Memory for such conversations must therefore preserve facts with their context while keeping evidence selectively accessible. We first study how memory construction and retrieval-unit boundaries affect answerability and evidence access. Reading the entire memory bank reveals gaps that cannot be resolved by retrieval selection alone, showing that some context must be preserved during memory construction. Adjacent-turn grouping improves evidence access at matched unique-turn budgets, while wider windows do not consistently help. This motivates keeping fact-specific context local while organizing cross-session evidence separately. We propose ContextFact, which links context-preserving fact memories with source-grounded entity representations. Within sessions, it gathers the context needed to interpret each fact. Across sessions, it aligns recurring referents and revisits the source dialogue to reconstruct coherent entity representations linked to the supporting facts. At query time, ContextFact retrieves fact and entity views, reranks them independently, and uses entity-linked expansion to surface related facts; complete entity representations then provide organized cross-session evidence. With Qwen3.5-27B as the backbone, ContextFact achieves state-of-the-art performance while using only $21\%$ of the evidence tokens consumed by the strongest evaluated baseline, obtaining $86.49\%$ overall judge accuracy on LoCoMo and $91.00\%$ on LongMemEval-S. Controlled ablations support context-preserving fact boundaries and source-grounded entity reconstruction, while entity readout improves multi-hop accuracy beyond adding more facts.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。