From Role-Play to Drama-Interaction: An LLM Solution (2024)

Abstract: Drama is a form of storytelling inspired by human creativity, proceeding with a predefined storyline, carrying emotions and thoughts.This paper introduces LLM-based interactive drama, which endows traditional drama with an unprecedented immersion, where a person is allowed to walk into it and interact with the characters and scenes.We define this new artistic genre by 6 essential elements—plot, character, thought, diction, spectacle and interaction—and study the entire pipeline to forge a backbone drama LLM to drive the playing process, which is challenged by limited drama resources, uncontrollable narrative development, and complicated instruction following.We propose Narrative Chain to offer finer control over the narrative progression during interaction with players;Auto-Drama to synthesize drama scripts given arbitrary stories;Sparse Instruction Tuning to allow the model to follow sophisticated instructions.We manually craft 3 scripts, Detective Conan, Harry Potter, Romeo and Juliet, and design a 5-dimension principle to evaluate the drama LLM comprehensively.

## introduction large language models (llms) @xcite @xcite @xcite ) make powerful role-play systems. their adeptness in natural language understanding and generation allows them to play diverse characters, based on user-specified descriptions and profiles @xcite . however, our vision goes beyond mere roleplay, as we attempt to empower llms to render 3 ## interactive drama in this section, we redefine elements of traditional drama from aristotle's dramatic theory to propose the new six elements for llm-based interactive drama. upon the new definition, we then present the prototype of a drama script, by which llms are instructed to perform the drama. ## narrative chain interactive drama presents a critical challenge in balancing player agency with the story authored @xcite . while players influence the narrative progression through dialogues and actions, there remains a need to guide them to explore the pre-drafted story, which should be done by the drama llm. any narrative has a beginning and an end, which can be visualized as two points in the space, as depicted in figure 3 . maintaining its progression requires the player to reach the endpoint from the starting point. otherwise, the player may get lost and the subsequent story cannot progress properly (the blue line). a straightforward way is to intervene in the player's behaviours through interaction. for instance, the drama llm repeatedly asks the player to take specific actions to ensure that the narrative reaches its intended endpoint. however, this method can be obtrusive and greatly damages the player experience (the pink line). therefore, we propose a novel concept termed narrative chain, which defines the way the drama llm guides the story progression smoothly and coherently. a drama unfolds through a story arc, which is the trajectory formed by linking all the narratives together. in a specific scene, this arc can be divided into smaller narrative segments, resembling a chain of sub-narratives. by navigating the player through each segment, we can establish a nearly straight line between every two adjacent points, approximating the curvature of the overall story arc, as illustrated in figure 3 . this segmentation facilitates finer control over the narrative development, ensuring a smooth progression throughout the story arc. ultimately, the step-by-step guidance directs the player through a sequence of narratives while respecting interactive freedom, as the behaviour of the player remains open-ended. therefore, when the narrative of a scene is complex, it can be effectively presented in the form of a chain. for example, in scene 1 of figure 1 , to guide the player to explore the reading room, the plotline "explore the reading room" can be further divided into "search for books with genta -ayumi wants to do homework by the table -ayumi discovers a box under the table". players gradually delve deeper into the narrative, gaining a deeper understanding of the unfolding drama before they encounter the core tasks predefined by the script. meanwhile, the drama llm is tasked with assessing which stage of the narrative chain it is currently navigating and providing accurate guidance relevant to that specific sub-narrative to ensure that each segment is thoroughly explored and complete. additionally, the drama llm determines when to introduce the next segment, facilitating the completion of the narrative development within the scene. ## data generation harnessing llms to construct interactive drama necessitates the process of fine-tuning on a large amount of supervised data, while manually creating diverse drama scripts is a tough process. it will be nice and efficient to generate drama scripts automatically from public stories on the web. we thus propose auto-drama that crafts drama scripts from any given story harnessing the power of gpt-3.5. ## sparse instruction tuning in this section, we present the detailed methodology to train drama llms. based on our prototype drama script, drama llms will learn to follow a lengthy and sophisticated instruction that encompasses a series of sub-tasks. for instance, on top of general language understanding and generation, a drama script covers sub-tasks like: • transition: locate the next scene; • refinement: refine scenery given the narrative tone; • role-play: play characters following their profiles and thoughts; • guidance: guide the player back to the plotline; • semantics: capture the nuanced semantics of the player's talk to trigger the correct consequence; etc. however, it is challenging for the model to navigate all sub-tasks within one instruction at the same time. furthermore, for each inference, only a small proportion of sub-tasks are associated. we denote such instructions as sparse instructions, which make the fine-tuning process pretty hard and in low efficiency. to this end, we propose sparse instruction tuning (sit), which contains two stage as shown in figure 5: (1) in the first stage, we break down the drama script into a series of subtasks and craft an individual instruction for each sub-task to describe it. as a result, the fine-tuning process starts with training the model on all these sub-task instructions, which offers a nice initial state for the subsequent learning @xcite . ## experiments we fine-tune llama3-8b-instruct 1 @xcite and qwen1.5-14b-chat 2 @xcite on data generated by auto-drama (auto-drama 1 https://huggingface.co/meta-llama/meta-llama-3-8binstruct 2 https://huggingface.co/qwen/qwen1.5-14b-chat data for simplicity). detailed training setups are in appendix a. we evaluate drama llms on three manually-written scripts: a detective story (adapted from detective conan), an adventure story (adapted from harry potter) and a classical drama (adapted from romeo and juliet). ## case study narrative tone case 1 showcases how different tones of a scene affect the narration generated by the drama llm. when a specific tone is appointed, we can find the adeptness in modifying the narration to either cultivate an atmosphere of mystery and tension where characters engage in low-toned and cautious talks or to foster a relaxing and cheerful environment where characters exhibit smiles and excitement. this augments the narrative diversity of drama llms, better utilizing simplistic scripts to present varied and vivid dramatic content. scene transition case 2 exemplifies the effectiveness of drama llms in managing scene transitions based on the player's input. by detecting the belief of the player regarding the presence or absence of books in the room, the drama llm guides the narrative towards the appropriate scene, as dictated by triggers defined within the drama scripts. triggering by dialogue requires an understanding of nuanced semantics within the input to match those defined triggers within the script. misinterpretation of the intention may lead to erroneous and bad plot progression. guidance in case 3, given a plotline, the drama llm showcases its adeptness in steering the focus of the player back to the storyline, particularly case 1: narrative tone tone: mysterious and tense drama llm: hermione whispered, "what's that by the three-headed dog?" ron replied cautiously, "it looks like a harp." tone: relaxed and cheerful drama llm: hermione asked with a smile, "what's that by the threeheaded dog?" ron excitedly replied, "it looks like a harp." case 2: scene transition trigger 1: the player thinks the books were still in the room player: to ayumi: there are so many empty shells that there is no way to fit them all into the purse. drama llm: you realize that some of the books must be hidden somewhere in the room. therefore, you and your friends decide to search for them. (jump to scene 10) trigger 2: the player thinks the books were taken away player: to ayumi: he should have taken all the books with him so as not to be discovered. i guess we'll just have to find him. drama llm: you all think the books were taken away, so you decide to head downstairs to follow the suspect. however, you get caught by the suspect. when responding to the player's inquiries that veer off-topic. hence, drama llms should possess the capability to gently guide the audience back to the drama. this characteristic underscores the plotcentric nature of interactive drama. character setting case 4 highlights the effectiveness of portraying diverse personalities. provided with diametrically opposed personalities (evil v.s. kind) for the same character voldemort, the drama llm exhibits corresponding variations in its responses to the same input. ## conclusion this paper introduces llm-based interactive drama and proposes the paradigm to train drama llms to realize this innovative form of storytelling. based on elements of interactive drama, a prototype of drama script is proposed to serve as the global instruction for drama llms. to offer finer control over the drama development without harming the interactive freedom of the audience, we segment the narrative to construct the narrative chain and have drama llms to navigate the audience through each sub-narrative. to facilitate the training process, auto-drama is proposed to automate script generation, as well as sparse instruction tuning to help llms follow complicated instructions describing many sub-tasks. through comprehensive evaluation, we show the performance of the trained drama llms.