Skip to content

Remember Me: Enhancing Long-term Character Persistence in LLM-Generated Stories using Knowledge Graphs

Alvin Tan, Jay Campanell, Richa Misra, Naina Panjwani, Jessica Fu, Rida Faraz, Joel Walsh

cs.CL

Abstract

Despite advances in the instruction-following capabilities of LLMs, long-form content generated by state-of-the-art models still lacks coherence and consistency. Previous work in Question Answering and factual text generation has leveraged knowledge graphs (KG)' representation capabilities, but there have been limited efforts to incorporate KGs in creative tasks. To improve LLMs' zero-shot performance in narrative generation, we propose a multi-agent story generation pipeline with knowledge graphs as long-term context storage to improve character and relationship consistency in long fiction. To this end, we designed and tested a pipeline that can generate long narratives chapter by chapter with LLM agents responsible for generation planning, knowledge graph extraction, and next chapter generation. We also created a comprehensive list of starting prompts to evaluate the pipeline's performance across genres. In order to evaluate the pipeline quantitatively, we devised a novel retention-based story consistency metric due to a gap in effective quantitative metrics for unreferenced text generation. The character retention metrics and relationship retention metrics reflect a narrative's long-term consistency across chapters. Through a statistical analysis of stories generated with the multi-agent KG pipeline and those generated with naive prompting, we found significant improvement in retention and cohesion in stories generated with KG guidance.

Create a lesson

Metadata

Categories
cs.CL, cs.AI
Journal
Proceedings of the 17th International Conference on Computational Creativity (ICCC'26), Association for Computational Creativity (ACC), 2026, pp. 189-198 (ISBN 978-989-54160-8-0)
Comments
10 pages, 2 figures, 2 tables. Published in the Proceedings of the 17th International Conference on Computational Creativity (ICCC'26), Coimbra, Portugal, June 29 - July 3, 2026. Code available at https://github.com/usc-caisplusplus/kg-story-persistence