Prompt Chaining
# Prompt Chaining
**Intent** — Decompose a complex task into a fixed sequence of LLM calls, where each call handles one subtask and its output feeds the next.
**Also known as** — Pipeline, Sequential Prompting, Prompt Pipelining.
**Problem** — A single prompt that asks a model to research, outline, draft, and polish an article in one shot tends to do all four steps poorly. The model has no room to "think" between stages, quality on later steps degrades, and when the output is wrong you cannot tell which step failed. Cramming everything into one call also makes the prompt long, brittle, and hard to evaluate.
**Solution** — Break the task into discrete steps and give each its own focused prompt. The output of step *n* becomes part of the input to step *n+1*. Because each prompt is small and single-purpose, it is easier to write, cheaper to test, and each intermediate result can be inspected, validated, or cached. You can insert deterministic code between steps — a gate that checks an outline meets length requirements before drafting, for example — turning a fuzzy generative task into a controllable pipeline. Prompt chaining is the simplest way to trade a little latency for a lot of reliability, and it is often the first refactor to reach for when a monolithic prompt starts to plateau.
**Structure**when to use it
Community prompt sourced from the open-source GitHub repo Rahul-Khare997/agent-design-patterns (MIT). A "Prompt Chaining" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.
tags
productivitycommunitydeveloper
source
Rahul-Khare997/agent-design-patterns · MIT
more in Productivity
Productivity✓ tested
Summarize a doc into decisions & actions
chief of staff who extracts what to DO, not just what was said
Productivity✓ tested
Draft a reply to a hard email
calm, direct communicator who de-escalates without caving
Productivity✓ tested
Turn a brain-dump into a weekly plan
planning coach who protects your focus, not just your calendar