Guiding and Diversifying LLM-Based Story Generation via Answer Set Programming

Phoebe J. Wang,Max Kreminski
2024-07-20
Abstract:Instruction-tuned large language models (LLMs) are capable of generating stories in response to open-ended user requests, but the resulting stories tend to be limited in their diversity. Older, symbolic approaches to story generation (such as planning) can generate substantially more diverse plot outlines, but are limited to producing stories that recombine a fixed set of hand-engineered character action templates. Can we combine the strengths of these approaches while mitigating their weaknesses? We propose to do so by using a higher-level and more abstract symbolic specification of high-level story structure -- implemented via answer set programming (ASP) -- to guide and diversify LLM-based story generation. Via semantic similarity analysis, we demonstrate that our approach produces more diverse stories than an unguided LLM, and via code excerpts, we demonstrate the improved compactness and flexibility of ASP-based outline generation over full-fledged narrative planning.
Computation and Language,Artificial Intelligence
What problem does this paper attempt to address?
The main problem that this paper attempts to solve is to improve the diversity of stories generated by large - language models (LLMs). Although LLMs can generate stories according to users' open - ended requests, these stories are often lacking in diversity. Traditional symbolic methods (such as planning) can generate more diverse plot outlines, but are limited by fixed, hand - designed character - action templates and have low flexibility. Therefore, the paper proposes a new method that combines the advantages of these two methods. By using Answer Set Programming (ASP) to guide and diversify the story - generation process of LLMs, it aims to generate more diverse and coherent stories. Specifically, the paper achieves this goal through the following steps: 1. **ASP - generated story outlines**: First, use ASP to generate a series of possible story outlines. ASP allows the definition of high - level narrative functions and their combinatorial constraints, thus generating structurally sound and diverse story frameworks. 2. **LLM - extended stories**: Then, randomly select one from the generated outlines and use the LLM to expand it into a complete text - based story. In this process, the LLM will carry out specific writing according to the functional requirements of each scene in the outline. In this way, the paper attempts to solve two main problems existing in current story - generation techniques: one is the lack of diversity in stories generated by LLMs; the other is that although traditional symbolic methods can generate diverse plots, they are too rigid and difficult to adapt to the needs of open - domain story generation.