Prompt Chaining: Breaking Big Tasks into Steps for AI
What prompt chaining is, when to split work into steps and when to let the model handle it, with a job-posting chain example.
Try asking AI in a single message to "read the team lead's notes, summarise the requirements, write a job posting, check the language is inclusive, then translate it into English". You usually get every step done superficially, and when something is wrong you cannot tell which step it went wrong at. The fix that AI workflow teams use is prompt chaining.
What is prompt chaining?
Prompt chaining means breaking a big task into several steps, each a separate model call, with each step's output becoming the next step's input. Anthropic's prompting guide explains that sequential calls are still useful when you need to inspect intermediate outputs or enforce a specific pipeline structure, because you can log, evaluate or branch at any point.
When to chain and when not to
Chain when
- Each step needs different instructions, data or even a different model.
- You need logs or human review along the way, for example before a real email is sent.
- Some steps call other systems, such as a database lookup, before the AI continues.
- You need to branch on results, for example routing complaints down a different path.
Do not chain when
Anthropic notes that newer models with adaptive thinking and sub-agent orchestration handle most multistep reasoning internally. If the task does not need intermediate checks, one clear prompt may be enough, and it is easier than maintaining a long chain.
Common chain patterns
1. Sequential: one step at a time
Extract, then analyse, then write. Each step has one job.
2. Self-correction: draft, review, refine
Anthropic says the most common pattern is to have the AI draft, then review that draft against criteria, then refine based on the review.
3. Planner and worker
OpenAI's reasoning guide describes many workflows that use a reasoning model as a "planner" to plan and break down the work, and a faster, cheaper model as a "workhorse" to carry out each step.
4. Hand subtasks to sub-agents
Anthropic's context engineering article describes a pattern where a main agent coordinates and hands subtasks to sub-agents working in clean context windows. When done, each sub-agent returns only a condensed summary. This suits research across several topics that do not depend on each other, and it keeps the main agent's context free of unnecessary detail.
Example: an HR job-posting chain
- Extract: read the team lead's notes and return structured data: job title, responsibilities, required skills, nice-to-have skills (use Structured Output so the next step can read it reliably).
- Draft: write the posting from step one's data using the company template.
- Review: check against a checklist, such as no age, gender or appearance requirements unrelated to the job and no contradictory requirements. Return a list of issues.
- Refine: fix the draft based on the issue list.
- Human review: HR reads the final version before publishing.
Pass results between steps wrapped in tags such as <draft> or <issues> so each step knows exactly what came from the previous one.
A good chain is one where you can point straight to the step where things went wrong.
Things to watch out for
- Errors compound. If step one extracts the wrong data, every later step inherits it, so check the first step's output strictly.
- Every added step adds time and cost. Do not split more than needed.
- AI reviewing AI does not replace human review for work that affects real people, such as hiring.
How to start
- Write down, as a list, the steps you follow when doing the task by hand.
- Merge steps that use the same data and instructions; separate steps that need review or call other systems.
- Give each step one goal and a clear output format.
- Test each step on its own before connecting the full chain, and keep logs of intermediate outputs.
To connect chains like this to automation tools, read AI Workflow Automation. And if you are an employer ready to post the finished job ad, start at Plants.work for employers.