N arrative P lay: Interactive Narrative Understanding (2024)

Abstract: In this paper, we introduce NarrativePlay, a novel system that allows users to role-play a fictional character and interact with other characters in narratives in an immersive environment. We leverage Large Language Models (LLMs) to generate human-like responses, guided by personality traits extracted from narratives. The system incorporates auto-generated visual display of narrative settings, character portraits, and character speech, greatly enhancing the user experience. Our approach eschews predefined sandboxes, focusing instead on main storyline events from the perspective of a user-selected character. NarrativePlay has been evaluated on two types of narratives, detective and adventure stories, where users can either explore the world or increase affinity with other characters through conversations.

## introduction people's experiences and thought processes can be effectively stored in a database, serving as a valuable repository of personality traits. recent studies @xcite @xcite have leveraged llms to generate human-like responses, which are guided by relevant memories retrieved from such a personality database when prompting llms. this significant advancement presents an exciting opportunity for creating an immersive and interactive environment that could enable emulating the dynamic storylines one might encounter while reading books, akin to those featured in the television series "westworld". however, current llm-based methods for interactive agents usually focus on specific capabilities in predetermined scenarios @xcite , often depending on manual settings for characters and environments @xcite to seed each agent's identity, while chen gao and emami (2023) tailored non-player character (npc) characteristics according to game-relevant features. this requires a deep understanding of the task by humans, who then manually craft it. as a result, this demands significant manual inputs and lacks generalisability. we lack a universal framework for designing adaptable ai agents for varied scenarios. narratives contain extensive character-centric details, including personalities, relationships, appearance, etc. all these information can be used to craft vivid characters and adapted to generate the portrait and voice for characters. additionally, narratives offer coherent events experienced by characters, adding depth and richness to each character. while extracting comprehensive character traits from long and complex narratives is challenging and remain largely under-explored @xcite , we show in this paper how to leverage the strong zero-shot learning capability of llms to create interactive agents. creating interactive and immersive environments for users and agents can be challenging due to two key factors: (1) setting extraction. environments or narrative settings are often vaguely defined unless crucial to the plot. existing research predominantly concentrates on agent behaviours within manually constructed sandboxes @xcite @xcite . we propose an approach focusing on main storyline events from the perspective of a user-selected character, reducing the complexity of identifying narrative settings. (2) visual representations of setting elements. leveraging stable diffusion models @xcite as external knowledge @xcite , we use image generation models to fill in missing details in environments. we categorise user (or player) behaviours and compile commonly asked questions to evaluate agents' responses. as we design interactive narfigure 1: our system's interactive process begins when a user provides a narrative to the system. they then choose a character as their narrative identity, through whom they can engage with the story. users can have conversations with other characters, thereby experiencing the story in a more immersive way. a screencast video introducing the system 1 and the demo 2 are available online. in summary, the contributions are: ## architecture of narrativeplay figure 3 shows an overview of narrativeplay, including three modules: (1) main storyline extraction; ## evaluation evaluating such a system is challenging due to the lack of gold-standard responses, especially about events and environments. human assessment demands deep narrative understanding, making it costly, and subjective interpretations may cause low inter-annotator agreement. we instead recruit three annotators to read whole narratives and rate responses to our specifically designed questions. we also explore automatic evaluation methods using llama-2-70b @xcite . we did not use gpt-4 for this purpose, as it shares a significant amount of training data with gpt-3.5, which could lead to an unfair evaluation. for each evaluation aspect, we provide detailed instruction, including the corresponding rubric and evaluation examples, to help both human annotator and llama to understand our scoring instruction. evaluations are conducted on two distinct narrative types: the adventure story charlie and the chocolate factory (ccf) and the detective novel murder on the orient express (moe). ## conclusions and future work narrativeplay, a novel platform, transforms narratives into interactive experiences, addressing challenges of storyline extraction, authentic character creation, and versatile environment design. by focusing on the main events and leveraging advanced llms, it aligns text, image, and speech, marking a step forward in immersive interactive narratives. furthermore, we categorise player behaviours and design commonly asked questions to evaluate the system's performance, and provide an evaluation framework for interactive narratives. with a potential for wider applications like game generation, narrativeplay paves the way for future advancements in narrative understanding. our current work has the following limitations. first, due to the lack of an api from midjourney, manual input of gpt-generated prompts is nec-essary. although we provide hotpot api as an alternative, the quality of its generated pictures is inferior to those from midjourney. second, the prolonged waiting time for the fakeyou api adversely affects real-time generation, potentially impairing user experience. third, we assume a linear event timeline in the input narrative, excluding time jumps or flashbacks. future work needs to explore dealing with more complex narrative structures. fourth, human evaluation is expensive. for future work, we plan to gather user activities to collect data for evaluating our system's performance.