Patterns
Patterns are reusable techniques for getting better results from AI. They’re not tools themselves, but ways of structuring prompts, workflows, and interactions.
When to Reach for a Pattern
Section titled “When to Reach for a Pattern”- The task is ambiguous or open-ended
- A single prompt isn’t reliable enough
- You need confidence beyond “it returned something”
- You’re building a skill or workflow others will reuse
- You correct the same kind of output repeatedly (Correction Diagnosis)
If You See X, Read Y
Section titled “If You See X, Read Y”| Symptom | Read |
|---|---|
| Fixing output takes longer than writing it | Delegation Fit |
| Same correction, again and again | Correction Diagnosis |
| Wrong format or style | Few-Shot Examples, Structured Output |
| Plausible code that does not run | Verification Loops |
| Diffs too large to review | Reviewable Output |
| Solved the wrong problem | Problem Before Prescription, the Delegation Fit brief; long runs: Spec, Then Build |
| Long run drifts or loses the thread | Context Handoff, Progress Breadcrumbs |
| Agent took an irreversible action unasked | Checkpoint Gates |
| Shallow answers on hard steps | Chain of Thought, Step-Level Routing |
| Confident answers about your own data that are wrong | RAG |
| A prompt change broke something that worked | Prompt Regression Testing |
More symptoms, each linked to its fix: Anti-patterns
Prompting Patterns
Section titled “Prompting Patterns”How to structure what you ask.
- Chain of Thought: Get reasoning before conclusions
- Few-Shot Examples: Guide format with examples
- Structured Output: Constrain output to a schema
Verification Patterns
Section titled “Verification Patterns”How to gain confidence in output.
- Adversarial Review: Challenge output with an external skeptic
- Multi-Model Consensus: Compare independent attempts
- Reviewable Output: Shape output so review is against intent, not from scratch
- Self-Critique: Have the model evaluate its own output
- Verification Loops: Generate, verify, iterate
Planning Patterns
Section titled “Planning Patterns”How to set up and carry agent work
- Checkpoint Gates: Block irreversible actions until a human clears a one-step decision
- Context Handoff: Carry a run across compactions and sessions with a written handoff
- Delegation Fit: Decide per task whether to delegate, pair, or write by hand
- Progress Breadcrumbs: Record progress on a shared work board, not in the chat
- Spec, Then Build: Agree a written spec and reviewed plan before execution
- Unattended Runs: Launch an agent for hours with a stop condition and abort criteria
Orchestration Patterns
Section titled “Orchestration Patterns”How to structure complex work.
- Iterative Refinement: Improve output through successive passes
- Mechanical Scaffolding: Build repeatable structure once, fill with context each time
- Pipeline Orchestration: Chain sequential stages
- RAG: Ground responses in retrieved context
- Step-Level Routing: Route each step to a model tier and reasoning effort
- Subagent Fanout: Fan work out to parallel agents
- Task Routing: Match each task to the right model for cost and capability
Evolution Patterns
Section titled “Evolution Patterns”How systems improve through use.
- Correction Diagnosis: Trace each correction to the input that caused it
- Discovery Propagation: Feed improvements back to the system
- Dogfooding: Validate by using your own output
- Prompt Regression Testing: Detect when prompt changes break existing behavior
