Dynamic Context Adaptation for Consistent Role-Playing Agents with Retrieval-Augmented Generations

πŸ“… 2025-08-03
πŸ“ˆ Citations: 0
✨ Influential: 0
πŸ“„ PDF
πŸ€– AI Summary
To address the challenge that role-playing agents (RPAs) often deviate from their designated personas when answering out-of-domain questions, this paper proposes AMADEUSβ€”a retrieval-augmented generation (RAG) framework for persona-consistent role playing. AMADEUS jointly models role-specific knowledge and personality traits via three core components: Adaptive Context-aware Text Segmentation (ACTS), Guided Retrieval (GS), and Attribute Extractor (AE). We further introduce CharacterRAG, the first benchmark dataset specifically designed for retrieval-augmented role playing, supporting dynamic context segmentation and hierarchical context modeling. Experiments demonstrate that AMADEUS significantly improves both knowledge accuracy and persona consistency on CharacterRAG (+12.7% in role coherence score), particularly maintaining stable persona adherence during out-of-knowledge-domain question answering. Our key contributions are: (1) the first RAG framework explicitly optimized for role consistency; (2) the first role-specific RAG benchmark (CharacterRAG); and (3) a novel knowledge-persona co-modeling methodology.

Technology Category

Application Category

πŸ“ Abstract
We propose AMADEUS, which is composed of Adaptive Context-aware Text Splitter (ACTS), Guided Selection (GS), and Attribute Extractor (AE). ACTS finds an optimal chunk length and hierarchical contexts for each character. AE identifies a character's general attributes from the chunks retrieved by GS and uses these attributes as a final context to maintain robust persona consistency even when answering out of knowledge questions. To facilitate the development and evaluation of RAG-based RPAs, we construct CharacterRAG, a role-playing dataset that consists of persona documents for 15 distinct fictional characters totaling 976K written characters, and 450 question and answer pairs. We find that our framework effectively models not only the knowledge possessed by characters, but also various attributes such as personality.
Problem

Research questions and friction points this paper is trying to address.

Optimizing chunk length and hierarchical contexts for characters
Maintaining persona consistency with general attributes
Developing and evaluating RAG-based role-playing agents
Innovation

Methods, ideas, or system contributions that make the work stand out.

Adaptive chunk length and hierarchical contexts
Attribute extraction for persona consistency
Role-playing dataset for RAG evaluation
πŸ”Ž Similar Papers
No similar papers found.