Prompt chaining = the output of one prompt becomes the input to the next. Each prompt does exactly one job. The chain produces results no single prompt can achieve reliably.
This is how LLM-powered workflows are built: not one clever prompt, but a pipeline of focused steps with quality gates between.
02 Weak vs. Strong
EX 01Content pipeline: research → post → thread
Step 1 — Research:
"List 5 facts about serverless databases in 2025 that would genuinely surprise a senior engineer who uses traditional hosted Postgres. For each: the specific claim, one concrete example (product name, benchmark, or incident), and confidence level: high/medium/low. Omit anything below medium confidence."
→ Review. Remove low-confidence items.
Step 2 — Structure [paste Step 1]:
"Create an outline for a 1,200-word technical blog post for senior backend engineers. Sections: hook (why this matters NOW), 3 main insights, practical recommendation. For each section, write one sentence describing the specific argument it makes — not just the topic."
→ Review. Does each section make a distinct argument?
Step 3 — Draft [paste Step 2]:
"Write the full blog post following this outline exactly. Technical but not academic. No filler transitions. Include one concrete code example showing the difference between traditional Postgres and Neon serverless connection handling."
Step 4 — Thread [paste Step 3]:
"Convert this post to a Twitter/X thread. 8–10 tweets. First tweet: a hook that works standalone. Each subsequent tweet: one insight. Final tweet: link CTA. Max 280 chars each."
→ Why it works
Each step has one job. Research is separate from writing is separate from formatting.
EX 02Candidate screening pipeline
Step 1 — Extract [once per resume]:
"Extract structured data from this resume. Return JSON only:
{name, years_exp, current_role, current_company, key_skills[], biggest_red_flag}
Resume: [paste one]"
→ Run for each resume. Review all JSON objects.
Step 2 — Score [paste all Step 1 JSON + job spec]:
"Score each candidate 1–10 on: technical_fit, seniority_match, trajectory. Return a ranked table: Name | Tech | Seniority | Trajectory | Total | Top_Concern"
→ Review. Does the scoring match your actual priorities?
Step 3 — Brief [top 4 candidates]:
"For these 4, write a 3-sentence interviewer brief each:
1. Why they're promising
2. The one thing that needs probing
3. One specific interview question targeting that thing
Format as a table."
→ Why it works
Extraction, scoring, and decision are separate steps — each reviewable before the next.
03 Key Points
01Decompose first: list all sub-tasks before writing any prompt
02One prompt = one transformation. One input type, one output type.
03Validate output before passing to the next step — catch errors early
04A failed step? Retry that step only — don't restart the chain
05Gate steps: some should only proceed if the previous met a quality bar
04 Model-Specific Notes
Claude handles large intermediate outputs well. Use <step_N_output> tags to label where data came from.
05 For Your Role
When a task feels too complex: 'What would a human do in step 1, 2, 3?' Then prompt each step separately and review between them.