{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,19]],"date-time":"2026-05-19T09:10:41Z","timestamp":1779181841780,"version":"3.51.4"},"reference-count":36,"publisher":"MDPI AG","issue":"5","license":[{"start":{"date-parts":[[2026,5,11]],"date-time":"2026-05-11T00:00:00Z","timestamp":1778457600000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Algorithms"],"abstract":"<jats:p>Maintaining high-fidelity character personas and tracking trusted narrative facts remain significant challenges for LLM-based role-playing systems, particularly in long-context scenarios. Traditional Retrieval-Augmented Generation (RAG) approaches, which typically rely on static, stateless retrieval, often struggle to capture evolving plot dynamics, leading to character hallucinations and logical inconsistencies over prolonged interactions. To address these limitations, we present FictionRAG, a novel stateful retrieval-augmented framework designed to enhance long-narrative role-playing. FictionRAG introduces a hierarchical memory architecture that decouples narrative information into three distinct lanes: factual events, persona traits, and worldview constraints. Furthermore, it employs a failure-driven metacognitive regulatory loop that dynamically identifies and corrects retrieval deficiencies\u2014such as persona drift or conflicting world rules\u2014before response generation. By treating role-playing as a dynamic state tracking problem rather than simple question answering, FictionRAG ensures that generated responses are strictly grounded in both the narrative timeline and the character\u2019s psychological profile. Extensive experiments on a dataset comprising twenty classic novels demonstrate that FictionRAG significantly outperforms existing baselines in factual accuracy, persona stability, and worldview consistency. Beyond literary role-playing, these results suggest that stateful, evidence-constrained retrieval can serve as a general mechanism for long-form controllable generation tasks that require persistent state tracking and multi-dimensional consistency.<\/jats:p>","DOI":"10.3390\/a19050383","type":"journal-article","created":{"date-parts":[[2026,5,11]],"date-time":"2026-05-11T17:17:42Z","timestamp":1778519862000},"page":"383","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["FictionRAG: A Stateful Metacognitive Framework for High-Fidelity Long-Narrative Role-Playing"],"prefix":"10.3390","volume":"19","author":[{"given":"Yifei","family":"Deng","sequence":"first","affiliation":[{"name":"School of Computer and Communication Engineering, Northeastern University, Qinhuangdao 066004, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Yudong","family":"Zhang","sequence":"additional","affiliation":[{"name":"School of Computer and Communication Engineering, Northeastern University, Qinhuangdao 066004, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0009-0000-0481-3736","authenticated-orcid":false,"given":"Jingpu","family":"Yang","sequence":"additional","affiliation":[{"name":"Research Institute of Unmanned Systems, Beihang University, Beijing 100191, China"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Miao","family":"Fang","sequence":"additional","affiliation":[{"name":"School of Computer and Communication Engineering, Northeastern University, Qinhuangdao 066004, China"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2026,5,11]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Park, J.S., O\u2019Brien, J.C., Cai, C.J., Morris, M.R., Liang, P., and Bernstein, M.S. (2023). Generative Agents: Interactive Simulacra of Human Behavior. Proceedings of the 36th Annual ACM Symposium on User Interface Software and Technology (UIST), San Francisco, CA, USA, 29 October\u20131 November 2023, Association for Computing Machinery.","DOI":"10.1145\/3586183.3606763"},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Wang, N., Peng, Z.Y., Que, H., Liu, J., Zhou, W., Wu, Y., Guo, H., Gan, R., Ni, Z., and Yang, J. (2024). RoleLLM: Benchmarking, Eliciting, and Enhancing Role-Playing Abilities of Large Language Models. Findings of the Association for Computational Linguistics: ACL 2024, Bangkok, Thailand, 11\u201316 August 2024, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2024.findings-acl.878"},{"key":"ref_3","unstructured":"Zhou, J., Wang, Y., Glantz, O., Tsarkov, D., and Malheiros, W. (2023). CharacterGLM: Customizing Chinese Conversational AI Characters with Large Language Models. Proceedings of the 32nd ACM International Conference on Information and Knowledge Management (CIKM), Birmingham, UK, 21\u201325 October 2023, Association for Computational Linguistics."},{"key":"ref_4","first-page":"51991","article-title":"CAMEL: Communicative Agents for \u201cMind\u201d Exploration of Large Scale Language Model Society","volume":"36","author":"Li","year":"2023","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_5","first-page":"9459","article-title":"Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks","volume":"33","author":"Lewis","year":"2020","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_6","doi-asserted-by":"crossref","first-page":"157","DOI":"10.1162\/tacl_a_00638","article-title":"Lost in the Middle: How Language Models Use Long Contexts","volume":"12","author":"Liu","year":"2024","journal-title":"Trans. Assoc. Comput. Linguist."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Yu, W., Paranjape, A., Hajishirzi, H., and Tsvetkov, Y. (2024). Chain-of-Note: Enhancing Robustness in Retrieval-Augmented Language Models. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing, Miami, FL, USA, 12\u201316 November 2024, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2024.emnlp-main.813"},{"key":"ref_8","doi-asserted-by":"crossref","unstructured":"Zhong, W., Guo, L., Gao, Q., and Wang, Y. (2024). MemoryBank: Enhancing Large Language Models with Long-Term Memory. Proceedings of the AAAI Conference on Artificial Intelligence, Vancouver, BC, Canada, 20\u201327 February 2024, AAAI Press.","DOI":"10.1609\/aaai.v38i17.29946"},{"key":"ref_9","unstructured":"Shao, Z., Gong, Y., Shen, Y., Huang, M., Duan, N., and Chen, W. (2024, January 7\u201311). Enhancing Retrieval-Augmented Large Language Models with Iterative Retrieval-Generation Synergy. Proceedings of the International Conference on Learning Representations, Vienna, Austria."},{"key":"ref_10","doi-asserted-by":"crossref","unstructured":"Wang, X., Xiao, Y., Huang, J.T., Yuan, S., Xu, R., Guo, H., Tu, Q., Fei, Y., Leng, Z., and Wang, W. (2024). InCharacter: Evaluating Personality Fidelity in Role-Playing Agents through Psychological Interviews. Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), Bangkok, Thailand, 11\u201316 August 2024, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2024.acl-long.102"},{"key":"ref_11","first-page":"58607","article-title":"Evaluating and Inducing Personality in Pre-trained Language Models","volume":"36","author":"Jiang","year":"2023","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_12","doi-asserted-by":"crossref","unstructured":"Shao, Y., Li, L., Dai, W., and Qiu, X. (2023). Character-LLM: A Trainable Agent for Role-Playing. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, Singapore, 6\u201310 December 2023, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2023.emnlp-main.814"},{"key":"ref_13","unstructured":"Li, C., Ge, Z., Zhang, W., and Wang, S. (2023). ChatHaruhi: Reviving Anime Character in Reality via Large Language Model. arXiv."},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Huang, L., Lan, H., Sun, Z., Shi, C., and Bai, T. (2024). Emotional RAG: Enhancing Role-Playing Agents through Emotional Retrieval. arXiv.","DOI":"10.1109\/ICKG63256.2024.00023"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Chen, N., He, Y., Tang, G., Sun, H., Lei, Z., and Liu, Y. (2023). Large Language Models Meet Harry Potter: A Dataset for Aligning Dialogue Agents with Characters. Findings of the Association for Computational Linguistics: EMNLP 2023, Singapore, 6\u201310 December 2023, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2023.findings-emnlp.570"},{"key":"ref_16","unstructured":"Zhang, Y., Li, Y., Cui, L., Cai, D., Liu, L., Fu, T., and Hu, X. (2023). Siren\u2019s Song in the AI Ocean: A Survey on Hallucination in Large Language Models. arXiv."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Karpukhin, V., Oguz, B., Min, S., Lewis, P., Wu, L., Edunov, S., Chen, D., and Yih, W.T. (2020). Dense Passage Retrieval for Open-Domain Question Answering. Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing, Online, 16\u201320 November 2020, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2020.emnlp-main.550"},{"key":"ref_18","doi-asserted-by":"crossref","first-page":"317","DOI":"10.1162\/tacl_a_00023","article-title":"The NarrativeQA Reading Comprehension Challenge","volume":"6","author":"Schwarz","year":"2018","journal-title":"Trans. Assoc. Comput. Linguist."},{"key":"ref_19","unstructured":"Sarthi, P., Abdullah, S., Tuli, A., Khanna, S., Goldie, A., and Manning, C.D. (2024, January 7\u201311). RAPTOR: Recursive Abstractive Processing for Tree-Organized Retrieval. Proceedings of the International Conference on Learning Representations, Vienna, Austria."},{"key":"ref_20","unstructured":"Edge, D., Trinh, H., Cheng, N., Bradley, J., Chao, A., Mody, A., Truitt, S., Metropolitansky, D., Ness, R.O., and Larson, J. (2024). From Local to Global: A Graph RAG Approach to Query-Focused Summarization. arXiv."},{"key":"ref_21","doi-asserted-by":"crossref","unstructured":"Zhang, H., Liu, X., and Zhang, J. (2023). SummIt: Iterative Text Summarization via ChatGPT. Findings of the Association for Computational Linguistics: EMNLP 2023, Singapore, 6\u201310 December 2023, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2023.findings-emnlp.714"},{"key":"ref_22","unstructured":"Packer, C., Fang, V., Patil, S.G., Lin, K., Wooders, S., and Gonzalez, J.E. (2023). MemGPT: Towards LLMs as Operating Systems. arXiv."},{"key":"ref_23","first-page":"24824","article-title":"Chain-of-Thought Prompting Elicits Reasoning in Large Language Models","volume":"35","author":"Wei","year":"2022","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_24","unstructured":"Yao, S., Zhao, J., Yu, D., Du, N., Shafran, I., Narasimhan, K., and Cao, Y. (2023, January 1\u20135). ReAct: Synergizing Reasoning and Acting in Language Models. Proceedings of the International Conference on Learning Representations, Kigali, Rwanda."},{"key":"ref_25","unstructured":"Sumers, T., Yao, S., Narasimhan, K., and Griffiths, T.L. (2024). Cognitive Architectures for Language Agents. arXiv."},{"key":"ref_26","unstructured":"Liu, L., Yang, X., Shen, Y., Hu, B., Zhang, Z., Gu, J., and Zhang, G. (2023). Think-in-Memory: Recalling and Post-Thinking Enable LLMs with Long-Term Memory. arXiv."},{"key":"ref_27","unstructured":"Asai, A., Wu, Z., Wang, Y., Sil, A., and Hannan, H. (2024, January 7\u201311). Self-RAG: Learning to Retrieve, Generate, and Critique through Self-Reflection. Proceedings of the International Conference on Learning Representations, Vienna, Austria."},{"key":"ref_28","doi-asserted-by":"crossref","unstructured":"Wang, J., Zhao, R., Wei, W., Wang, Y., Yu, M., Zhou, J., Xu, J., and Xu, L. (2025). ComoRAG: A Cognitive-Inspired Memory-Organized RAG for Stateful Long Narrative Reasoning. arXiv.","DOI":"10.1609\/aaai.v40i39.40644"},{"key":"ref_29","unstructured":"Qian, H., Liu, Z., Zhang, P., Mao, K., Lian, D., Dou, Z., and Huang, T. (May, January 28). MemoRAG: Boosting Long Context Processing with Global Memory-Enhanced Retrieval Augmentation. Proceedings of the Web Conference (WWW), Sydney, NSW, Australia."},{"key":"ref_30","unstructured":"Yan, S.Q., Gu, J.C., Zhu, Y., and Ling, Z.H. (2024). Corrective Retrieval Augmented Generation. Proceedings of the ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Barcelona, Spain, 25\u201329 August 2024, Association for Computing Machinery (ACM)."},{"key":"ref_31","doi-asserted-by":"crossref","unstructured":"Jiang, Z., Xu, F.F., Gao, L., Sun, Z., Liu, Q., Dwivedi-Yu, J., Yang, Y., Callan, J., and Neubig, G. (2023). Active Retrieval Augmented Generation. Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, Singapore, 6\u201310 December 2023, Association for Computational Linguistics.","DOI":"10.18653\/v1\/2023.emnlp-main.495"},{"key":"ref_32","unstructured":"Ji, F., Yang, J., Song, Z., Wang, Y., Cui, Z., Li, Y., Jiang, Q., Fang, M., and Chen, X. (2025). FineState-Bench: A Comprehensive Benchmark for Fine-Grained State Control in GUI Agents. arXiv."},{"key":"ref_33","first-page":"8634","article-title":"Reflexion: Language Agents with Verbal Reinforcement Learning","volume":"36","author":"Shinn","year":"2023","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_34","doi-asserted-by":"crossref","unstructured":"Tang, D., Jiang, Q., Yang, J., Zhao, J., Du, X., Fang, M., and Zhang, X. (2026). SLTP: A Symbolic Travel-Planning Agent Framework with Decoupled Translation and Heuristic Tree Search. Electronics, 15.","DOI":"10.3390\/electronics15020422"},{"key":"ref_35","first-page":"396","article-title":"Efficient Reinforcement Learning via Decoupling Exploration and Utilization","volume":"Volume 14863","author":"Yang","year":"2024","journal-title":"Advanced Intelligent Computing Technology and Applications; Lecture Notes in Computer Science; International Conference on Intelligent Computing (ICIC 2024), Tianjin, China, 5\u20138 August 2024"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Kang, S., Lee, C., Jung, S., and Lee, M. (2025). Fic2Bot: A Scalable Framework for Persona-Driven Chatbot Generation from Fiction. Electronics, 14.","DOI":"10.3390\/electronics14193859"}],"container-title":["Algorithms"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/1999-4893\/19\/5\/383\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,19]],"date-time":"2026-05-19T08:58:24Z","timestamp":1779181104000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/1999-4893\/19\/5\/383"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,5,11]]},"references-count":36,"journal-issue":{"issue":"5","published-online":{"date-parts":[[2026,5]]}},"alternative-id":["a19050383"],"URL":"https:\/\/doi.org\/10.3390\/a19050383","relation":{},"ISSN":["1999-4893"],"issn-type":[{"value":"1999-4893","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,5,11]]}}}