Prompt chaining
Know when splitting a task helps, pass only the fields the next step needs, add quality checks, and run parts in parallel.
-
How Do You Add a Quality Check Between Claude Prompts? Add a step that tests the output against stated criteria before anything moves on. Level 3: Workflows
- 1Generate a draft
- 2Review against criteria
- 3Refine from the review
Fix once or twice, then send to a person -
How Do You Run Claude Prompts in Parallel and Merge Them? Send each independent part to its own prompt, then combine the results in code or with one final merge prompt. Level 3: Workflows
- 50%lower cost than standard calls
- 100,000requests per batchor 256 MB, whichever is first
- 1 hourmost batches finish within
- 24 hoursthen unfinished work expires
-
How Do You Pass Results From One Claude Prompt to the Next? Agree on the fields that the next step needs, have Claude output exactly those, and pass only that to the next prompt. Level 3: WorkflowsProse summaryhope nothing was lost
- A missing point stays hidden
- Abandoned ideas come along
- More tokens at each step
Agreed fieldsonly what the next step needs- An empty field shows the gap
- The next step starts clean
- Fewer tokens at each step
-
When Should You Split a Claude Task Into Separate Prompts? Split a task only when you need to see or check the output in the middle, or when the pipeline has to run the same way every time. Level 3: Workflows
- The output changes typequotes become a report
- A person should approvespot-check before moving on
- A cheaper model can take overone step needs less power
What's changed
Older advice said to break any complex task into a chain of prompts. Anthropic's current guide is narrower: Claude handles most multi-step reasoning internally, and explicit chaining is still useful when you need to inspect intermediate outputs or enforce a specific pipeline. So a chain now needs a reason, such as a check, a change of model or a step a person has to approve.
Where chains go wrong
Chains rarely fail at the prompts. They fail at the joins: a truncated output passed on as if complete, a summary that dropped the one fact that mattered, or batch results matched to the wrong input. This lesson focuses on those joins. If you only take one thing from it, check the stop reason and the content before each step starts.
What is prompt chaining?
It means splitting a job into separate calls, where each step's output becomes the next step's input. Anthropic's agent guide describes it as trading latency for accuracy on tasks that break cleanly into fixed subtasks.
What is an example of prompt chaining?
Anthropic's most common pattern is self-correction: generate a draft, review it against criteria in a separate call, then refine it from the review. Because each step is its own call, you can log or branch at any point.
What's the difference between prompt chaining and an agent?
In a chain, you decide the steps in advance. In an agent, Claude decides which steps to take and which tools to call as it goes. Anthropic suggests using the simplest approach that works, and adding agents only when simpler solutions fall short.
How do I run many Claude prompts at once?
On the API, the Message Batches API takes up to 100,000 requests or 256 MB per batch at half the normal price, and most batches finish within an hour. Results can return in any order, so match them with custom IDs. In Claude Code, you can use subagents or separate sessions.