Chapter 35 Exercises: Chaining AI Interactions and Multi-Step Workflows
These exercises progress from conceptual chain design to hands-on chain execution. Complete them in order — each builds on skills introduced in the previous exercise.
Part A: Chain Design (No Execution Required)
Exercise 1: Decomposition Practice
Take the following single-prompt tasks and decompose each into a chain of three or more steps. For each chain, write the step names and describe the input and expected output of each step. Do not execute the chains yet.
Tasks to decompose: - "Write a competitive analysis of three companies in my industry" - "Help me prepare for a salary negotiation" - "Draft an onboarding guide for new team members joining my department"
Exercise 2: Chain Type Classification
For each of the following workflow descriptions, identify which chain type it represents (linear, branching, iterative, or parallel) and explain why. Some may be combinations.
a. A customer support workflow: classify incoming ticket → if billing question, route to billing chain; if technical question, route to tech chain; if general inquiry, route to general chain
b. A writing improvement workflow: draft → evaluate quality score → if score < 7, revise and re-evaluate; if score >= 7, proceed to formatting
c. A market research workflow: simultaneously research competitor A, competitor B, and competitor C → merge findings → comparative analysis
d. A code documentation workflow: read function → write docstring → write usage example → write test cases
Exercise 3: Quality Gate Placement
Review the following five-step chain and identify which steps should have human review gates. Justify each decision.
Chain: Quarterly business review report preparation 1. Extract key metrics from raw data file 2. Identify top three business wins for the quarter 3. Identify top three challenges and their root causes 4. Write an executive summary (three paragraphs) 5. Write the full QBR report (ten sections)
Exercise 4: Chain Failure Mode Analysis
For the following chain, identify two specific failure modes (ways the chain could produce bad output) and describe a design change that would prevent each failure mode.
Chain: Job application cover letter chain Step 1: Extract key requirements from the job description Step 2: Match candidate's resume to each requirement, rating fit (high/medium/low) Step 3: Write cover letter emphasizing high-fit points Step 4: Review cover letter for tone and personalization
Exercise 5: Context Management Design
A five-step research chain produces the following outputs at each step: - Step 1: 2,000-word research document (all sources compiled) - Step 2: 800-word thematic analysis - Step 3: 300-word list of key insights - Step 4: Draft report (3,000 words) - Step 5: Final edited report
For steps 3, 4, and 5, write out exactly what context you would include in each step's prompt (from the previous steps' outputs). Your goal: maximize quality while minimizing context bloat.
Part B: Manual Chain Execution
Exercise 6: Your First Two-Step Chain
Execute a two-step chain manually in your preferred AI chat interface.
Task: prepare a structured learning plan for a skill you want to develop.
Step 1 prompt: "I want to learn [your chosen skill]. Generate a list of 8-10 key concepts or sub-skills I need to master, ordered from foundational to advanced. For each, write a one-sentence description."
Step 2 prompt: [Take the output from Step 1] "Using this list of concepts and sub-skills, create a 30-day learning plan. For each of the first two weeks, specify what to focus on each day (5 days per week). For weeks three and four, provide weekly rather than daily guidance."
Review both outputs critically. What worked well? What would you change about either step's prompt?
Exercise 7: The Critique-and-Revise Chain
Execute a three-step review chain on a piece of your own writing — a paragraph or short document from your work.
Step 1: [Paste your writing] "Critique this piece of writing. Identify: (a) the three strongest elements, (b) the three weakest elements, (c) the single most important improvement to make. Be specific and direct."
Step 2: [Paste the original + the critique] "Using this critique, rewrite the original piece. Address each weakness identified in the critique while preserving the strengths. The revision should be approximately the same length as the original."
Step 3: [Paste the original, the critique, and the revision] "Compare the original and the revised version. For each weakness identified in the critique: (a) was it addressed in the revision? (b) was it addressed effectively? Rate the revision overall on a scale of 1-10 compared to the original."
Reflect: Was the revision better? What did the critique chain catch that you might have missed?
Exercise 8: The Research Synthesis Chain
Execute a four-step research synthesis chain on a topic relevant to your professional work.
Step 1: "What are the five most important debates or open questions in [your chosen topic]? Format as a numbered list with a one-paragraph explanation for each."
Step 2: [Output from Step 1] "For each of these five debates or questions, what do practitioners generally agree on, and where does significant disagreement or uncertainty remain? Format as a two-column response for each item."
Step 3: [Output from Step 2] "Across all five debates, identify three cross-cutting themes or tensions that appear in multiple areas. For each theme, write two to three sentences explaining what makes it significant."
Step 4: [Output from Steps 2 and 3] "Write a 300-word executive summary of this topic for a professional who is new to it. The summary should cover: what the topic is, why it matters, the key areas of consensus, and the most important remaining uncertainties."
Evaluate: How does this four-step synthesis compare to asking "write a summary of [topic]" in a single prompt?
Exercise 9: Design and Execute a 3-Step Chain
Design and fully execute a three-step chain for a task from your own work. Requirements: - The task must be something you would actually do in your professional context - The chain must have at least one step where a human (you) reviews before proceeding - Write your chain specification before executing (use the template from the chapter) - After execution, write a brief post-mortem: what worked, what broke, what you would change
Deliverable: your chain specification document + the final output + a 150-word post-mortem.
Part C: Advanced Chain Design
Exercise 10: Branching Chain Design
Design a complete branching chain for the following scenario: you receive client feedback on a deliverable you have produced. The chain should handle three cases: - Feedback is positive with minor suggestions - Feedback requests significant revisions - Feedback indicates a fundamental misalignment with client expectations
For each branch, design the complete chain from feedback receipt to revised deliverable. Include a chain specification for each branch.
Exercise 11: Iterative Chain with Quality Gate
Design an iterative chain for improving a sales email until it meets specific quality criteria.
Your quality criteria must include at least four specific, measurable elements (for example: subject line under 50 characters, opening sentence mentions recipient's industry, clear single call-to-action, no more than 150 words).
Design the chain with: - An initial draft step - A quality evaluation step that checks each criterion explicitly - A conditional: if all criteria met, finalize; if not, generate specific revision instructions - A revision step - A maximum iteration count
Write the chain specification and describe how you would handle the case where maximum iterations are reached without meeting all criteria.
Exercise 12: Parallel Chain Design
Design a parallel chain for conducting a stakeholder analysis before a significant organizational change initiative.
The parallel sub-chains should each analyze a different stakeholder group: leadership, middle management, frontline employees, and external partners.
Each sub-chain should produce: a summary of likely concerns, likely support factors, and recommended engagement approach.
Then design the merge step: how do you synthesize four parallel stakeholder analyses into a unified stakeholder engagement strategy?
Exercise 13: Chain Template Library
Build your personal chain template library. Design three chain specifications for tasks you perform regularly. For each: - Write the full chain specification - Estimate how long the chain takes to execute manually - Identify which steps could be automated (you will build these in Chapter 36)
Format each specification so you can run it again in three months without needing to re-design it from scratch.
Exercise 14: Error Recovery Design
For the chain you designed in Exercise 9 or 10, design explicit error recovery procedures for each step: - What specific failure modes can occur at this step? - What is the detection criterion for each failure mode? - What is the recovery procedure?
Create a one-page "chain maintenance guide" that a colleague could use to run and troubleshoot your chain.
Exercise 15: Cross-Persona Chain Comparison
Consider Alex, Raj, and Elena's chains described in this chapter. Pick one of their chains and:
a. Identify the three design decisions that most significantly affect chain quality in their scenario.
b. Redesign one step of their chain to improve quality, and explain why your redesign is better.
c. Add one additional step that would further improve the final output, and explain where in the chain it should go and why.
Part D: Reflection and Integration
Exercise 16: The Single-Prompt Comparison
Take any output you produced in Exercises 6 through 9 and compare it to what you would get from a single prompt asking for the same thing.
Write the single prompt you would have used. Execute it. Compare the outputs on: quality, accuracy, structure, and usefulness.
Write a 200-word comparison. Where was the chain significantly better? Were there any dimensions where the single prompt performed comparably?
Exercise 17: Chain Economics
For the chain you designed in Exercise 9, estimate: - Total time to execute the chain manually (including your review time at each gate) - Total time you would spend producing the same output without the chain - Quality improvement, rated subjectively on a 1-5 scale
Based on this analysis, what is the minimum frequency of use that would make the chain worth the upfront design investment?
Exercise 18: Team Chain Documentation
Imagine you need to hand off one of your designed chains to a colleague who has never seen it. Write the documentation they would need to run the chain successfully, including: - Purpose and when to use this chain - Required inputs and where to get them - Step-by-step execution instructions - What to do at each human review gate - Common issues and how to handle them - Expected output format
Write this as if it will be included in a team handbook.
Exercise 19: Chain Audit
Review a complex task you completed in the past month — something with multiple phases or deliverables.
Analyze it as a chain design problem: what were the implicit steps? Where did errors occur or quality drop off? Were there points where you reviewed your own work?
Based on this audit, design a chain that would produce the same output more efficiently and reliably. Identify the three most important improvements your chain design makes over your actual process.
Exercise 20: Capstone Chain Project
Design and execute a complete chain for the most complex deliverable you regularly produce. Requirements: - Minimum five steps - At least one human review gate - At least one form of quality validation (iterative loop or explicit critique step) - Full chain specification document written before execution - Post-execution post-mortem: what worked, what failed, what you would change
This is your capstone chain — the one you will keep using and improving. Treat the design phase seriously.