Prompt pattern

Also known as: prompt pattern catalog

On this page 7

A prompt pattern is a reusable, named solution to a recurring problem in prompting a language model, documented with its intent, its structure and the consequences of applying it. In the field of artificial intelligence, the idea borrows directly from software design patterns: instead of describing one good prompt, a pattern describes a family of prompts that solve the same kind of problem across tasks, domains and models.

Collections of such descriptions are known as a prompt pattern catalog. Practitioners use them to share proven techniques, to give teams a common vocabulary for prompt design and to make prompt behavior more predictable when models, data or requirements change.

How a prompt pattern is structured

A prompt pattern is structured as a short specification rather than a finished prompt. It names the problem, explains why naive prompts fail at it and lists the fundamental contextual statements that any concrete prompt must contain for the pattern to work. The concrete wording is left to the author, because the same intent can be expressed in many phrasings.

Most catalogs describe each pattern with a fixed set of fields. The table below shows the fields that appear in nearly every well-documented pattern and the question each one answers.

FieldQuestion it answersExample content
NameHow do practitioners refer to itPersona, Flipped interaction
Intent and contextWhich problem does it solveModel answers lack domain perspective
MotivationWhy do ordinary prompts fail hereGeneric answers ignore the audience
StructureWhich statements must the prompt includeAct as X; respond as X would
Example implementationWhat does a concrete prompt look likeA sample instruction and output
ConsequencesWhat are the benefits and side effectsBetter focus, risk of invented detail
Typical fields of a documented prompt pattern

The consequences field is the part most often skipped in informal collections and the part experienced engineers value most. It records known failure modes, interactions with other patterns and the conditions under which the pattern stops helping, which turns a tip into engineering knowledge.

Main families of prompt patterns

Prompt patterns are commonly grouped by the aspect of the interaction they control: what goes into the model, how it should reason, what comes out and how the conversation evolves. Grouping helps authors find candidate patterns quickly and spot combinations that work well together.

FamilyRepresentative patternsPrimary goal
Input semanticsMeta language creation, glossary definitionTeach the model new notation
Output customizationPersona, template, output format instructionShape tone, structure and format
Error identificationFact check list, reflectionExpose claims that need verification
Prompt improvementQuestion refinement, alternative approachesLet the model improve the request
InteractionFlipped interaction, game playChange who drives the dialogue
Context controlContext manager, step-back promptingDecide what the model considers
ReasoningChain of thought, self-consistency, decompositionImprove multi-step accuracy
Common prompt pattern families and representative patterns

Several neighboring entries in prompting, such as role prompting, least-to-most prompting or chain-of-verification, can be read as individual patterns inside these families. The pattern view adds value by describing when each one applies and how it combines with others, rather than treating each technique as an isolated trick.

A prompt pattern differs from neighboring concepts mainly in its level of abstraction. It sits above a concrete prompt and a fill-in template, but below a broad framework that organizes an entire prompt or workflow. Confusing these levels leads to catalogs that mix reusable ideas with one-off prompts.

ConceptLevel of abstractionWhat it gives the author
Prompt patternProblem and solution ideaReusable reasoning about design choices
Prompt templateParameterized textFixed wording with variable slots
Prompt frameworkChecklist for a whole promptSections such as context, objective, style
Prompt libraryStored collection of promptsReady-made prompts for known tasks
Prompting techniqueMethod, often from researchA specific procedure with measured gains
How prompt patterns relate to neighboring concepts

In practice the levels connect: a team selects one or more patterns, implements them as a prompt template and stores that template in a prompt library under version control. The CO-STAR framework, for instance, organizes a whole prompt, while a persona pattern describes only one design decision within it.

Applying and combining prompt patterns

Applying a prompt pattern means mapping its required statements onto the concrete task and then testing the result. Patterns are rarely used alone; production prompts typically combine two to five patterns, such as a persona, a template for the output and a reflection step that asks the model to list its assumptions.

The decision table below connects frequent problems with a suitable starting pattern. It is a starting point for experimentation, not a guarantee of improvement, because effects vary by model family and task.

Problem observedStarting patternReason
Output breaks a parserTemplate or output format instructionFixes field order and syntax
Answers are too genericPersona or audience personaAdds perspective and register
User cannot specify needsFlipped interactionModel asks clarifying questions first
Multi-step errorsChain of thought or decompositionExposes intermediate steps
Unverified factual claimsFact check listLists claims for human review
Vague original requestQuestion refinementModel proposes a sharper question
Choosing a starting pattern for a recurring problem
  • Combine patterns in a deliberate order: context first, then role, task, constraints and output format.
  • Check for conflicting instructions, for example a terse template combined with a request for detailed reasoning.
  • Evaluate each change on a fixed test set instead of judging by a single impressive answer.
  • Record the pattern names in prompt comments so reviewers understand why the wording exists.

Limitations and common mistakes

The main limitation of prompt patterns is that their effects are model-dependent. A pattern that improves accuracy on one model can be neutral or harmful on another, and newer models often perform reasoning internally, which reduces the benefit of explicit reasoning patterns. Catalogs rarely include quantitative evidence, so their claims should be treated as hypotheses to verify.

A second issue is prompt sensitivity: small wording changes inside a pattern can shift results noticeably. Treating a pattern as a magic phrase, rather than as a design idea that still needs evaluation, is the most common error among new practitioners.

MistakeConsequenceBetter practice
Stacking too many patternsLong, contradictory promptsKeep only patterns with measured value
Copying wording verbatimPoor fit to the taskAdapt the required statements
Skipping evaluationHidden regressionsUse a regression test set
Ignoring model updatesPrompt drift over timeRetest after each model change
Trusting persona expertiseConfident but invented detailPair with verification patterns
Typical mistakes when using prompt patterns

The short version

A prompt pattern is a proven recipe idea for asking an AI model something. It does not give you the exact words. It tells you which ingredients your request needs to solve a certain kind of problem, such as getting a neat table or getting the model to ask you questions first.

Think of it like the advice an experienced cook passes on: always rest the meat, always taste before serving. You still choose the dish. The pattern gives you the reliable move, and you adapt it to your own situation and then check whether it actually worked.

Where it makes a difference

A support team at a mid-sized software company uses a language model to draft replies to customer tickets. The first version, a single long instruction, produced friendly but inconsistent answers, and about one in five drafts missed the required ticket summary block that the help desk system parses automatically.

The team rebuilt the prompt from three documented patterns: a persona describing a senior support engineer, a template defining the exact reply structure with a summary block, and a fact check list asking the model to list every product claim it made. They tested the new version on 200 archived tickets before rollout.

Parsing failures dropped to almost zero, and reviewers could check the listed claims in seconds instead of reading every draft line by line. Because the pattern names were recorded in the prompt file, a new engineer later understood why each section existed and could swap the model without rewriting the design.