Designing Genre-Specific Prompt Templates for LLM Fiction Writing
This article explains how to design structured, genre-specific instruction templates for generating fiction with large language models. It covers why precise prompts matter, a six-layer template structure spanning role, worldbuilding, theme, characters, plot, and style, and a fill-in example for science fiction. It also outlines field priorities for mystery, historical, romance, and fantasy genres, plus a four-point quality check and an iterative correction workflow.
1. Why Precise Instructions Are the Core Variable in Novel Generation
Bringing a large language model into fiction writing is essentially an exercise in requirements engineering. The model does not lack generative capability; what it lacks is verifiable constraints that you can define. Much like telling a painter to “paint a nice picture,” vague input only yields average output marked by style drift, flat characters, and broken plots. The value of precise instructions lies in breaking creative intent into fields the model can execute, making every generation reproducible, comparable, and iterable.
A usable writing instruction typically contains six categories of information: narrative perspective and style, worldbuilding, thematic motifs, character profiles, plot skeleton, and style references. The more explicit the fields, the more controllable the model’s freedom. When fields conflict with one another—for example, requesting hardboiled narration while specifying an omniscient perspective—output quality drops noticeably. The focus of template design, therefore, is not piling on adjectives but establishing consistency among fields.
2. The Six-Layer Structure of an Instruction Template
Organize the prompt in the following order, moving from macro constraints down to micro-level prose:
- Role and task layer: Define the model as a “novelist/editor” and state the deliverable format (chapter, outline, or excerpt).
- World layer: Specify the era, space, and technological or social rules, especially the “physical or institutional settings that cannot be violated.”
- Theme layer: Provide the motif and the conflict to explore, avoiding an idle theme.
- Character layer: Give the protagonist a desire, a flaw, a secret, and a cost—the key to keeping a long work from collapsing.
- Plot layer: Use a structure such as setup-development-turn-resolution or the three-act structure to lay out the event sequence and turning points.
- Style layer: Replace specific work titles with describable prose traits, such as “a cold, restrained third person, mostly short sentences, minimal direct interior monologue.”
Sample template (replace the bracketed content directly):
You are a novelist skilled in [genre]. Set the story on the stage of[story background] and write a [length] story around [theme].Protagonist: [name/role], whose core desire is [desire], whose fatalflaw is [flaw], and whose hidden secret is [secret].The plot must include: [triggering event] -> [escalating conflict] ->[darkest moment] -> [choice and cost].Narrative perspective: [first person/limited perspective],language style: [sentence and rhythm traits],do not include: [tropes or expressions to avoid].First output a 300-word story outline; write chapter one after I confirm.
3. A Fill-in Example Using Science Fiction
Science fiction places the highest demands on setting consistency, making it a good testing ground for template capability. Example: set against the background of “resource depletion in an orbital city,” with the theme of “technological dependence and human agency.” The protagonist is a young maintenance engineer responsible for the life-support system; the flaw is over-trusting automated workflows; the secret is having privately retained manual access to the system. The plot includes a cascading failure triggered by an algorithmic misjudgment, limited collaboration between humans and the intelligent system, and the professional cost the protagonist pays to restore manual control. The style is described as “hard-edged, dense with technical detail, terse dialogue.”
When replacing keywords, change only one or two fields at a time for controlled comparison, observe the differences in output, and gradually settle on a stable combination of parameters that works for you.
4. How Field Priorities Differ Across Genres
- Mystery and detective fiction: Strengthen the “clue list” and “narrator reliability” fields, requiring the model to lay out the evidence chain before writing the main text.
- Historical fiction: Add constraints on “period taboos and object details” to prevent anachronistic modern vocabulary.
- Romance and family drama: Make the “relationship change curve” the primary field, specifying the shift in the relationship after each interaction.
- Fantasy: Prioritize defining “the cost rules of abilities” to prevent power inflation from draining tension.
5. Quality Checks and Iteration
After generation, run four checks: whether the setting is self-contradictory, whether character motivation is continuous, whether plot turns are properly foreshadowed, and whether the writing style is consistent. When the output falls short, do not rewrite the entire prompt; instead, append a corrective instruction, such as “keep the setting unchanged, rewrite the third paragraph, and fill in the protagonist’s motivation.” Cache the outline, character cards, and style description as reusable snippets, and manage them with version records. This turns scattered inspiration into a stable writing pipeline.
