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

2406.00554

YC

0

Reddit

0

Published 6/4/2024 by Phoebe J. Wang, Max Kreminski
Guiding and Diversifying LLM-Based Story Generation via Answer Set Programming

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.

Create account to get full access

or

If you already have an account, we'll log you in

Overview

ā€¢ This paper explores a novel approach to guiding and diversifying story generation using large language models (LLMs) and Answer Set Programming (ASP).

ā€¢ The researchers present a technique that leverages ASP to provide high-level constraints and objectives for an LLM-based story generation system, allowing for more controlled and diverse narrative outputs.

ā€¢ The proposed method aims to address the common challenge of LLMs producing repetitive or undesirable content when generating open-ended stories.

Plain English Explanation

ā€¢ Large language models (LLMs) have shown impressive capabilities in generating natural-sounding text, including creative writing tasks like story generation. However, these models can sometimes produce repetitive or undesirable content when left unconstrained.

ā€¢ The researchers in this paper developed a way to guide and diversify the story generation process using a technique called Answer Set Programming (ASP). ASP is a programming paradigm that allows for the specification of high-level rules and constraints.

ā€¢ By integrating ASP with an LLM-based story generation system, the researchers were able to provide the LLM with clear objectives and guidelines to follow when generating stories. This resulted in more controlled and diverse narrative outputs, addressing the common issue of LLMs producing repetitive or undesirable content.

ā€¢ The key idea is to use ASP to define the desired story elements, character traits, plot points, and other narrative features, and then have the LLM generate stories that align with these constraints and objectives. This allows for a more directed and diverse story generation process, rather than relying solely on the LLM's own tendencies.

Technical Explanation

ā€¢ The researchers developed a system that integrates an LLM-based story generation model with an ASP-based reasoning engine. The LLM (specifically GPT-2) is used to generate the actual text of the stories, while the ASP component provides high-level guidance and constraints.

ā€¢ The ASP module defines a set of rules and constraints that describe the desired story elements, such as character traits, plot points, and narrative themes. These rules are then used to guide the LLM's story generation process, ensuring that the output aligns with the specified objectives.

ā€¢ The researchers conducted experiments to evaluate the effectiveness of their approach, comparing the diversity and coherence of stories generated with and without the ASP-based guidance. The results showed that the integrated LLM-ASP system produced more diverse and coherent stories compared to the LLM-only baseline.

ā€¢ The researchers also explored the ability to generate multiple, distinct story variations based on the same set of ASP-defined constraints. This demonstrates the potential of the approach to support creative exploration and iterative story development.

Critical Analysis

ā€¢ The proposed LLM-ASP integration represents a promising approach to addressing the limitations of standalone LLM-based story generation systems. By leveraging the expressive power of ASP, the researchers were able to provide more nuanced control and guidance to the LLM, resulting in improved narrative diversity and coherence.

ā€¢ However, the evaluation focused on relatively simple story scenarios and constraints. It would be interesting to see how the system would scale and perform in the context of more complex, open-ended story worlds with a broader range of narrative elements and interactions.

ā€¢ Additionally, the paper does not provide a deep analysis of the specific types of stories or narrative structures that the system is capable of generating. Further research could explore the strengths and weaknesses of the approach across different genres, narrative styles, and levels of complexity.

ā€¢ Finally, the integration of the LLM and ASP components could potentially be further optimized or refined to improve the seamless collaboration between the two systems, potentially leading to even more compelling and diverse story generation capabilities.

Conclusion

ā€¢ This paper presents a novel approach to guiding and diversifying story generation using the combination of large language models and Answer Set Programming. By integrating ASP-defined constraints and objectives, the researchers were able to address the common challenge of LLMs producing repetitive or undesirable content when generating open-ended stories.

ā€¢ The proposed LLM-ASP system demonstrates the potential for more controlled and diverse narrative outputs, opening up new avenues for creative writing and interactive storytelling. As language models continue to advance, approaches like this that combine the strengths of different AI paradigms may become increasingly important for developing more robust and versatile story generation capabilities.



This summary was produced with help from an AI and may contain inaccuracies - check out the links to read the original source documents!

Related Papers

CLMASP: Coupling Large Language Models with Answer Set Programming for Robotic Task Planning

CLMASP: Coupling Large Language Models with Answer Set Programming for Robotic Task Planning

Xinrui Lin, Yangfan Wu, Huanyu Yang, Yu Zhang, Yanyong Zhang, Jianmin Ji

YC

0

Reddit

0

Large Language Models (LLMs) possess extensive foundational knowledge and moderate reasoning abilities, making them suitable for general task planning in open-world scenarios. However, it is challenging to ground a LLM-generated plan to be executable for the specified robot with certain restrictions. This paper introduces CLMASP, an approach that couples LLMs with Answer Set Programming (ASP) to overcome the limitations, where ASP is a non-monotonic logic programming formalism renowned for its capacity to represent and reason about a robot's action knowledge. CLMASP initiates with a LLM generating a basic skeleton plan, which is subsequently tailored to the specific scenario using a vector database. This plan is then refined by an ASP program with a robot's action knowledge, which integrates implementation details into the skeleton, grounding the LLM's abstract outputs in practical robot contexts. Our experiments conducted on the VirtualHome platform demonstrate CLMASP's efficacy. Compared to the baseline executable rate of under 2% with LLM approaches, CLMASP significantly improves this to over 90%.

Read more

6/6/2024

šŸ’¬

Do Language Models Enjoy Their Own Stories? Prompting Large Language Models for Automatic Story Evaluation

Cyril Chhun, Fabian M. Suchanek, Chlo'e Clavel

YC

0

Reddit

0

Storytelling is an integral part of human experience and plays a crucial role in social interactions. Thus, Automatic Story Evaluation (ASE) and Generation (ASG) could benefit society in multiple ways, but they are challenging tasks which require high-level human abilities such as creativity, reasoning and deep understanding. Meanwhile, Large Language Models (LLM) now achieve state-of-the-art performance on many NLP tasks. In this paper, we study whether LLMs can be used as substitutes for human annotators for ASE. We perform an extensive analysis of the correlations between LLM ratings, other automatic measures, and human annotations, and we explore the influence of prompting on the results and the explainability of LLM behaviour. Most notably, we find that LLMs outperform current automatic measures for system-level evaluation but still struggle at providing satisfactory explanations for their answers.

Read more

5/24/2024

šŸ‘ļø

StoryVerse: Towards Co-authoring Dynamic Plot with LLM-based Character Simulation via Narrative Planning

Yi Wang, Qian Zhou, David Ledo

YC

0

Reddit

0

Automated plot generation for games enhances the player's experience by providing rich and immersive narrative experience that adapts to the player's actions. Traditional approaches adopt a symbolic narrative planning method which limits the scale and complexity of the generated plot by requiring extensive knowledge engineering work. Recent advancements use Large Language Models (LLMs) to drive the behavior of virtual characters, allowing plots to emerge from interactions between characters and their environments. However, the emergent nature of such decentralized plot generation makes it difficult for authors to direct plot progression. We propose a novel plot creation workflow that mediates between a writer's authorial intent and the emergent behaviors from LLM-driven character simulation, through a novel authorial structure called abstract acts. The writers define high-level plot outlines that are later transformed into concrete character action sequences via an LLM-based narrative planning process, based on the game world state. The process creates living stories that dynamically adapt to various game world states, resulting in narratives co-created by the author, character simulation, and player. We present StoryVerse as a proof-of-concept system to demonstrate this plot creation workflow. We showcase the versatility of our approach with examples in different stories and game environments.

Read more

5/24/2024

šŸ›ø

A Survey Study on the State of the Art of Programming Exercise Generation using Large Language Models

Eduard Frankford, Ingo Hohn, Clemens Sauerwein, Ruth Breu

YC

0

Reddit

0

This paper analyzes Large Language Models (LLMs) with regard to their programming exercise generation capabilities. Through a survey study, we defined the state of the art, extracted their strengths and weaknesses and finally proposed an evaluation matrix, helping researchers and educators to decide which LLM is the best fitting for the programming exercise generation use case. We also found that multiple LLMs are capable of producing useful programming exercises. Nevertheless, there exist challenges like the ease with which LLMs might solve exercises generated by LLMs. This paper contributes to the ongoing discourse on the integration of LLMs in education.

Read more

5/31/2024