Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
8ullyMaguire opened this issue Jun 6, 2024 · 1 comment

Comments

@8ullyMaguire
Copy link

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
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants