← Prompt Engineering
Prompt Chaining
Prompt chaining decomposes a complex task into a sequence of smaller prompts where the output of each step feeds as input to the next. By breaking a large problem into manageable sub-tasks, chaining can exceed the quality achievable in a single long prompt, allows intermediate validation, and makes the overall pipeline easier to debug and modify. Each chain link can use a different model, apply different formatting, or incorporate additional retrieved context.