Prompt chaining is splitting 1 AI task into a sequence of prompts, where the output of each prompt becomes the input of the next. Instead of 1 long prompt that reads, decides, writes and checks at once, each step does 1 of those jobs. You can read what each step gave back, and fix the step that broke instead of the whole prompt.
This guide is for the person whose 600-word prompt gives a great answer on Monday and a strange one on Tuesday. It shows how to tell when a prompt should be split, how to split it, and 3 chains for marketing and ops written out step by step, with what goes into each step and what comes out.
How prompt chaining works
A prompt chain runs a fixed list of steps in order. Anthropic, the company behind Claude, describes it as a task decomposed "into a sequence of steps, where each LLM call processes the output of the previous one", with an optional check between steps to see that the work is still on track (Anthropic, Building effective agents). Google's Gemini guide gives the same rule in plain words: make each step a prompt, and the output of the last prompt is the final output (Google AI Studio, prompt design strategies).
A chain has 3 parts:
- Steps. Each one is a short prompt with 1 job: pull out the facts, pick the best 3, write the post.
- Hand-offs. What a step returns is what the next step reads, so it needs a shape the next step can use: a list, a table, 5 fields.
- Checks. Between 2 steps, a rule or a person looks at the output. Anthropic calls this a "gate": if the facts are missing, the chain stops before anything gets written.
The trade is time for quality. Anthropic says a chain trades "latency for higher accuracy, by making each LLM call an easier task". 4 steps take longer than 1 prompt, and each one is easier to get right. In a 20-person user study, chaining improved the quality of the results, and the people using it found the model more transparent and easier to control (Wu et al., 2021).
When to split a long prompt into a chain
Split a prompt when it does jobs that need different things, or when you can't see which part went wrong. 4 signs it is time:
- It does 2 kinds of work. Pulling facts out of a transcript and writing a friendly email are different jobs. In 1 prompt, nothing separates what the transcript said from what the model added while writing.
- You can't tell where it failed. The email is wrong, and you don't know if the model misread the call or wrote badly. A chain shows you the facts it pulled before it writes.
- Fixing 1 thing breaks another. You add a line about tone and the order number disappears. Our post on prompt versioning for teams tells that exact story.
- It asks the model to check its own work in the same answer. A 2024 study compared a 3-prompt chain (draft, critique, refine) with 1 prompt that does all 3. The chain wrote better summaries, and the authors suspect the single prompt only produced "a simulated refinement process" (Sun et al., Findings of ACL 2024).
And when not to split: a short prompt with 1 job. Anthropic's current advice for Claude says that today's models handle most multistep reasoning on their own, and that a chain is still useful "when you need to inspect intermediate outputs or enforce a specific pipeline structure" (Claude prompting best practices). If you never need to see the middle, 1 prompt is fine.
How to split 1 long prompt into steps
Start from the prompt you already have, and split it in 5 moves:
- List the verbs. Read your prompt and write down every job it asks for: extract, classify, pick, write, shorten, check. A 600-word prompt usually has 4 to 6.
- Group them by what they need. Jobs that read the same input and give back the same kind of thing can stay together. A job that needs the source text and a job that needs only the facts go in different steps.
- Give every hand-off a shape. Tell each step exactly what to return: "a table with 5 columns", "3 lines, each starting with a name". A loose answer in the middle makes every later step loose.
- Put a check where a mistake is expensive. Before anything goes to a customer or gets published, add a rule ("stop if there is no order number") or a person who reads 1 screen.
- Test each step alone. Save 5 real inputs and run them through the step before and after every edit. Our guide to telling whether a prompt change helped shows the method.
The 3 chains below were written for this article as examples. Each step's prompt is short on purpose.
Example 1: a webinar turned into a week of LinkedIn posts
The job: a 45-minute recording goes in, 3 LinkedIn posts that sound like your team come out. In 1 prompt, the model has to find, choose and write at once, and you can't see which clips it chose or why.
-
Find the moments. Input: the YouTube link. Output: 5 short clips, each with a title, a hook and its timecodes. The free Clipper From YouTube tool does exactly this step: a link goes in, 5 ready-to-cut scripts come out.
-
Pick 3. Input: the 5 clips and 1 line about your reader.
From these 5 clips, pick the 3 a [reader: ops lead at a 30-person startup] would forward to a colleague. For each, say in 1 sentence what the reader learns. Return a numbered list.
-
Write 1 post per clip. Input: 1 picked clip at a time.
Write a LinkedIn post of 120-180 words from this clip. Open with the speaker's strongest line, quoted as said. End with 1 question for the reader. No hashtags.
-
Clean the text. Input: each post. The free AI Slop Remover rewrites the phrases readers recognize as AI.
The check sits after step 2: a person reads 3 lines and swaps a clip before 3 posts get written about the wrong ones.
Example 2: a customer email turned into a support ticket and a reply
The job: an angry, rambling email goes in, a ticket with the right fields and a draft reply come out. In 1 prompt, nothing stops the reply from promising a refund the policy doesn't give.
-
Extract. Input: the email.
Return a table with these fields: customer name, order number, product, what they ask for. Write "missing" when the email doesn't say.
-
Check. A rule, not a prompt: if the order number is "missing", stop and send the customer a 1-line request for it.
-
Classify. Input: the table only.
Which of these is it: refund, bug, delivery, question? Answer with 1 word.
-
Draft the reply. Input: the table, the 1 word and the policy text for that type.
Write a reply of under 100 words. Use the customer's name and order number. Promise only what this policy allows.
The ticket gets the table from step 1, so the fields never depend on how well the reply was written.
Example 3: a sales call turned into a follow-up email and CRM notes
The job: a call transcript goes in, an email to the prospect and 5 lines for the CRM come out. In 1 prompt, you can't check what the model took from the call before it writes.
-
Pull out what was agreed. Input: the transcript.
List every decision, objection and next step from this call. For each next step, write who does it and by when, as they said it. Quote; don't summarize.
-
Write the email. Input: the list only, not the transcript.
Write a follow-up email from [name] to [prospect]. Thank them in 1 line, repeat the next steps with their dates, answer each objection in 1 sentence.
-
Write the CRM note. Input: the same list.
Write 5 lines: stage, deal size if mentioned, objections, next step, date of next contact.
Steps 2 and 3 both read the list from step 1, so the email and the CRM never disagree. A person reads the list before the email goes out, which takes a minute instead of re-reading a 40-minute transcript.
Prompt chaining vs chain-of-thought prompting
Prompt chaining uses several prompts; chain-of-thought prompting uses 1. Chain-of-thought asks the model to write out its reasoning steps before the answer, inside the same reply, and the 2022 paper that named it showed it improves arithmetic, commonsense and symbolic reasoning tasks (Wei et al., 2022). In a prompt chain, every step is a separate call with an output you can read, check and change before the next step runs.
| Prompt chaining | Chain-of-thought | |
|---|---|---|
| Prompts | 2 or more, in order | 1 |
| You see the middle | Yes, every step's output | Only as text inside 1 answer |
| You can fix 1 step | Yes | No, you edit the whole prompt |
| Best for | Jobs with distinct stages: extract, write, check | 1 hard question: a calculation, a decision |
The 2 work together: a step in a chain can ask for its reasoning too.
How to run a prompt chain without code
You can run a chain in 3 ways, and the right one depends on how often it runs and who runs it:
- In a chat, by hand. Paste step 1, copy its answer into step 2, and so on. It costs nothing and works for a chain you run once a month. The steps live in your head, so nobody else on the team runs it the same way.
- As saved tools that call each other. Each step becomes a tool with 1 input, and the chain runs from 1 place. Fireprompts, an AI tool builder for non-technical teams, works this way: a tool calls another tool with an @ mention, and a multi-step workflow can run on a schedule or from a webhook (Fireprompts changelog). Our post on turning a prompt into a tool shows the first step.
- In code. Developers write each step as an API call and pass the outputs along, which is how Anthropic's own guide describes it. It gives the most control and needs someone who writes code to keep it running.
Questions about prompt chaining
Is prompt chaining the same as an AI agent?
Prompt chaining is not an agent. Anthropic separates the 2: a workflow like a chain follows "predefined code paths", while an agent decides its own next steps and which tools to use (Anthropic, Building effective agents). A chain does the same steps every time, which makes it easier to test.
Does prompt chaining cost more than 1 prompt?
A prompt chain makes several model calls, so it takes longer and can use more tokens than 1 prompt. Each step is shorter, though, and a step that reads only a list instead of the whole transcript reads much less text. When a step fails, you rerun that step instead of the whole chain.
How many steps should a prompt chain have?
A prompt chain needs as many steps as the job has kinds of work, which for most marketing and ops jobs is 2 to 5. Every step adds a hand-off to keep in shape, so merge 2 steps that always pass or fail together.
Build your first chain as tools
Pick the long prompt your team runs most, list its verbs, and make the first step a tool. On Fireprompts you describe it in plain English, and it takes about 3 minutes and no code. Create a tool, or start from 1 of the 12 free tools with no sign-up.
Sources
- Building effective agents, Anthropic, December 2024
- Claude prompting best practices: chain complex prompts, Anthropic
- Prompt design strategies: break down prompts into components, Google
- Prompt Chaining or Stepwise Prompt? Refinement in Text Summarization, Sun et al., Findings of ACL 2024
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models, Wei et al., 2022
- AI Chains: Transparent and Controllable Human-AI Interaction by Chaining Large Language Model Prompts, Wu et al., 2021
