Skip to content

rac7hel/planning-stories-neurally

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

planning-stories-neurally

Integrates GPT prompting into the Sabre Narrative Planner for research and experimentation involving LLM-guided search methodologies for planning-based story generation.

Purpose

Assign action costs based on what GPT says should happen next in the story.

LLM-guided search process

Installation

To run, you must have a valid OpenAI API key stored in an environment variable called OPENAI_KEY.

Requires Java. Uses Sabre v0.7.

Usage

Run Sabre with -m llm for the LLM-UCS search method. To run the example problem:

java -jar lib/sabre.jar -p problems/gramma.txt -atl 5 -ctl 4 -el 1 -g 1 -m llm

This searches the gramma problem with LLM-UCS, limited to 5 nodes by default. (Configurations in LLMSearch.java)

Writes two output files:

  • out/search.txt lists each node in the order visited
  • out/transcript.txt shows the full conversation with GPT and resulting action costs at each step.

Paper

View preprint

Rachelyn Farrell, Stephen G Ware. Planning Stories Neurally. TechRxiv. March 19, 2024. DOI: 10.36227/techrxiv.171085113.35202301/v1

Results

Search results for the Sabre benchmark problems are discussed in the paper, and complete transcripts from these searches are included here.

About

Use GPT as a heuristic for narrative planning with Sabre

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages