Chain Prompting
Break complex tasks into sequential steps, using the output of one prompt as input for the next.
What Is This Technique?
Chain prompting breaks down complex problems into a series of simpler, connected prompts. Each prompt focuses on one aspect of the problem, and its output feeds into the next prompt.
This technique mirrors how humans solve complex problems - we don't tackle everything at once. We break it down, solve one piece, review it, then move to the next piece.
The power of chain prompting lies in its ability to maintain context while allowing for course correction. If step 3 doesn't look right, you can adjust before proceeding to step 4.
When to Use This Technique
When to Use
- ✓For multi-step processes that build on each other
- ✓When you need to verify or refine outputs before proceeding
- ✓For complex projects requiring different types of thinking
- ✓When intermediate outputs need human review or modification
When NOT to Use
- ✗For simple, single-step tasks
- ✗When the entire process can be described in one prompt
- ✗When speed is critical and iteration isn't needed
- ✗For tasks where steps don't have clear dependencies
Real-World Examples
Building a Full Application
Without This Technique
Build me a complete task management app with Next.js
With This Technique
Chain 1: "Define the data structure for a task management app. Include tasks, projects, users, and tags. Provide TypeScript interfaces." Chain 2: "Using these interfaces: [paste from Chain 1], create a database schema with relationships." Chain 3: "Now create API routes for CRUD operations on tasks using these interfaces: [paste from Chain 1]" Chain 4: "Create React components for displaying and editing tasks using the API routes from Chain 3" Chain 5: "Build the main dashboard that brings together all components from Chain 4"
Key Improvement:
Each step is focused, reviewable, and builds on verified previous work
Applied in 777-1
"Applied in 777-1: Chain prompting mirrors the subagent workflow itself - each Context Engineer builds on the previous one's work. Cassandra (Integration) depends on all prior subagents completing their reviews. The Kinetic Canvas case study shows how sequential context builds sophisticated results. Full case study documentation coming soon."
Best Practices
DO: Identify clear breakpoints between chains
Each chain should produce a complete, testable artifact that can stand on its own.
DO: Review and validate each output before proceeding
The whole point of chaining is to catch issues early. Don't rush through without verification.
DO: Maintain context by referencing previous outputs
Explicitly paste or reference outputs from previous chains to maintain consistency.
DON'T: Create chains that are too granular
Too many micro-steps creates overhead. Each chain should accomplish something meaningful.
DON'T: Skip chains or combine them to save time
This defeats the purpose. If you're tempted to skip, your chains might be too granular.
Common Pitfalls to Avoid
- ⚠Creating chains that are too dependent, losing the benefit of separation
- ⚠Not carrying forward important context from previous chains
- ⚠Making chains too granular, creating unnecessary overhead
- ⚠Failing to validate intermediate outputs before proceeding
- ⚠Not adjusting the plan when an early chain reveals new insights
Related Techniques
Combine this technique with others for even better results:
Ready to Apply This Technique?
See Chain Prompting in action in our prompt library