Claude · Workflows

Prompt chaining

Know when splitting a task helps, pass only the fields the next step needs, add quality checks, and run parts in parallel.

Prompt chaining with Claude

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.

Frequently asked
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.