The Anatomy of a Prompt
⚠️ Version note: the technique here isn't tied to any one interface — it works in Claude, ChatGPT, Gemini and anything else built the same way. Last checked: 24 July 2026.
What you'll have at the end
- A five-part structure you can apply to any request
- Three saved templates for jobs you personally repeat
- The ability to look at a disappointing answer and say which part was missing
Prerequisite: AI-01. This lesson only makes sense if you know the model is predicting from context — because every part of the structure below exists to narrow that prediction.
Get your baseline (5 min)
Before learning the structure, produce something bad on purpose. You'll need it for comparison.
- Think of a real task you actually have this week — an assignment, an email, a plan.
- Ask for it the way most people would. One line. No context.
"help me write my history essay"
- Save the reply. Don't judge it yet.
✅ Check: you have a one-line prompt and its answer sitting in a document, ready to compare against.
Role: set the vocabulary (3 min)
[ROLE] You are a history teacher who has marked A-level essays for fifteen years.Role is the weakest of the five parts, and it's the one people over-invest in. It won't give the model knowledge it doesn't have. What it does is shift which region of language it draws from — a teacher-marker answers in terms of criteria and marks; a journalist answers in terms of story and hook. Same facts, different vocabulary and priorities.
Use it when the same question has genuinely different good answers depending on who's asked. Skip it when the task is mechanical: "fix this JSON" needs no persona.
Don't: stack adjectives. "You are a world-class, elite, genius historian" does nothing. There is no reservoir of extra effort you're unlocking with flattery.
✅ Check: you can say, in one sentence, what your role line changes about the answer. If you can't, delete it — it was decoration.
Context: the part that actually matters (10 min)
[CONTEXT] I'm in year 12. The essay is 1,500 words on the causes of the
First World War. It's marked on argument and use of sources,
not description. I've already read Clark and Macmillan.
My weak point is that I narrate events instead of arguing.If you only add one of the five parts, add this one. Everything AI-01 said about prediction lands here: a vague prompt produces an average answer, because average is what's most probable. Every specific you supply cuts away the part of the distribution that doesn't fit you.
Four things to include:
| Example | |
|---|---|
| Who you are / what level | "year 12", "first-year CS student", "never used Excel" |
| The real constraints | word count, deadline, budget, tools available |
| What you've already tried | stops it suggesting the thing you did yesterday |
| What you're bad at | the highest-value sentence in most prompts |
That last one is the one nobody writes and everybody needs. "My weak point is that I narrate instead of arguing" changes the entire response — it stops being a generic essay guide and starts being about your actual problem.
✅ Check: your context contains at least one thing the model could not have guessed about your situation.
Task: one verb, one deliverable (3 min)
[TASK] Draft an essay plan.Short, and one thing. The most common failure here is stacking:
❌ "Explain the causes of WWI and give me a plan and check my thesis and suggest sources"
Four tasks in one sentence produces four shallow answers. The model divides its effort; you get a paragraph on each where you wanted a page on one.
Rule: one task per message. Chain them across turns instead — plan first, then thesis, then sources. You'll get better output on each and each step benefits from the last, since it's all in the context window now.
Choose the verb deliberately. Explain / draft / critique / compare / rewrite / list / plan are different jobs. "Help me with" is not a verb — it's a shrug.
✅ Check: your task line contains exactly one verb and one deliverable.
Format: describe the shape you want (5 min)
[FORMAT] A table. One row per paragraph. Columns: paragraph number,
the claim it argues, the evidence used, how it links to the
thesis. Nothing before or after the table.Unspecified, you get the default shape: a few paragraphs of prose with a bulleted list in the middle. Fine sometimes; useless when you wanted something you can work with.
Format is also the cheapest quality lever there is. Asking for a table forces the model to commit to discrete claims. Vagueness that hides comfortably in prose becomes visible in a cell — an empty "evidence" column is an argument with no support, and now you can see it.
Useful things to specify: table with named columns · numbered steps · maximum length · "no preamble, start directly with the answer" · a code block · a filled-in template you paste in.
"No preamble" is worth adopting as a habit. It removes the "Great question! Here are some thoughts…" opening and gets you straight to the content.
✅ Check: you could describe the shape of the output you're expecting before you see it.
Constraint: what it must not do (5 min)
[CONSTRAINT] Don't write the essay. Don't invent quotations or page
numbers. If a claim needs a source I haven't mentioned,
flag it rather than filling it in. Maximum 8 rows.The part almost everyone omits, and the one that most improves the result.
Constraints work because they exclude high-probability output that you don't want. Left unconstrained, the model reaches for the most typical continuation — which is exactly the generic thing you were trying to avoid.
The ones worth reusing:
- "Don't invent sources or numbers. If you're unsure, say so." — the single most useful sentence you can add to any factual request
- "Don't do the work for me — make me attempt it first" — for anything you're learning
- "No generic advice" / "nothing that would apply to anybody" — kills filler
- A hard limit — "maximum 8 rows", "under 200 words"
✅ Check: your constraint line rules out at least one thing the model would otherwise have done by default.
Show it an example (10 min)
The accelerator, and it isn't part of the five — it's the thing that beats all five when you have it.
If you know what good looks like, paste one in. A single worked example teaches the model your standard faster than three paragraphs describing it.
Here's a row from a plan I was happy with last term:
| 3 | Alliances made escalation automatic, not inevitable | Clark ch.7,
mobilisation timetables | Supports thesis: structure, not intent |
Match this level of specificity.This is why "rewrite this in my style, here are three things I've written" works so much better than "write in a casual style." You've replaced an adjective with evidence.
✅ Check: for one of your repeated tasks, you have an example of good output saved somewhere you can paste from.
Turn it into a template you'll reuse (15 min)
Writing all five parts every time is not sustainable, and you don't have to. The point of the structure is that it becomes a file, not a habit.
Create a note called prompts.md. For each job you do repeatedly, save a filled-in version with
blanks:
## Essay plan
ROLE: You are a teacher who has marked [subject] essays for years.
CONTEXT: I'm in [year]. Task: [word count] on [topic]. Marked on
[criteria]. Already read: [ ]. My weak point: [ ].
TASK: Draft an essay plan.
FORMAT: Table. Columns: paragraph, claim, evidence, link to thesis.
No preamble.
CONSTRAINT: Don't write the essay. Don't invent quotes or page numbers.
Flag missing sources instead of filling them in. Max 8 rows.Build three. Pick the three things you'll genuinely do more than once this term — an essay plan, a revision session, code review, a cover letter, meeting notes into actions.
Once a template is good, the next step is to stop pasting it entirely: AI-10 — Build Your Own Assistant turns your best templates into a Project that carries them automatically.
✅ Check: prompts.md exists with three templates in it, and you've used one of them for real.
Six common mistakes
- Politeness instead of specification. "Please could you kindly…" adds nothing. "Maximum 200 words, no preamble" adds a lot.
- Adjectives instead of examples. "Make it engaging" is a wish. A pasted example is an instruction.
- Stacking tasks. Four asks in one message, four shallow answers.
- No constraint line. You get the most typical output, which is the definition of generic.
- Writing the perfect prompt in one go. Iterating in four rounds beats one enormous prompt — and you understand the result, because you watched it change.
- Blaming the model. "It gave me a rubbish answer" is usually "I gave it no context." Before concluding it can't do something, check which of the five parts you left out.
Exercise (35 min, verifiable output)
- Take the baseline prompt and answer you saved in Step 1.
- Rewrite it with all five parts. Use your real situation — real word count, real weakness.
- Run it in a new chat (not the same one — the old context would contaminate the comparison).
- Put the two answers side by side and write down three specific differences. Not "it's better" — which sentence in the second is useful in a way nothing in the first was?
- Now delete the CONTEXT block, run it a third time, and see how much of the gain disappears.
- Build your
prompts.mdwith three templates from Step 8.
✅ Finish check: you have (a) both answers saved, (b) three written differences, (c) a note on what the context block was worth on its own, (d) three reusable templates.
Cheatsheet
THE FIVE PARTS
ROLE who should answer — skip it if you can't say what it changes
CONTEXT who you are · real constraints · what you tried · what you're bad at
TASK one verb, one deliverable
FORMAT the shape: table / steps / length / "no preamble"
CONSTRAINT what it must NOT do
BEATS ALL FIVE
A pasted example of what good looks like
HIGHEST VALUE LINES
"My weak point is ..."
"Don't invent sources or numbers. If unsure, say so."
"Don't give me the answer — make me attempt it first."
"No preamble."
WHEN THE ANSWER IS BAD, CHECK IN THIS ORDER
1. Was there context? (usually this)
2. One task or four?
3. Any constraint at all?
4. Did I iterate, or judge round one?
DON'T BOTHER WITH
flattery · "you are a world-class expert" · please and thank you
as a quality strategy · one giant perfect promptSources
- Anthropic — Prompt engineering guide, Claude documentation
- OpenAI — Prompt engineering guide, platform documentation
- Brown, T. et al. — Language Models are Few-Shot Learners, 2020 (on examples in the prompt)
- Wei, J. et al. — Chain-of-Thought Prompting, 2022 (on why written reasoning improves answers)
Next lesson: SO-22 — Rehearsing with AI: Build a Roleplay Partner (L2) Related: AI-01 What a Language Model Does · AI-07 Hallucination Hunting · AI-10 Build Your Own Assistant Path: The Rehearsal Room — 2/6