Chapter BPrompt pattern libraryPage 1 of 8

Prompt pattern library

Patterns, not magic words

A prompt pattern is a reusable way to specify a job, not a secret phrase that guarantees intelligence.

~13 minHook and intuition

Before you start

Why this matters

Search for prompting advice and you will find dramatic formulas: assign an expert role, promise a reward, demand certainty, or insist that the model think harder. Some phrases may change an answer, but the durable skill is matching a clear interaction pattern to the work.

A pattern describes relationships among input, instructions, and output. “Extract named fields from a document and use null when absent” is a pattern. It can be adapted to invoices, meeting notes, or research papers. The specific field names change; the evidence rule remains.

1Learn the idea

Read

Begin with task families

Most everyday prompts fit a few families:

  • Explain: translate an idea for a particular learner and check understanding.
  • Generate: create options under constraints.
  • Transform: rewrite, summarize, translate, or reformat supplied material.
  • Extract: locate specified facts without adding new ones.
  • Classify: assign an item to defined categories.
  • Compare: evaluate alternatives using named criteria.
  • Plan: propose ordered steps, dependencies, and checkpoints.
  • Critique: test a draft against a rubric and identify gaps.

The family matters because it determines evidence and evaluation. A brainstorming prompt may invite novelty; extraction should minimize invention. A critique needs criteria; a plan needs assumptions and dependencies.

Read

Identify the contract

Every useful pattern answers four questions:

  1. What input is authoritative?
  2. What operation should happen?
  3. What output shape is useful?
  4. How will success and uncertainty be handled?

For example: “Using only the notes, extract decisions into a table with decision, owner, and date. Use TBD when a field is absent. Do not convert proposals into decisions.” That contract is clearer than “summarize professionally.”

Read

Avoid decorative roles

Roles can establish audience, perspective, or domain vocabulary: “Act as a patient algebra tutor for a learner who knows fractions.” But “act as the world’s greatest genius” adds little evidence. A role does not grant credentials, current knowledge, access, or accountability.

Use a role only when it changes observable behavior. Define that behavior: ask one question at a time, explain terms, cite supplied policy sections, or return a review checklist.

Teach

Select the lightest pattern

Do not build a giant prompt for a simple rewrite. Begin with task, context, and acceptance criteria. Add examples when the pattern is difficult to describe, decomposition when steps genuinely depend on one another, and structured output when another process needs reliable fields.

Complexity has costs. More instructions can conflict, hide the priority, and make maintenance difficult. The lightest prompt that performs reliably is usually easiest to review.

Read

Treat prompts as interfaces

A reusable prompt resembles a form or operating procedure. It has expected inputs, rules, outputs, and failure behavior. Name placeholders clearly. Specify what happens with missing or contradictory information. Keep policy facts separate from stylistic examples so each can be updated.

Version important templates and test them with representative cases. A pattern that succeeds once may fail on long, incomplete, multilingual, or sensitive input.

Read

Keep humans and tools in the workflow

Prompting is only one part of getting work done. Current facts may require search and source review. Exact calculations may require a spreadsheet or code. Consequential decisions require accountable human judgment. Structured data needs schema validation. Pattern selection includes knowing when chat alone is the wrong instrument.

Checking tutor…

Continue learning · glossary & guides