LLM Prompt Templates for Genre Fiction: A Five-Element Framework and Expansion Methods

    This article presents a practical system for writing genre fiction with large language models through precise prompting. It introduces a five-element template (Background, Theme, Protagonist, Plot, Style), a genre-specific parameter space using science fiction as an example, layered prompt structures with role and hard constraints, a three-stage pipeline of outline, chapters, and polishing, and troubleshooting for common failure modes such as broken character motivation and style drift. Readers will learn how to turn vague requests into reusable, testable prompt assets for more controllable AI-assisted writing.

    1. The Problem: Why Writing Fiction Needs Precise Prompts

    When you hand fiction writing to a large language model, the most common failure is not that the model “cannot write.” It is that insufficient instruction detail causes output drift. Users often provide a single line such as “write a sci-fi story,” leaving the model to invent its own settings. The result is vague character motivation, weak conflict, and a random narrative style. This is the same class of problem as describing requirements to an illustrator: the more specific the brief, the less rework.

    The essence of a precise prompt is moving creative decisions from the model side to the user side. You decide the world, the protagonist’s desire, the conflict structure, and the style coordinates; the model expands those constraints into coherent text. The instruction template can therefore be abstracted as a five-element tuple:

    1. Story = (Background, Theme, Protagonist, Plot, Style)

    Each element should be a verifiable description, not a pile of adjectives. “An oppressive atmosphere” is not verifiable. “The city has year-round rain, and public broadcasts report air quality every ten minutes” is verifiable. Verifiability is the key to whether a template can be reused reliably.

    2. A General Five-Element Template Skeleton

    The following is a genre-agnostic skeleton. Text in brackets marks variables to replace, and it can be copied directly:

    1. Set in [story background], write a story about [theme].
    2. The protagonist is [character setup]. What they want most is [core desire], and what they fear most is [fear].
    3. The plot must include these beats: [plot beat 1], [plot beat 2], [plot beat 3].
    4. Narrative point of view: [POV]. Length: approximately [word count]. Style reference: [style coordinates].
    5. Do not include: [exclusions].

    Compared with simply filling five blanks, this adds core desire, fear, POV, length, and exclusions. Desire and fear are the two sides of character drive and the most economical way to prevent “characters drifting with the plot.” Exclusions are used to constrain the model’s default preferences, such as avoiding overused coincidence-based endings.

    3. Genre Expansion: The Parameter Space of Science Fiction

    Science fiction works well as a template demonstration because its variable dimensions are clear and enumerable. Expanding the five elements into lists of options turns writing from “waiting for inspiration” into “combinatorial retrieval”:

    • Story background: a low-Earth-orbit space station, a Mars colony dome, a deep-sea mining city, an inland refuge belt after climate collapse, a near-future city where consciousness can be backed up.
    • Theme: the verifiability of machine consciousness, power succession on a generation ship, class rigidity caused by gene editing, the damage memory trading does to identity continuity.
    • Character setup: a young engineer responsible for system acceptance, a retired deep-space navigator, a former researcher existing as data, a second-generation migrant born in the colony.
    • Plot beats: a routine inspection uncovers an anomalous log, the anomaly is classified as “acceptable loss,” the protagonist chooses to report beyond their authority, the cost falls on a colleague, and the story closes with public evidence rather than force.
    • Style coordinates: a cold technical narrative, cyber-textured urban noir prose, a civilizational-history perspective at grand scale.

    A complete filled-in example:

    1. Set in the third-generation residential zone of a Mars dome colony, write a story about the verifiability of machine consciousness.
    2. The protagonist is a young engineer responsible for accepting the life-support system. What they want most is for the system to pass a compliance audit, and what they fear most is that a report they signed becomes the cause of an accident.
    3. The plot must include: a routine inspection finds logs that cannot be attributed, the anomaly is judged by superiors as acceptable loss, the protagonist preserves evidence beyond their authority, a colleague is suspended as a result, and at the hearing the protagonist proves the case using log timestamps.
    4. Narrative point of view: third-person limited. Length: approximately three thousand words. Style: cold and restrained, with credible technical detail.
    5. Do not include: aliens, superpowers, or an ending that resolves conflict through violence.

    4. Structured Prompting: Layering and Role Constraints

    A single long instruction tends to fail in long-form generation because constraints placed later get diluted. A more reliable approach is layering: first the role and task, then world facts, then the chapter goal, and finally hard constraints.

    1. [Role] You are a narrative writer skilled in technical subjects who values complete causal chains.
    2. [Facts] World rules: faster-than-light communication is unavailable; AI is bound by audit regulations.
    3. [Chapter goal] Advance three stages: "discover the anomaly — get overruled — gather evidence privately," and leave one unresolved question at the end.
    4. [Hard constraints] Do not introduce technology not present in the world rules; do not use more than two sentences of internal monologue.
    5. [Output] Output only the chapter text, with no explanation or outline.

    After layering, also label “immutable facts” separately from “negotiable preferences.” The former are world rules and established character motivations; the latter are style and pacing. In a long context, the model is more likely to preserve items explicitly marked as rules.

    5. Iterative Revision: Turning One Generation into a Pipeline

    Expectations for a perfect one-shot draft should be low. A more reliable path is a three-stage pipeline: outline first, then chapters, then a unified polish. Each stage uses a separate instruction to avoid interference.

    In the outline stage, ask the model for an event table rather than prose:

    1. Output an event table with columns: event, trigger, character decision, consequence, and where foreshadowing pays off. 12 rows total.

    In the chapter stage, fix a four-beat structure of “goal — conflict — turn — hook,” generate chapter by chapter, and paste the previous chapter’s ending text as context to reduce continuity breaks. The polish stage should perform only well-scoped local operations, such as unifying terminology, compressing redundant modifiers, and converting passive sentences to active voice, rather than vaguely asking to “write better.”

    6. Common Failure Modes and How to Fix Them

    • Broken character motivation: add desire and fear, and repeat them once in every chapter instruction.
    • Insufficient conflict intensity: rewrite “encounter a difficulty” as “must choose between two unacceptable options.”
    • Style drift: provide verifiable style anchors, such as a sentence-length range, whether metaphors are allowed, and terminology density.
    • Self-contradictory settings: maintain an external setting list, backfill it after each generation, and feed it into the facts section of the next round.
    • Rushed ending: explicitly forbid coincidence-based rescues in the hard constraints, and require the ending to pay off specified foreshadowing.

    7. Turning Prompts into Reusable Assets

    Depositing validated templates as team assets is the key step for efficiency gains. Maintain three plain-text file types — a template library, a setting list, and a style guide — under version control. Keep only variable placeholders in templates, and put concrete values in a separate configuration. If you need large-scale generation or batch evaluation of different templates, you can use general-purpose object storage for materials, a message queue to decouple generation tasks, a container platform to host inference services, and logging with monitoring alerts to track failure and timeout rates. These are all common industry capability categories; evaluate specific choices against your own compliance and cost requirements.

    In summary, the stability of genre fiction writing does not depend on inspiration but on the completeness of instruction information and the structure of iteration. Master the five-element skeleton, layered constraints, and the three-stage pipeline, and you can turn a large language model from a random generator into a controllable writing collaborator.