You ask a chatbot to read your notes, pull out the facts, write a reply, and check its own tone, all in one message. The answer comes back fast and reads well. Then you spot a sentence that says the opposite of your notes.
Prompt chaining is a fix worth knowing for that kind of task. You split the job into steps, give each step its own prompt, and feed the output of one step into the next. This guide explains what vendors say about it, when it helps, how to build a chain in six steps, and five copy-paste chains. It ends with a small local test that shows both the benefit and the limits.
What prompt chaining is
Google's prompting guide gives a plain definition. "For complex tasks that involve multiple sequential steps, make each step a prompt and chain the prompts together in a sequence. In this sequential chain of prompts, the output of one prompt in the sequence becomes the input of the next prompt. The output of the last prompt in the sequence is the final output." (Google AI Studio docs)
The same Google section lists two related ideas. One is to break down instructions: "Instead of having many instructions in one prompt, create one prompt per instruction." The other is aggregation: "Aggregation is when you want to perform different parallel tasks on different portions of the data and aggregate the results to produce the final output."
So a chain can be a straight line (step 1, then step 2, then step 3) or a split and merge (summarize each part, then combine the summaries).
When chaining helps, and when it does not
Anthropic's guidance for its current Claude models is careful here. "With adaptive thinking and subagent orchestration, Claude handles most multistep reasoning internally. Explicit prompt chaining (breaking a task into sequential API calls) is still useful when you need to inspect intermediate outputs or enforce a specific pipeline structure." (Claude docs)
That gives two good reasons to chain:
- You want to see the work in the middle. A list of extracted facts, a set of quotes, or an outline is easy to check before anything is written from it.
- You want the same steps every time. A weekly report or a support reply follows a fixed order, and each step can have its own rules.
We suggest skipping the chain for short, one-step jobs such as rewording a sentence or answering a quick question. Each step is a separate request, so a chain sends more text in total and takes more of your time.
Anthropic also names the pattern it sees most. "The most common chaining pattern is self-correction: generate a draft → have Claude review it against criteria → have Claude refine based on the review. Each step is a separate API call so you can log, evaluate, or branch at any point."
How to build a prompt chain in 6 steps

- Write down the end result. One sentence: "A reply email under 120 words that confirms the replacement and the ship date."
- Split the job into steps with one job each. Extract, draft, review is a good default. Long inputs may need a split and merge step first.
- Decide what each step hands on. A bullet list, a table, an outline or a draft. Ask for that format and nothing else, so the next step gets clean input.
- Wrap the handoff in tags. Paste the previous output inside labels such as
<facts>and</facts>. Anthropic says XML tags "help Claude parse complex prompts unambiguously, especially when your prompt mixes instructions, context, examples, and variable inputs." - Check the output between steps. This is the point of chaining. Read the fact list before you let a draft be written from it. Fix it by hand if needed.
- End with a review step that has a checklist. Give the model the rules the final output must meet, plus the original facts, and ask for the corrected version only.
Where you run it depends on the tool. In a chat app, you send each step as its own message and paste the previous output in yourself. Through an API, Anthropic describes each step as "a separate API call." We suggest starting a new chat for the review step when you want the model to judge the draft without the earlier back and forth, and pasting in the facts and the draft it needs.
5 copy-paste prompt chains
Replace the parts in square brackets. The Fact-list chain is a close version of the prompts we ran in the local test below. The other four are untested templates.
Fact-list chain (for replies and summaries)
Step 1, extract:
From the notes below, list every fact the reply must include, as short bullets. Facts only. Do not write the reply yet.
<notes>
[paste notes, call log or message thread]
</notes>Step 2, draft:
Write a reply to [who] using only the facts below. Under [N] words. Tone: [plain and friendly].
<facts>
[paste the checked bullet list from step 1]
</facts>Step 3, review:
Check the draft against the checklist and the facts. Then output only the corrected reply, with no commentary.
Checklist:
- Under [N] words
- Includes [order number, date, name]
- Says [the key promise] exactly as the facts state it
- Does not offer [anything not in the facts]
<facts>
[paste step 1 output]
</facts>
<draft>
[paste step 2 output]
</draft>Self-correction chain (draft, review, refine)
This follows the pattern Anthropic describes. Untested template.
Step 1: Write a [type of text] about [topic] for [audience]. [Length].
Step 2: Review the text below against these criteria: [criteria]. List each problem with the sentence it is in. Do not rewrite yet.
<text>[paste step 1 output]</text>
Step 3: Rewrite the text to fix every problem in the review. Keep everything else the same. Output only the new text.
<text>[paste step 1 output]</text>
<review>[paste step 2 output]</review>Quote-first research chain
Anthropic suggests asking Claude, for long document tasks, "to quote relevant parts of the documents first before carrying out its task." This chain makes the quotes a separate step. Untested template.
Step 1: From the document below, copy the exact sentences that answer this question: [question]. Put each quote on its own line. If nothing answers it, say "No relevant quotes."
<document>[paste document]</document>
Step 2: Using only the quotes below, answer the question in [N] sentences. After each sentence, show which quote it comes from.
<quotes>[paste step 1 output]</quotes>Split and merge chain (long documents)
This is the aggregation idea from Google's guide. Untested template.
Step 1 (run once per part): Summarize this part of a longer document in 5 bullets. Keep names, numbers and dates exactly as written.
<part number="[1]">[paste one section]</part>
Step 2: Combine the part summaries below into one summary of [N] bullets. Remove repeats. Keep every number and date.
<summaries>[paste all step 1 outputs, each in its own tags]</summaries>Our guide to summarizing a PDF with AI covers the upload side of this job.
Repurpose chain (one article into posts)
Untested template.
Step 1: List the 5 main points of the article below as one sentence each. No new claims.
<article>[paste article]</article>
Step 2: Turn each point below into a [platform] post of under [N] characters. Keep the facts as written.
<points>[paste step 1 output]</points>
Step 3: Check each post against the points. Mark any post that adds a claim not in the points, then fix it. Output the final posts only.
<points>[paste step 1 output]</points>
<posts>[paste step 2 output]</posts>What we tested
We ran a small test on a local model, Gemma 3 1B, through llama.cpp on our test machine, at temperature 0, one run per prompt, on November 4, 2026. A small local model is not ChatGPT, Claude, Gemini or Grok, and larger models may behave very differently. Treat this as a demonstration of the method, not a ranking.
The input was a short set of call notes. A customer named Dana Ruiz, order #48213, ordered a blue desk lamp and received a green one. She wants the blue lamp, not a refund. The notes also say blue is in stock and that this is the second wrong item she has received this year. The replacement ships free by Friday, and she can keep the green lamp.
We ran two setups:
- One prompt. A single message asking for a reply email under 120 words that includes the order number, the replacement and when it ships, and that she can keep the item.
- Three-step chain. A close version of the Fact-list chain above: extract facts, draft from the facts, then review against a five-point checklist.
We scored each email on five automatic checks: under 120 words, includes the order number, mentions Friday, says she can keep the item, and does not mention a refund. Then we read each email against the notes.

Results:
- All three emails passed all 5 keyword checks. The one-prompt email was 69 words. The chain draft was 70 words, and the reviewed final was 62 words.
- The one-prompt email had 2 sentences that misstate the notes. It said: "We’ve confirmed you received the blue desk lamp you originally ordered." The notes say she received a green one. It also said: "We’ve shipped a replacement blue lamp to you and it’s expected to ship by Friday."
- The chain's step 1 fact list matched the notes, apart from one loosely worded bullet. It listed nine bullets, including "Order number: 48213", "Replacement will be shipped free by Friday" and "Customer can keep the green lamp". The loose one was "Customer expressed dissatisfaction with previous incorrect items"; the notes say only that she was polite and called this her second wrong item this year. The model also began the list with an intro line ("Here are the facts from the call notes, presented as bullet points:"), and that line went into step 2 with the bullets.
- The chain's final email still had 1 sentence that misstates the notes. It said the order is "now shipped free by Friday". The notes say it will ship by Friday, not that it has shipped. The step 2 draft had the same sentence, and the review step kept it. It did not catch this. The review checklist asked it to confirm the email says the replacement ships free by Friday, and the sentence contains those words, so the 1B model passed it without checking what the sentence means.
Two lessons came out of this. Keyword checks alone missed every factual error, so reading the output still matters. And the chain's real benefit was the inspectable middle step: the fact list was right apart from one loose bullet, and the mistake came in at the drafting step, where it was easy to find.
Common problems and fixes
- The handoff is messy. If step 1 adds an intro line such as "Here are the facts", the next step treats it as input. Ask for "bullets only", or wrap the handoff in tags.
- An error carries forward. A wrong fact in step 1 spreads into every later step. Check the first output before you go on.
- The review step approves a bad draft. Make each checklist item specific, and name the mistake to avoid, such as "does not say the order has already shipped". We did not test that wording. In our test the checklist already said the replacement ships free by Friday, and a 1B model still passed "now shipped free by Friday", so read the final output yourself.
- The chain is longer than the task. If one clear prompt gets the result, use one prompt. Our guide to writing a system prompt helps when the same rules repeat every time.
- The output format drifts. Add one filled-in example to the step that keeps drifting. Our few-shot prompting guide shows how.
Prompt chaining vs chain-of-thought
These sound alike but are different. Chain-of-thought asks a model to reason step by step inside one answer. Prompt chaining splits the work across several prompts, and you can see and change each output. Our explainer on chain-of-thought prompting covers the first one.
Bottom line
Use a chain when you need to check the work in the middle or want the same steps every time. Give each step one job and one output format, pass outputs in tags, read the middle outputs, and end with a review step that has specific rules. In our small test, the chain kept the facts right at step 1, and the review step let one error through at the end.
Sources
- Google AI Studio: Prompt design strategies
- Anthropic: Prompting best practices (Chain complex prompts, XML tags, long context)
- llms.blog test: Gemma 3 1B on llama.cpp, temperature 0, one run per prompt, November 4, 2026
