MARJ
SIGN IN
IL1checked 2d ago
I · Using AIAI-0415 MIN

The Anatomy of a Prompt

Your own five-part prompt template, plus three saved templates for jobs you actually repeat
Before this

⚠️ 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.


Step 01

Get your baseline (5 min)

Before learning the structure, produce something bad on purpose. You'll need it for comparison.

  1. Think of a real task you actually have this week — an assignment, an email, a plan.
  2. Ask for it the way most people would. One line. No context.

    "help me write my history essay"

  3. 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.


Step 02

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.


Step 03

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 constraintsword count, deadline, budget, tools available
What you've already triedstops it suggesting the thing you did yesterday
What you're bad atthe 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.


Step 04

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.


Step 05

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.


Step 06

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.


Step 07

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.


Step 08

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

  1. Politeness instead of specification. "Please could you kindly…" adds nothing. "Maximum 200 words, no preamble" adds a lot.
  2. Adjectives instead of examples. "Make it engaging" is a wish. A pasted example is an instruction.
  3. Stacking tasks. Four asks in one message, four shallow answers.
  4. No constraint line. You get the most typical output, which is the definition of generic.
  5. 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.
  6. 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)

  1. Take the baseline prompt and answer you saved in Step 1.
  2. Rewrite it with all five parts. Use your real situation — real word count, real weakness.
  3. Run it in a new chat (not the same one — the old context would contaminate the comparison).
  4. 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?
  5. Now delete the CONTEXT block, run it a third time, and see how much of the gain disappears.
  6. Build your prompts.md with 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 prompt

Sources

  1. Anthropic — Prompt engineering guide, Claude documentation
  2. OpenAI — Prompt engineering guide, platform documentation
  3. Brown, T. et al. — Language Models are Few-Shot Learners, 2020 (on examples in the prompt)
  4. 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

Mark it when you've got the output in hand.

← All Using AI lessons