Chaining Prompts: One Job per Step
Split a big task into small steps and pass each result safely into the next prompt.
Why this matters
Big tasks done in one prompt often go wrong. Splitting them into small steps makes each part easier to check and fix.
Small Steps Beat One Big Prompt
Ask for one job at a time: pull out facts, then decide, then write. A mistake in step 1 is caught before it spoils step 3.
In real life: A restaurant has one person taking orders, one cooking, and one serving. If the cook is wrong, you find out before the plate reaches the customer. Prompt steps work like that line.
Pass Each Result Forward in Tags
Paste the last step's output into the next prompt inside tags, like <step1_output>. This keeps data apart from your instructions.
In real life: Think of passing a folder to a colleague with a label on it. The label shows what is inside and what is not an instruction. Tags do that job for your data.
Step 2 of 2. Use ONLY the data in <step1_output>.
<step1_output>
{"order_id": "ORD-1"}
</step1_output>
Ban New Facts Between Steps
Say "use only the data given, and add no promises or details". Otherwise the AI invents times, prices, or rules.
In real life: Add the rule 'use only this data'. Without it, the AI fills gaps with things like 'within 24 hours' that nobody promised.
Your practice task
Step 1 of your support workflow already turned a complaint into the data below. You are writing step 2: have the AI draft the customer reply. Place the data inside <step1_output> tags, tell it to use ONLY that data, keep the reply to 35 words or fewer, and never invent delivery times or extra promises.
How to do it
- Read the step 1 data above. It was made by an earlier prompt.
- Put that data inside <step1_output> tags.
- Tell the AI to use only that data and write a reply of 35 words or fewer.
- Say: no invented times or promises. Press Run proof.
Practice it for free in the app. You get instant checks that show what you got right and what to fix. A lesson takes about two minutes and you can try as many times as you like.
Quick reference: Chain Step Template
One job per step, results passed forward in tags, and no new facts allowed.
Step [N] of [M]. Use ONLY the data inside <step_output> tags. [One clear job]. Add no facts that are not in the data. <step_output> [previous result] </step_output>
More lessons in this course
- Testing Prompts on Tricky InputsTest a prompt on edge cases and add a safe fallback so it never guesses.
- How AI Predicts TextDiscover how language models predict word-by-word and how clear direction stops rambling answers.
- How to Write a Good AI Prompt: Goal and ContextBuild reliable prompts using the three core pillars: Goal, Context, and Constraint.