Think about how you brief a junior teammate on their first day. You don't just say "handle the customer emails". You say who they are in this context, what exactly to do, what information they may use, show them one email you already handled well, and tell them what the reply should look like when it's done.
That briefing has five parts. So does a good prompt — and once you can see the five, a bad prompt stops being mysterious. You can point at the missing slot.
The five slots
Read that diagram as a checklist rather than a template. You are not obliged to fill every slot every time — but every slot you leave empty is a decision the model will make for you, and it will make it differently on Tuesday than it did on Monday.
1. Instruction — the only compulsory one
The instruction says what to do. It is the one slot you cannot skip, and the one people write worst, because they write an adjective where a verb and an object belong.
| Weak | Strong |
|---|---|
| "Help me with this email." | "Rewrite this email so it politely declines the meeting and proposes Thursday instead." |
| "Make this code better." | "Rename the variables so each says what it holds, and add a docstring. Change nothing else." |
| "Analyse this data." | "List the three months with the highest returns, with their return percentage." |
Notice what the strong column shares: an action verb, a specific object, and — in two cases — an explicit boundary on what not to touch. One prompt, one job. If your instruction contains "and also" twice, you probably want two calls (lesson 7 makes this a pattern).
2. Context — the facts it may use
Context is the background the model cannot know: your data, your situation, your constraints. This is the slot that decides whether the answer is about you or about the average case.
Suggest a laptop.Result
Suggest a laptop.
Context:
- Budget: under ₹60,000
- Use: B.Tech CSE — VS Code, Docker, occasional VMs
- Travels by train weekly, so weight and battery matter
- Already owns an external monitor, so screen size is not criticalResult
There is a second, quieter use of this slot that matters far more in production: context is also a fence. "Answer only from the information above; if it is not stated, say so" turns the context block into the boundary of what the model is allowed to claim. That single sentence is the backbone of every RAG system.
3. Role — who is speaking
"You are a patient teacher explaining to a first-year student." "You are a code reviewer who is strict about naming." A role sets vocabulary, depth, and what the answer assumes the reader already knows.
Be clear-eyed about what it does not do: a role changes register, not knowledge. "You are a senior cardiologist" does not give the model medical facts it lacks; it makes it sound like one, which is arguably worse. This is a favourite interview trap.
💡 The most useful roles in practice describe the reader, not the speaker. "Explain to someone who has never used a terminal" changes the answer far more reliably than "You are an expert".
4. Examples — what good looks like
Some things are quicker to show than to describe. Tone is one. Formatting is another. Your own labelling conventions are a third — try writing a paragraph that fully defines what your team means by "P1 bug", then notice how two examples do it in a line each.
Classify each support ticket as P1, P2 or P3.
Ticket: "Payment failed but money was debited" -> P1
Ticket: "The dashboard chart colours look odd" -> P3
Ticket: "Cannot log in since this morning" ->Result
Lesson 3 is entirely about this slot — how many examples, how to pick them, and the mistake that makes examples backfire.
5. Format — the shape of the answer
The format slot is the difference between output you read and output your program can use. "Return a markdown table with columns Name, Score, Reason." "Return JSON only, no prose." "Answer in at most 3 bullets, each under 20 words."
Anything countable is a gift here, because it is checkable — by you, and by an automated test. Lesson 5 goes deep on getting machine-usable output every single time.
Wait — do I always need all five?
No, and over-filling has real costs: more tokens, more money, more chances to contradict yourself, and — if you stuff in a persona and three examples for a task that needed neither — a longer prompt that performs no better.
A practical rule of thumb:
| Situation | Slots worth filling |
|---|---|
| Quick question in a chat window | instruction (+ context if it's about you) |
| Output another program will parse | instruction + context + format |
| Task with your own conventions or tone | instruction + examples + format |
| Production feature, many users | all five, plus edge-case rules — see lesson 6 |
🎯 Selection-round radar: "What are the components of a good prompt?" is a near-guaranteed question in service-company rounds. Name the five, then add the sentence that shows judgement: "— and I'd only fill the slots the task needs; a persona on a JSON extraction task is wasted tokens."
Putting it together
You are an experienced customer-support lead at an Indian
e-commerce company. <- ROLE
Write a reply to the customer message below. <- INSTRUCTION
Facts you may use (use nothing else): <- CONTEXT
Order ORD10024, placed 2 Sep, marked "in transit",
promised delivery 5 Sep, currently 3 days late.
Policy: refund available after 7 days' delay.
Style reference — a reply we were happy with: <- EXAMPLES
"Hi Rahul, you're right — that's later than we promised.
Your order is at the Nagpur hub and should reach you by
Friday. If it doesn't, reply here and I'll process the
refund myself."
Format: 3-5 sentences, no bullet points, end with one <- FORMAT
concrete next step. Do not invent dates or amounts.
Customer message: {{message}}Long? Yes. But every line removes a decision the model would otherwise improvise — and this prompt runs a thousand times a day, so it's written once and reviewed like code.
Common mistakes
- Writing an adjective ("make it good") where a verb and an object belong.
- Assuming the model knows your project, your data or last week's conversation.
- Believing a role grants knowledge — it grants a register.
- Bundling three jobs into one instruction, then wondering which part failed.
- Describing a format in prose ("nicely structured") instead of specifying it.
- Filling all five slots on a task that needed two.
Quick recap
| Slot | One-liner |
|---|---|
| Instruction | action verb + specific object; compulsory; one job per prompt |
| Context | the facts it may use — and, with one sentence, the only facts it may use |
| Role | sets register and audience assumptions, never knowledge |
| Examples | show what a paragraph would struggle to describe: tone, format, your labels |
| Format | make it countable, so it's checkable |
| How many to use | as many as the task needs; empty slots are decisions handed to the model |
Practice Zone — PYQs from real selection rounds
Six MCQs, then two prompts to rebuild slot by slot.
Which five parts make up a well-structured production prompt?
Asked in

Why use delimiters (triple quotes, XML-style tags) around user-supplied text?
Asked in

What is an 'escape hatch' in a prompt, and why does it matter?
Asked in

Where should the most important instruction go in a long prompt?
Asked in

Which instruction style generally works better?
Asked in

You must handle a case where the input is missing a required field. Best approach?
Asked in

Hands-on tasks:
Write a production prompt for an insurance claims assistant that explains claim decisions to customers using a supplied decision record. Include all five parts and at least two edge-case rules.
Asked in

A prompt puts a 40-page document first, then the instruction "Summarize in exactly 5 bullets and cite page numbers" at the very end. Users report inconsistent formats. What's wrong and how do you fix it?
Asked in

FAQ
Does the order of the slots matter?
Yes, more than people expect. Instructions near the start, bulk data in the middle, and the specific request last works best — models attend most to beginnings and endings. With a long context block, repeat the key instruction after it too. Lesson 7 covers placement properly.
Should I use markdown headings inside the prompt?
Some structure helps the model see where one part ends and the next begins — headings, XML-style tags, or a line of dashes all work. Tags like <document> have an extra benefit for untrusted content, which lesson 9 explains.
Is there a limit to how long a prompt can be?
A technical one — the context window — and a practical one that bites much sooner. Long prompts cost more, respond slower, and start contradicting themselves. Lesson 8 treats the window as a budget rather than a limit.
Next lesson: the examples slot, in depth — how many, how to pick them, and when they hurt — Lesson 3: Zero-shot, One-shot & Few-shot →


