Prompt Patterns — The Operator's Toolkit
Ad-hoc prompting is guesswork. Operators who build reliable AI systems run on patterns — reusable structural approaches that solve entire categories of problems. Eight patterns cover 90% of production prompting scenarios.
Every operator who builds reliable AI systems eventually stops writing prompts from scratch.
Not because prompting is easy — because the same structural problems recur. You need consistent output format. You need the model to reason before acting. You need a quality gate before you accept the output. You need to extract structured data from unstructured text. These are not one-off problems. They are categories of problems, and each category has a pattern that solves it.
Patterns are not magic — they are reusable structural approaches that work across tasks within their category. Master eight patterns and you have leverage over 90% of what you will encounter in production.
The Eight Patterns
Pattern 1: Persona
The Persona pattern assigns a role with specific expertise, communication style, and point of view before any task begins. It is the base layer on which every other pattern builds.
Structure: "You are a [role] with [specific expertise]. You communicate in [style]. Your perspective on [domain] is shaped by [background]."
Persona is not optional in production — it is the foundation. Without it, every response draws from generic training defaults. With it, you get consistent voice and expertise calibration across thousands of interactions.
When to use: Always. Persona should be the first component of every system prompt.
Pattern 2: Template
The Template pattern provides a structural skeleton with labeled slots. The model fills in the content; you control the shape.
Structure: "Complete the following template for each item: Problem: [description] Root cause: [analysis] Recommended fix: [specific action] Priority: [High/Medium/Low]"
Templates are essential when you need the same output structure across many different inputs — product descriptions, incident reports, performance reviews, research summaries. Define the template once, run it thousands of times.
When to use: Any task with repetitive output structure requirements.
Pattern 3: ReAct
ReAct (Reason + Act) alternates between reasoning steps and tool-use actions. The model thinks about what it needs, calls a tool to get it, observes the result, reasons about the next step, and repeats.
Structure: "Use the following format: Thought: [your reasoning] Action: [tool to use and input] Observation: [result of action] ... Final Answer: [answer after sufficient observations]"
ReAct is the foundation of most agentic applications — Claude Code's agent loop is a form of ReAct in practice. It enables complex multi-step tasks that require external information.
When to use: Any task requiring tool calls, API queries, file access, or external lookups.
Pattern 4: Critic
The Critic pattern asks the model to evaluate its own output against explicit criteria before delivering a final answer. It is a built-in quality gate.
Structure: "Complete [task]. Then critique your output against the following criteria: [list criteria]. Identify any weaknesses. Then produce a revised version that addresses the weaknesses you identified."
The model as critic catches different failure modes than the model as producer. Running both in sequence on the same output substantially reduces the rate of obvious errors.
When to use: Any high-stakes output where quality matters more than speed.
Pattern 5: Refine
The Refine pattern is an iterative improvement loop. Draft → Critique → Revise → Evaluate → (repeat if necessary).
Structure: "Draft [output]. Evaluate it against [success criteria]. If it meets the criteria, deliver it. If not, revise and re-evaluate. Continue until the output meets the criteria."
The critical requirement: define the success criteria before the loop starts. A refinement loop with no explicit end condition runs until the model arbitrarily decides it is done — which produces either bloat or premature completion.
When to use: Creative tasks, persuasive writing, complex analysis where the first draft is reliably inadequate.
Pattern 6: Scaffold
The Scaffold pattern provides the structural outline and lets the model fill in the content. You control the skeleton; the model supplies the substance.
Structure: "Write [output type] using this structure: [explicit outline with section headers and expected content for each section]."
Scaffold is powerful for long-form content because it prevents the model from choosing a structure you did not want. It also breaks large tasks into bounded sections, which reduces drift and improves coherence.
When to use: Long-form content, technical documentation, structured reports.
Pattern 7: Extraction
The Extraction pattern pulls specific structured data from unstructured text and returns it in a defined format. The emphasis is precision over interpretation.
Structure: "From the following text, extract these specific fields: [list of fields]. Return only a JSON object with these fields as keys. If a field is not present in the text, set its value to null. Do not infer values not explicitly stated."
The "do not infer" constraint is essential. Without it, the model will fill missing fields with plausible-sounding fabrications rather than null.
When to use: Document parsing, data pipeline inputs, form extraction, entity recognition.
Pattern 8: Comparison
The Comparison pattern evaluates two or more options against explicit criteria with defined scoring. It prevents the model from delivering vague "it depends" answers to evaluation questions.
Structure: "Compare [option A] and [option B] on the following criteria: [list each criterion with weight]. Score each option from 1–5 on each criterion. Show the reasoning for each score. Provide a final recommendation based on the weighted total."
Explicit criteria and scoring prevent the model from picking a winner based on whichever option it has more training bias toward. You define the rubric; the model applies it.
When to use: Decision support, vendor evaluation, architecture selection, trade-off analysis.
Pattern Composition
Individual patterns cover their category. Composing two or three patterns covers complex scenarios.
Persona + Template — Consistent branded output at scale. The persona sets voice; the template sets structure. Every output sounds like the same author and looks like the same format.
Persona + Critic + Refine — Self-improving quality loop. The persona sets expertise, the critic gates quality, the refine loop iterates until the criteria are met. Expensive but reliable.
ReAct + Scaffold — Agentic document generation. The model reasons and acts to gather information, then fills it into a predefined structure.
Extraction + Critic — High-precision parsing. Extract first, then critique the extraction for completeness and accuracy before accepting the result.
Lesson 52 Drill
Audit your last five AI tasks. For each one:
- Which pattern does the task map to?
- Did you use that pattern explicitly, or did you prompt ad-hoc and hope for the right structure?
- Rewrite one of the five tasks as an explicit pattern-based prompt.
Save the rewritten version as a named template in a file or note. That is the beginning of your prompt library.
Bottom Line
Eight patterns cover the landscape of production prompting. Persona is the base layer. Template enforces structure. ReAct enables action. Critic gates quality. Refine loops until it meets criteria. Scaffold controls long-form shape. Extraction parses precisely. Comparison forces structured evaluation.
Learn to recognize which category your task belongs to, select the pattern, compose where needed, and execute. The next lesson covers what to do when the pattern does not work — diagnosing and systematically fixing prompt failures.