yingpengma / Awesome-Story-Generation

This repository collects an extensive list of awesome papers about Story Generation / Storytelling, primarily focusing on the era of Large Language Models (LLMs).
276 stars 20 forks source link

Request for a Simple Guide for Long Story Generation with Local LLM #7

Open 8ullyMaguire opened 3 months ago

8ullyMaguire commented 3 months ago

Hi there, I was wondering if there is a simple guide available for generating long stories using a local Large Language Model (LLM)? I'm looking for something that I can adapt and implement within a few minutes.

I have in mind a step-by-step guide similar to the following:

# Step 1: Generate a high-level outline
high_level_outline_prompt = "Generate a brief, high-level outline for a story with the following elements: [specify desired story elements, genre, themes, etc.]"
high_level_outline = generate_text(high_level_outline_prompt)

# Step 2: Expand the outline into a detailed chapter-by-chapter outline
detailed_outlines = []
for chapter_point in high_level_outline:
    detailed_outline_prompt = f"Based on the following outline point: '{chapter_point}', generate a detailed outline for that chapter, including key events, character interactions, and plot developments."
    detailed_outline = generate_text(detailed_outline_prompt)
    detailed_outlines.append(detailed_outline)

# Step 3: Generate the story chapter by chapter
story_chapters = []
for chapter_index, detailed_outline in enumerate(detailed_outlines):
    chapter_prompt = f"Here is the detailed outline for Chapter {chapter_index + 1}:\n\n{detailed_outline}\n\nPlease generate the story text for this chapter, following the outline closely."
    chapter_text = generate_text(chapter_prompt)
    story_chapters.append(chapter_text)

# Step 4: Combine chapters into a complete story
complete_story = "\n\n".join(story_chapters)

Is there a resource or a similar guide available that I can use with my local LLM? Any help would be greatly appreciated.

Thank you!

yingpengma commented 3 months ago

Many papers in this project have made their code publicly available, such as Autoagents: A framework for automatic agent generation, RecurrentGPT: Interactive Generation of (Arbitrarily) Long Text and others. They often employ different strategies for story generation, which are described in detail in the papers. You can quickly target the strategy you like based on the paper title, then check if they have released the source code and give it a try.