Prompt Chaining
Break the job into steps and let each one be checked.
A workflow where the output of one model call becomes the input of the next, each step doing one thing. The trade-off is latency, bought back as accuracy and diagnosability at every stage.
The gain over one large prompt is that you can put a deterministic check between the steps, and that a failure localises to a stage. When users see the intermediate artifacts, it also becomes the difference between a pipeline they can correct and one they can only re-run.
The cost of chaining is latency multiplied by the number of steps and errors that compound through them. The benefit is that every step is inspectable and checkable — and where you can put a deterministic check between steps, a chained pipeline is far easier to trust than one large prompt.
Where the check goes
Extract structured data, then summarise it.
Validate the extraction against a schema before the summary exists. A bad extraction then fails immediately and cheaply, instead of becoming a fluent summary of nothing — which is the difference between a caught error and a confident one.
- blogBuilding effective agents ↗
Draws the line between fixed workflows and agents that choose their own process, and names the core patterns: chaining, routing, parallelisation, orchestrator-workers, evaluator-optimizer.
- blogBuilding agents with the Claude Agent SDK ↗
States the agent loop plainly — gather context, take action, verify work, repeat — and shows subagents and compaction as context-isolation tools.
Evaluator-Optimizer · Generator-critic loop
One call produces, another critiques, and the loop repeats until it passes.
Structured Output · JSON mode
Making the model return data your code can parse.
Automated Check
A machine verdict the agent cannot talk its way past.
Agent Loop · Agentic loop
Think, act, observe — repeated until the task is finished.
Software Factory
A pipeline where agents take tickets and produce code, with checks along the way.