Prompt chaining means passing the output of one prompt as the input to the next. Done well, it lets you handle complex tasks that no single prompt could do reliably. Done poorly, it creates a pipeline where errors compound at each step and you spend more time managing the chain than you would have spent doing the work manually.
When to Chain vs When to Use a Single Prompt
A chain is justified when a task has stages that genuinely require different thinking. Research and writing, for example: first you need information gathered and evaluated; then you need that information synthesised into prose. Doing both in one prompt usually produces worse output at both stages.
A chain is overkill when a single well-specified prompt would do the job. Most tasks — even complex-seeming ones — can be handled in one or two prompts with good context. Don't build infrastructure when a better brief would suffice.
Three Chain Patterns
Pattern 1: Sequential Chain
Output of step N becomes input to step N+1. Best for tasks with natural stages where each stage depends on the previous one.
Example — Research brief:
- Step 1: Given this topic, list the five most important questions a non-expert would need answered to understand it.
- Step 2: Answer each of these questions briefly, noting where you are uncertain.
- Step 3: Using the above answers, write a 400-word executive summary for a non-technical audience.
Each step has a clear purpose. No step tries to do everything at once.
Pattern 2: Parallel Chain
Same input goes to multiple prompts simultaneously, and outputs are combined. Best for tasks where you want different perspectives or analyses of the same material.
Example — Proposal review:
- Prompt A: Review this proposal from the perspective of a sceptical CFO. What financial questions would they raise?
- Prompt B: Review this proposal from the perspective of the operations team who will implement it. What concerns would they have?
- Prompt C (after): Given these two sets of objections, rewrite the proposal's risk section to address them.
Pattern 3: Iterative Refinement Chain
Output goes back into the model for progressive improvement against specific criteria. Best for outputs with clear quality standards that can be checked systematically.
Example — Policy document:
- Round 1: Draft the document.
- Round 2: Review the above for: clarity (is every term defined?), completeness (are all edge cases covered?), and tone (is it accessible to a non-specialist?). Output a revised version.
- Round 3: Final check — does the document contradict itself anywhere? Does the opening reflect the full content?
Three rounds is usually the limit. After that, diminishing returns kick in sharply.
Managing Chain Errors
The main risk in chaining is error propagation: a wrong fact in step 1 gets incorporated into steps 2, 3, and 4 as though it were true. Mitigate this with:
- Verification breaks: After any step that involves factual claims, verify before continuing.
- Explicit uncertainty flagging: Ask the model to flag when it's uncertain in any step.
- Short chains: Three steps is usually enough. Five is almost always too many.
The Simplicity Rule
Before building a chain, try to solve the problem with one well-crafted prompt. If that doesn't work, add one step and try again. Add the minimum complexity that solves the problem. A two-step chain that works is better than a five-step chain that's impressive but fragile. Chains should be built from proven steps, not designed from scratch in one sitting.