Integrates GPT prompting into the Sabre Narrative Planner for research and experimentation involving LLM-guided search methodologies for planning-based story generation.
Assign action costs based on what GPT says should happen next in the story.
To run, you must have a valid OpenAI API key stored in an environment variable called OPENAI_KEY.
Requires Java. Uses Sabre v0.7.
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 visitedout/transcript.txt
shows the full conversation with GPT and resulting action costs at each step.
Rachelyn Farrell, Stephen G Ware. Planning Stories Neurally. TechRxiv. March 19, 2024. DOI: 10.36227/techrxiv.171085113.35202301/v1
Search results for the Sabre benchmark problems are discussed in the paper, and complete transcripts from these searches are included here.