Table of Contents
Fetching ...

ID-RAG: Identity Retrieval-Augmented Generation for Long-Horizon Persona Coherence in Generative Agents

Daniel Platnick, Mohamed E. Bengueddache, Marjan Alirezaie, Dava J. Newman, Alex ''Sandy'' Pentland, Hossein Rahnama

TL;DR

ID-RAG addresses the challenge of maintaining persistent persona coherence in generative agents by grounding self-perception in a dynamic identity knowledge graph and retrieving identity context during decision-making. The authors introduce Human-AI Agents (HAis) and Chronicle-inspired identity graphs, implemented in the Concordia GABM framework. Experimental results in a Riverbend Elections social simulation show that ID-RAG improves identity recall and action alignment while reducing convergence time across multiple LLMs, with model-dependent effects. The work advances interpretable, aligned, temporally coherent generative agents and releases open-source code for community use.

Abstract

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.

ID-RAG: Identity Retrieval-Augmented Generation for Long-Horizon Persona Coherence in Generative Agents

TL;DR

ID-RAG addresses the challenge of maintaining persistent persona coherence in generative agents by grounding self-perception in a dynamic identity knowledge graph and retrieving identity context during decision-making. The authors introduce Human-AI Agents (HAis) and Chronicle-inspired identity graphs, implemented in the Concordia GABM framework. Experimental results in a Riverbend Elections social simulation show that ID-RAG improves identity recall and action alignment while reducing convergence time across multiple LLMs, with model-dependent effects. The work advances interpretable, aligned, temporally coherent generative agents and releases open-source code for community use.

Abstract

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.

Paper Structure

This paper contains 40 sections, 3 figures.

Figures (3)

  • Figure 1: Human-AI Agent (HAi) architecture. This blueprint extends the seminal generative agent framework by Park-simulacra-2023. HAis are designed to embody real-world individuals or societal entities by performing ID-RAG on Chronicles. During operation, HAis retrieve and merge relevant identity context into working memory to guide behavior. Chronicles can be updated via structured feedback, enabling adaptability and long-term persona coherence.
  • Figure 2: Results comparing baseline Generative Agents Park-simulacra-2023 vs. HAis using ID-RAG in the Concordia framework. GPT-4o, GPT-4o mini, and Qwen2.5-7B were tested across the three experimental conditions. Performance is measured in terms of action alignment and identity recall. Social simulations of the election scenario were run for 7 timesteps and scores were averaged over 4 runs.
  • Figure 3: Average simulation convergence time (successfully progressing through 7 episodes) comparing baseline Generative Agents vs. HAis with ID-RAG in an election scenario social simulation. Longer simulation convergence times can be attributed to expanding long-term memory context, which leads agents to engage more often in repetitive conversations. These conversations can persist until the Game Master agent intervenes to end them. Simulation convergence time results were averaged over 4 runs.