LLM Prompt Templates for Fiction Writing: A Structured Guide
This guide explains how to use structured prompts to write fiction with large language models. It introduces a five-dimension template covering setting, theme, character, plot, and style, then shows how to adapt it for genres such as science fiction, mystery, romance, historical fiction, and fantasy. It also covers slot-filling rules, an iterative generate-diagnose-rewrite workflow, a quality checklist, and common prompting mistakes to avoid.
1. Why Fiction Writing Needs Structured Prompts
When using a large language model (LLM) to assist with fiction writing, the first obstacle is often not model capability but vague instructions. A prompt like “write me a sci-fi story” usually produces generic text that is safe but lacks tension. The reason is that the model’s output distribution depends heavily on the conditioning constraints in the input: the fewer constraints you provide, the more the output drifts toward the “average state” of the training corpus.
The core goal of prompt engineering for fiction is therefore to make the writer’s implicit assumptions explicit and structured. This can be abstracted as a five-dimension vector:
Prompt = Setting + Theme + Character + Plot + Style
These five dimensions are not just stacked keywords. Each constrains a different part of the story: world rules, core values, the acting subject, the conflict chain, and the texture of the language. If any dimension is missing, the model fills the gap with a default value, and the result is predictably mediocre.
2. A General Five-Dimension Template and Slot Rules
Here is a reusable base template (square brackets mark slots to replace):
Set in [setting], write a [genre] story centered on [core theme].The protagonist is [character], and the central conflict involves [plot].Use [point of view] as the narrative perspective, follow a style of [style description], and aim for about [word count].
Follow three rules when filling the slots. First, be specific rather than abstract: “post-apocalyptic wasteland” is better than “the future.” Second, combine traits rather than listing a single point: a character description works best when it includes identity, a flaw, and a desire. Third, describe style in terms of perceptible textual features, such as “cold, restrained short sentences with extensive environmental description,” rather than naming a single work.
3. Science Fiction Template and Element Breakdown
The key constraint in science fiction is a single, self-consistent change to the setting. A template can be written as:
Build a world based on [technology premise], set in [era and space],and follow [character] making choices within [core conflict].The plot must include a [three-act event chain],with a style leaning toward [hard sci-fi / cyberpunk / space opera].
Optional elements include technology premises (AI awakening, genetic modification, time travel, mind uploading); spatial settings (interstellar colonies, cyber cities, parallel universes); characters (a rebellious AI, a down-and-out bounty hunter, a genius engineer); and event chains (rebellion breaks out, alliance forms, a costly choice). Make sure the technology premise is tightly bound to the theme. For example, pairing “mind uploading” with “identity” gives the conflict philosophical depth.
4. Genre-Specific Constraints for Mystery, Romance, Historical Fiction, and More
Different genres have completely different “constraint centers,” so the template must be adjusted accordingly:
- Mystery: the center is the information gap. The template should explicitly require clues to be planted fairly, each chapter to end on a hook, and the culprit to be drawn from the character list, and it should specify the allowed extent of narrative tricks.
- Romance: the center is the pacing of emotional development. Constrain the stages to meeting, misunderstanding, growing closer, cost, and confirmation, and prohibit piling up unmotivated misunderstandings.
- Historical fiction: the center is period texture. Require institutions, objects, and forms of address to match the specified era and avoid anachronistic modern vocabulary; if necessary, provide a short sample of classical Chinese prose.
- Fantasy / wuxia: the center is the power system and its costs. Require clear tier boundaries and limiting conditions to prevent power inflation later in the story.
5. Iteration and Quality Checks
A single generation rarely meets the bar. Use a generate-diagnose-rewrite loop and check the output against a checklist item by item:
Checklist: character motivations form a closed loop / conflict escalates / settings stay consistent / point of view does not drift / the ending delivers on the theme
In practice, first have the model produce a story outline and character bios, confirm the skeleton, then expand chapter by chapter, and finally polish the prose style in one pass. This layered generation significantly reduces the consistency cost of long-form text.
6. Common Mistakes
The first mistake is stacking too many slots, which dilutes the model’s attention. The second is writing the style description as a work title instead of textual features. The third is requesting tens of thousands of words in one go, sacrificing structural integrity. The sensible approach is to control the granularity of each generation and put the complexity into the structure of the prompt rather than its length.
