How it works
Instead of asking for everything at once, prompt chaining breaks the problem into steps. The first call can generate an outline, the second expands each point, the third reviews. The output of each step becomes the input for the next, allowing you to check and correct along the way. This makes the result more controllable and reduces errors.
Practical example
To write a report, first ask the model for an outline. Then, for each section, ask for a paragraph. Finally, ask for a coherence review. Each step is simpler and the final result is more consistent.
What it's for
It reduces errors in long and complex tasks, improves quality and allows human intervention between steps. It's the foundation of many AI agent workflows, where each step can use a different model or tool.
When to use
Use it when a single call produces inconsistent results or when you need to validate intermediate steps. For simple tasks, a single well crafted prompt can be enough and faster.