用可检索的身份知识图谱,让智能体长期保持人格一致
ID-RAG: Identity Retrieval-Augmented Generation for Long-Horizon Persona Coherence in Generative Agents
- 构建动态身份知识图谱,实时检索核心信念与价值观
- 四轮后身份回忆率更高,模拟收敛速度提升58%
- 适合需要长期一致性的人机协作场景
由语言模型驱动的生成式智能体在执行长期任务时面临挑战:随着长期记忆增长,难以维持人格连贯性,导致身份漂移、忽视既定信念及多智能体系统中幻觉传播。本文提出身份检索增强生成(ID-RAG)机制,将智能体的人格与持久偏好锚定于一个动态结构化的身份模型——核心信念、特质与价值观的知识图谱。在决策循环中,该模型被查询以检索相关身份上下文,直接指导行为选择。我们引入并实现了一类名为人类-人工智能智能体(HAis)的新一代智能体,其身份模型源自真实实体数字足迹学习的动态知识图谱,灵感来自视角感知AI中的纪事结构。在市长选举的社会模拟中,使用ID-RAG的HAis在长周期人格一致性上优于基线模型,在第四时间步实现更高的身份召回率,并使模拟收敛时间缩短19%(GPT-4o)和58%(GPT-4o mini)。通过将身份作为显式可检索的知识结构,ID-RAG为构建更长时间连贯、可解释且对齐的生成式智能体提供了基础方法。代码已开源:https://github.com/flybits/humanai-agents。
原文摘要 · Abstract (English)
Generative agents powered by language models are increasingly deployed for long-horizon tasks. However, as long-term memory context grows over time, they struggle to maintain coherence. This deficiency leads to critical failures, including identity drift, ignoring established beliefs, and the propagation of hallucinations in multi-agent systems. To mitigate these challenges, this paper introduces Identity Retrieval-Augmented Generation (ID-RAG), a novel mechanism designed to ground an agent's persona and persistent preferences in a dynamic, structured identity model: a knowledge graph of core beliefs, traits, and values. During the agent's decision loop, this model is queried to retrieve relevant identity context, which directly informs action selection. We demonstrate this approach by introducing and implementing a new class of ID-RAG enabled agents called Human-AI Agents (HAis), where the identity model is inspired by the Chronicle structure used in Perspective-Aware AI, a dynamic knowledge graph learned from a real-world entity's digital footprint. In social simulations of a mayoral election, HAis using ID-RAG outperformed baseline agents in long-horizon persona coherence - achieving higher identity recall across all tested models by the fourth timestep - and reduced simulation convergence time by 19% (GPT-4o) and 58% (GPT-4o mini). By treating identity as an explicit, retrievable knowledge structure, ID-RAG offers a foundational approach for developing more temporally coherent, interpretable, and aligned generative agents. Our code is open-source and available at: https://github.com/flybits/humanai-agents.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。