Prompt Engineering Templates for Multi-Genre Novel Writing with LLMs

    This article explores how to use structured prompt engineering to achieve controllable multi-genre novel generation with large language models (LLMs). It covers the transition from open-ended generation to specification-driven writing, introduces a universal prompt skeleton, and provides genre-specific templates for Sci-Fi, mystery, historical realism, fantasy, and urban romance. Additionally, it outlines slot design principles, a three-step iteration workflow (outline, expansion, review), and engineering practices for template configuration and quality logging to ensure stable, high-quality content production.

    Prompt Engineering Templates for Multi-Genre Novel Writing with LLMs

    1. From “Generating” to “Controllable Generation”: The Value of Structured Prompts

    Novel writing is a typical open-ended generation task: the goal is not unique, evaluation criteria are diverse, and context dependency is high. If you simply give the model a prompt like “write a sci-fi story,” the output often suffers from excessive randomness, making it difficult to control character motivation, world-building rules, and plot pacing. The essence of precise prompt engineering is transforming vague creative desires into a lightweight “requirements specification”: telling the model what to write, what not to write, what structure to follow, and the required depth.

    Structured prompts offer at least three key benefits. First, they reduce ambiguity. By using slots for background, theme, characters, conflict, style, and output format, open tasks are broken down into verifiable constraints. Second, they improve reusability. The same skeleton can be migrated to sci-fi, mystery, historical, fantasy, or urban genres by simply replacing the slot contents. Third, they facilitate engineering. Templates can be configured, batch-rendered, logged, and evaluated for quality, enabling content teams to produce content consistently.

    2. Universal Prompt Skeleton: Define Specifications Before Prose

    Regardless of the genre, it is recommended to adopt a layered structure: “Role & Goal - Background Setting - Theme/Proposition - Character Setting - Plot Constraint - Narrative Style - Output Specification - Quality Self-Check.” The universal template is as follows:

    1. You are a novel author specializing in [Genre]. Please complete the following creative task:
    2. [Task Goal] Write a [Length] [Genre] novel with the core theme of [Theme Proposition].
    3. [Story Background] The story takes place in [Era/Location/World Rules].
    4. [Character Setting] The protagonist is [Identity, Personality, Desire, Flaw]; the key supporting characters are [Relationship and Function].
    5. [Plot Constraint] Must include [Core Conflict, Key Events, Turning Points, Ending Direction].
    6. [Narrative Style] Adopt [Perspective, Tone, Pacing, Style Tags], avoiding [Taboo List].
    7. [Output Format] First output [Character Biographies/Chapter Summaries/Conflict Table], then output the main text.
    8. [Quality Self-Check] Check whether character motivations are self-consistent, the timeline is clear, foreshadowing is resolved, and settings are consistent throughout.

    The key to this skeleton is not having as many fields as possible, but ensuring each field is actionable. For example, “style like a certain work” is too vague; it should be changed to “cold and restrained third-person limited perspective, primarily short sentences, with environmental descriptions serving to create a sense of oppression.” Similarly, “exciting plot” is unverifiable and should be changed to “plant two clues in the first third, trigger an identity reversal in the middle, and resolve at least one piece of foreshadowing at the end.”

    3. Genre-Specific Templates and Examples

    3.1 Sci-Fi Template

    The core of sci-fi creation is the coupling of world rules and thematic propositions. The prompt should clearly define technical settings, social impacts, character dilemmas, and conflict boundaries.

    1. Please write a sci-fi story about [Theme] set against the background of [Story Background].
    2. The protagonist is [Character Setting] and must face [Core Dilemma].
    3. The plot includes [Plot Element 1], [Plot Element 2], and [Plot Element 3].
    4. The world rules are [Technical Settings and Limitations], and [Taboo Settings] must not appear.
    5. The style adopts [Style Tags], the narrative perspective is [Perspective], and the output is [Length and Structure].

    Example: Set in a future Mars colony, write a sci-fi story about AI awakening. The protagonist is a young engineer, and the plot includes elements like robot rebellion, temporary human-machine collaboration, and space adventure. World rules are limited to “AI is constrained by both energy and permissions, and cannot acquire physical capabilities out of thin air.” The style adopts a bleak cyberpunk and hard sci-fi tone, using a third-person limited perspective. This template prevents setting drift through “world rules + constraints” and forces character choices through the “core dilemma,” rather than merely piling up spectacles.

    3.2 Mystery and Suspense Template

    Mystery and suspense must prioritize the fairness of clues and the rationality of twists. The template should require output of the puzzle, suspects, clue tables, and misdirection mechanisms.

    1. Please write a mystery novel set in a [Closed/Open] space with the core puzzle being [Puzzle].
    2. The victim is [Setting], and the suspects are [3 to 5 people and their motives].
    3. It must include [Key Clues], [Misleading Clues], and [One Reasonable Twist].
    4. All clues for solving the case must appear before the reveal; no supernatural explanations are allowed.
    5. Adopt [Perspective], with a pacing of [Pacing Requirements], and resolve [Foreshadowing] at the end.

    Example: A disappearance occurs inside a closed research station, and the core puzzle is “the last log before the communication blackout was tampered with.” The suspects are the station manager, the doctor, and the mechanic, each with concealed motives. Key clues include timestamp discrepancies and equipment maintenance logs, while misleading clues point to an external intrusion. The twist reveals it was faked by internal personnel. The template’s requirement for “fair clues” significantly reduces the probability of “author-forced twists.”

    3.3 Historical and Realism Template

    This genre requires clarifying era rules, social constraints, and the boundaries of historical detail research to prevent modern concepts from time-traveling.

    1. Please write a realism novel set in [Era and Location] with the theme of [Theme].
    2. The protagonist is [Class, Profession, Situation], their desire is [Desire], and the obstacle is [Social Rules].
    3. The plot must reflect [Era Details] and [Institutional Constraints], avoiding [Modern Concepts/Technology Time-Travel].
    4. The style adopts [Restrained/Lyrical/Ensemble] expression, outputting [Chapter Summary and Main Text].

    Example: Set in a modern-era port city, the theme is “individual choices amidst industry changes.” The protagonist is a dock bookkeeper whose desire is to preserve family livelihood, and the obstacle is the impact of new technologies and systems on old positions. The plot must reflect era details like prices, working hours, and guild rules, and modern communication tools must not appear. This anchors the story’s conflict in social structure rather than relying on coincidence.

    3.4 Fantasy and Coming-of-Age Template

    Fantasy must clarify the “cost of power” and “world taboos,” while coming-of-age must clarify the character arc.

    1. Please write a fantasy novel where the world rules are [Power Source and Cost], and the taboo is [Taboo].
    2. The protagonist is in [Initial State], their flaw is [Flaw], and their growth goal is [Arc].
    3. The plot includes [Trials], [Costs], [Choices], and [Ending Direction].
    4. The style adopts [Style Tags], outputting [Character Biography, Chapter Summary, Main Text].

    Example: Magic in this world comes from memory exchange; every spell cast loses a private memory. The protagonist is a scribe afraid of forgetting, who must use three memory exchanges to stop a city from sinking. The conflict lies not in “defeating the enemy” but in “which memories to keep.” The template makes the fantasy setting serve character choices through a “cost system.”

    3.5 Urban Romance Template

    Urban romance should avoid empty sweetness and instead design relationship tension, external pressure, and emotional nodes.

    1. Please write an urban romance novel with the theme of [Relationship Proposition].
    2. Protagonist A is [Setting and Needs], and Protagonist B is [Setting and Needs].
    3. The core tension of the relationship is [Value Conflict/Realistic Pressure], and it must include [Three Emotional Nodes] and [One Relationship Breakup].
    4. The style adopts [Restrained/Light Comedy/Realistic], and the ending is [Open/Happy/Regretful].

    Example: The theme is “divergence in career choices within intimate relationships.” A wants stability, while B pursues distant opportunities. The core tension is the conflict between security and self-actualization. The three nodes are joint planning, concealed choices, and public fallout, ending with an honest conversation. The template gives the emotional conflict a concrete source, reducing “angst for the sake of angst.”

    4. Slot Design Principles: Specific, Verifiable, and Flexible

    Slot filling should follow four principles. First, be specific but not locked. “Young engineer” is more specific than “protagonist,” but you don’t need to specify their hairstyle. Second, conflicts must be executable. “Robot rebellion” is an event; “the protagonist must choose between saving their companion and shutting down the system” is a plot. Third, use style tags with counter-examples. Write both “cold and restrained” and “avoid flippant jokes and excessive sentimentality.” Fourth, output formats must be explicitly declared. Requiring character biographies and chapter summaries before the main text significantly reduces structural drift in long-form generation.

    5. Three-Step Iteration: Outline, Expansion, and Review

    Do not expect to generate an entire novel in one go. A three-step approach is recommended. Step 1: Generate the outline and conflict table. Require output of character biographies, chapter summaries, core conflicts, and a foreshadowing list. Step 2: Expand by chapter. Provide the previous summary, character status, chapter goals, word count, and ending hook each time to prevent context loss. Step 3: Consistency review. Use an independent prompt to check character motivation, timeline, setting rules, foreshadowing resolution, and taboo items.

    The review template can be written as: “Please review the following chapter as an editor. List four types of issues: broken character motivations, timeline contradictions, setting violations, and omitted foreshadowing, and provide minimal revision suggestions. Do not rewrite the full text; only output the issue list.” This separation of “generation” and “review” is more stable than repeatedly asking the same generation round to self-correct.

    6. Engineering Implementation: Template Configuration and Quality Logging

    Content teams can abstract templates into configuration objects and then render them into prompts. An example configuration is as follows:

    1. {
    2. "genre": "Sci-Fi",
    3. "background": "Future Mars colony",
    4. "theme": "AI awakening",
    5. "protagonist": "Young engineer",
    6. "plot_elements": ["Robot rebellion", "Human-machine collaboration", "Space adventure"],
    7. "style_tags": ["Bleak cyberpunk", "Hard sci-fi"],
    8. "constraints": ["Third-person limited perspective", "No supernatural powers", "Cliffhanger at the end of each chapter"],
    9. "output": {"outline": "10-chapter summary", "chapter_words": 3000}
    10. }

    During rendering, perform variable validation first: check if required fields are missing, if arrays are empty, and if taboo items conflict with the genre. After generation, log the template version, configuration summary, output word count, and number of review issues for subsequent evaluation. For batch production, it is recommended to fix three template versions: “outline template,” “expansion template,” and “review template” to avoid quality fluctuations caused by prompt drift.

    7. Common Pitfalls and Corrections

    Common pitfalls include: providing only a theme without a conflict, leading to a flat story; piling up style adjectives without perspective, syntax, or pacing constraints; requesting full-book generation in one prompt, leading to setting contradictions; ignoring output formats, making reuse difficult; and skipping consistency reviews, resulting in out-of-control foreshadowing and timelines. The correction direction is: rewrite wishes as constraints, rewrite adjectives as observable text features, break long-form writing into outlines and chapters, and treat review as an independent step.

    In summary, precise prompt engineering is not a mysterious trick, but a process of engineering creative requirements. By first establishing a universal skeleton, then filling slots by genre, and finally using a three-step closed loop of outline, expansion, and review to control quality, you can stably produce structurally complete, self-consistent, and style-controllable multi-genre novels on general large language models.