GENEVA: GENErating and Visualizing branching narratives using LLMs

Jorge Leandro, Sudha Rao, Michael Xu, Weijia Xu, Nebosja Jojic, Chris Brockett, Bill Dolan

TL;DR

GENEVA is a prototype tool that leverages GPT-4 to automatically generate and visualize complex, branching narrative graphs for games and interactive storytelling. By introducing a novel bottom-up, iterative prompting strategy, it successfully forces the LLM to create interwoven, reconverging storylines that adhere to strict user-defined structural and contextual constraints.

What Problem Does This Paper Address?

Writing rich, branching narratives for modern Role-Playing Games (RPGs) and interactive media is a massive bottleneck in game development. It typically requires years of manual labor by large creative teams to map out dialogue trees, plot outlines, and intersecting storylines.

While players increasingly demand vast, limitless worlds, existing procedural generation tools lack the creative capacity to build compelling narratives. Large Language Models (LLMs) possess the inherent creative capacity needed, but simply asking them to write a branching story top-down usually results in independent, parallel plotlines that never intersect. The authors tackle the challenge of making LLMs generate true Directed Acyclic Graphs (DAGs) where stories branch out and reconverge naturally.

Methods

The authors present GENEVA, a two-step pipeline powered by GPT-4:

  1. Iterative Storyline Generation (Bottom-Up Prompting): Instead of asking the model to generate an entire branching tree at once, GENEVA uses a sequential approach. It prompts GPT-4 to generate a single baseline storyline as a sequence of "narrative beats" (the smallest structural elements of a story). It then instructs the model to generate subsequent storylines one by one, explicitly forcing them to share some beats with previous paths while introducing new ones.
  2. Graph Visualization: A second prompt takes these text-based storylines and instructs GPT-4 to format them into structured NODES and EDGES JSON dictionaries. This structured data is then fed directly into a Javascript D3.js frontend to render an interactive narrative graph.

Datasets

Not discussed in the paper. The tool relies entirely on zero- and few-shot prompting of a pre-trained model (GPT-4) rather than training or fine-tuning on a specific dataset. For evaluation, the authors conducted a case study using four classic, widely known stories: Dracula, Frankenstein, Jack and the Beanstalk, and Little Red Riding Hood.

Key Insights and Ideas

  • The Power of Bottom-Up Prompting: The paper’s core technical "aha moment" is that top-down generation fails for complex structures. Forcing the LLM to build paths sequentially while keeping prior paths in memory naturally yields the intersections and divergences required for a proper narrative graph.
  • Contextual Grounding Bias: The quality of the narrative adaptation depends heavily on how well-documented the target setting is in the LLM's training data. Grounding Little Red Riding Hood in Minecraft or Frankenstein in the 21st Century yielded rich, specific elements (e.g., redstone contraptions, DNA fragments). Conversely, grounding stories in the Quantum Realm resulted in generic, superficial changes because the setting lacks concrete real-world or well-documented data.
  • Safety/Moral Alignment Bias: The authors observed that the model naturally steered away from grim original endings (like Little Red Riding Hood being eaten) in favor of positive, morally educational resolutions across all generated branches, reflecting the underlying safety alignment of GPT-4.

Key Results

The authors successfully demonstrated GENEVA's ability to generate narrative graphs matching strict structural constraints (e.g., specific numbers of starts, endings, and total plots).

As shown in the online interface, users can specify constraints to generate distinct narrative structures. For example, the system generated a 21st-century adaptation of Frankenstein using 1 start, 2 endings, and 4 distinct storylines:

Fig. 1. In the online interface of GENEVA, you can choose a particular story, pick the number of starts, ends and storylines and click on the ‘Show Graph’ button to see the narrative graph for that story. The above figure shows the narrative graph for the Frankenstein story but grounded in the 21st century. Additional constraints on the graph includes one start, two endings and four storylines.

Users can also expand the interface to view the exact sequence of narrative beats that compose each individual path within the graph:

Fig. 2. In the online interface of GENEVA, you can see the detailed description of the sequence of beats that make up each storyline by clicking on the ‘Show Details’ button. The above figure shows detailed view of the four different storylines present in the narrative graph in Figure 1.

Limitations and Future Work

  • Lack of Flavor Variety: Generated storylines within the same graph can sometimes feel too similar in tone and flavor, lacking truly radical narrative divergence.
  • Superficial Skinning in Abstract Realms: For poorly documented or highly abstract settings (like the Quantum Realm), the model resorts to generic sci-fi tropes rather than deep plot adaptation.
  • Human-in-the-Loop Necessity: GENEVA is currently positioned as an assistant tool for initial drafting. The authors note that future iterations should focus on creating interactive editing interfaces so narrative designers can iteratively refine, approve, and diversify the AI-generated plots.

Summary updated

BibTeX
@inproceedings{leandro2023geneva,
  author = {Jorge Leandro and Sudha Rao and Michael Xu and Weijia Xu and Nebosja Jojic and Chris Brockett and Bill Dolan},
  title = {{GENEVA: GENErating and Visualizing branching narratives using LLMs}},
  booktitle = {CoG},
  year = {2023},
}
Figure