Prompt Engineering Formula Sheet
The five prompt dimensions and five agent dimensions from the course — crisp rules, copy-paste templates, and a pre-submit checklist, all on one printable page.
Companion to the free Prompt Engineering video course. Templates are original — fill in the [brackets] and paste into any AI assistant.
§1. Vague vs. precise — the 30-second lesson
Every dimension fixes one way a vague prompt fails. Read each pair left to right:
| Dimension | Vague | Precise |
|---|---|---|
| Role | Vague“Help me with my essay.” | Precise“You are a college writing tutor. Coach me through a 500-word argumentative essay for a freshman composition class.” |
| Context | Vague“Explain photosynthesis.” | Precise“Explain photosynthesis to a 10-year-old who loves cooking, using one analogy to something in a kitchen. She already knows plants need sunlight.” |
| Constraints | Vague“Write something short about study habits.” | Precise“Under 80 words, warm and encouraging, no jargon, for a high-schooler who hates studying.” |
| Format | Vague“Tell me about the Roman Empire.” | Precise“Two labeled sections — ‘Why it rose’ and ‘Why it fell’ — each with exactly 3 bullet points, then one closing sentence.” |
| Examples | Vague“Write a friendly school notice.” | Precise“Match this style: ‘Quick heads-up: the gym closes this Friday for floor repairs — back to normal on Monday!’ Now write the notice about the library.” |
§2. The 5 prompt dimensions
What the Prompt Simulator scores 0–2 each, out of 10. Fill the [brackets], copy, paste.
1Role — give the AI a job title
A role sets expertise, vocabulary, and tone before the AI reads your task. “You are a…” activates specialist patterns instead of generic ones. Always name your audience too, so the role knows who it is talking to.
You are a [job title] with [years] of experience in [field]. Advise me as if I am [audience] who needs [goal].
2Context — supply the background
Context is everything the answer depends on that the AI cannot see: who you are, the situation, the key facts, what you already know. Without it, the AI guesses — and guessed context is wrong context.
Background: [who you are / what the situation is]. Key facts: [2-3 facts the answer depends on]. I already know: [so it is not repeated].
3Constraints — set the limits
Boundaries turn a decent answer into the exact answer: a length cap, the tone, the reading level, and what to avoid. Constraints are the cheapest dimension — one sentence, and rambling answers shrink to fit.
Keep it under [N words]. Tone: [warm / formal / playful / direct]. Reading level: [10-year-old / high-school / undergrad / expert]. Do NOT: [jargon / buzzwords / repeating the question].
4Format — describe the answer's shape
Tell the AI how to lay out the answer — sections, headings, bullets, numbered steps, how it ends. If you skip format, the AI picks its own structure, and its default is a wall of paragraphs.
Structure your answer as: 1. [Section one — what it covers] 2. [Section two — what it covers] End with: [one-line summary / checklist / next step].
5Examples — show, don't just tell
One example of “good” steers tone and structure better than a paragraph of instructions. Few-shot prompting is just that: paste one sample of the style you want, then point at your task.
Match the style of this example: "[paste one example of the tone/structure you want]" Now do the same for: [your task].
★Master template — all five at once
The full five-dimension prompt in one paste. Use it for anything important; delete the lines a task doesn't need.
You are a [role]. I am [audience] who needs [goal]. Context: [situation + 2-3 key facts]. I already know [X]. Constraints: under [N words], [tone], [reading level]. Do NOT [avoid]. Format: [sections]; end with [summary / checklist]. Example to match: "[example]". Task: [what you want].
§3. The 5 agent dimensions
What the Agent Simulator scores 0–2 each, out of 10. Prompt dimensions improve one answer; these make a multi-step loop reliable. One giant prompt is one giant failure point — split it.
1Planning — split the job into steps
Break the goal into a numbered loop — research → compare → act — where each step produces exactly what the next step needs. After every step, check: did it produce the handoff? Branch first, then prune; never bet the trip on one option.
Break [goal] into a numbered loop: 1. [step] → produces [handoff the next step needs] 2. [step] → produces [handoff the next step needs] 3. [step] → produces [final result] After each step, check: did it produce what the next step needs?
2Tools — name the tool per step
Say exactly which capability each step may use: search, then calculate, then email. The right tool per step — never let the agent guess a number it could look up, or skip a tool when its step errors.
Step 1 may use: [search / calculator / email / ...] Step 2 may use: [...] Never [guess a number from memory] when a tool can answer it. If a tool errors, [retry once / move to the next option] — never skip the step.
3Recovery — define the fallback
Recovery is not retrying the same move — it is replanning with what you learned. Name the exact trigger that forces a replan, and what happens when any fragile step fails.
If [step] fails, then: [fallback — try the next option / save a draft / report it]. REPLAN TRIGGER: if [condition, e.g. running total exceeds budget], stop and re-branch from the remaining options. Never retry the same failed move twice.
4Guardrails — set the hard limits
Budget caps, minimum quality bars, and never-guess rules. Guardrails prune bad options before they cost you: verify the seller before recommending, and let UNCLEAR beat a wrong answer.
Rules that are never broken: - Budget cap: [amount] - Minimum quality bar: [rating / criteria] - Verify [seller / source] before acting. - When unsure, say UNCLEAR — never guess.
5Output — make every step checkable
Define each step's handoff to the next and what the final delivery looks like. A step is not done until you can verify it produced what the next step needs.
Each step ends with a verifiable result: [table / file / confirmation]. Final delivery: [format], checked against: [success criteria]. Report anything skipped or uncertain at the end.
★Agent design template — all five at once
The full five-dimension agent brief. Use it before asking an AI agent to run a multi-step job.
GOAL: [what the agent must achieve]. PLAN — numbered loop, each step with its handoff: 1. [step] → [handoff] 2. [step] → [handoff] 3. [step] → [result] TOOLS per step: [tool for step 1], [tool for step 2], ... RECOVERY: if [step] fails → [fallback]. REPLAN TRIGGER: [condition]. GUARDRAILS: budget [cap]; quality bar [bar]; verify [source]; never guess — say UNCLEAR. OUTPUT: final delivery as [format]; verify each step's handoff before continuing.
§4. Pre-submit checklist — before you send
Run any important prompt through these ten questions. Every “no” is one dimension to add.
- Role: did I give the AI a job title — “You are a…”?
- Context: would a stranger understand the situation from my prompt alone?
- Constraints: did I set a length limit, a tone, and a reading level?
- Format: did I describe the answer's structure — sections, bullets, how it ends?
- Examples: did I show one example of what “good” looks like?
- Planning: is the job split into numbered steps, not one mega-prompt?
- Tools: did I name which tool each step may use?
- Recovery: does every fragile step have a named fallback and a replan trigger?
- Guardrails: are the hard limits written down — budget, quality bar, never-guess?
- Output: can I check whether each step produced what the next step needs?
Scoring rule of thumb from the simulators: each prompt dimension is worth up to 2 points of 10. Two missing dimensions is already a failing prompt.
How to use this cheat sheet
- Learn the pairs — read the vague vs. precise table once. It is the whole course in five rows.
- Copy a template — hit “Copy template” on any dimension, fill in the [brackets], paste into any AI assistant.
- Use the master templates for anything important — one for single answers, one for multi-step agent jobs.
- Run the checklist before sending anything that matters — every “no” tells you which dimension to add.
- Practice — write prompts for 18 real scenarios in the Prompt Simulator (scored 0–10 per dimension), then design agent loops in the Agent Simulator.
- Print it — hit “Print this sheet” above; the print stylesheet renders an ink-friendly paper version.
Reference page — no AI runs here. These are the same five prompt dimensions and five agent dimensions scored by the course simulators, condensed into templates. For full practice with per-dimension feedback, use the simulators.
Frequently asked questions
What is the one formula for a better prompt?
Role + context + constraints + format + one example. Those are the five dimensions the Prompt Simulator scores: give the AI a job title, supply the background, set limits, describe the answer's structure, and show one example of what good looks like. Each dimension you add removes one way the answer can miss.
Do I need all five dimensions in every prompt?
No. Role and context fix most vague prompts by themselves. Add constraints when answers ramble or drift in tone, format when the layout of the answer matters, and an example when you need a specific style. Short prompts are fine — the checklist on this page tells you which dimension a failing prompt is missing.
How are the agent dimensions different from the prompt dimensions?
Prompt dimensions improve a single answer: what the AI knows and how it responds. Agent dimensions, scored by the Agent Simulator, improve a multi-step loop: planning (split the job into steps), tools (name the tool per step), recovery (define the fallback), guardrails (set the hard limits), and output (make each step verifiable). One mega-prompt is one giant failure point — agents earn reliability from the loop, not the wording.
Why does starting with "You are a…" work?
A role sets the AI's expertise, vocabulary, and tone before it reads your task. "You are a college writing tutor" activates different patterns than a blank request — the same task gets specialist-level detail instead of a generic answer. Pair it with the audience ("I am a freshman") and the role knows exactly who it is talking to.
Can I print this cheat sheet?
Yes. Use your browser's Print option (Ctrl+P / Cmd+P) or the Print button at the top of the page. The print stylesheet hides the navigation, footer, buttons, and cross-promotion sections and renders the sheet ink-friendly in black and white, so it comes out clean on paper.
Where can I practice these dimensions?
The Prompt Simulator lets you write prompts for 18 practice scenarios and scores each of the 5 prompt dimensions 0-2 for a total out of 10. The Agent Simulator scores the 5 agent dimensions the same way and ends with a printable course certificate. Both are free, with no account and no AI running.
More from the codex
Prompt Simulator
Practice prompt engineering: write prompts for 18 scenarios, get scored 0–10 per dimension.
Open tool → LiveAgent Simulator
Practice AI agent design: design loops or walk the loop turn by turn, earn the course certificate.
Open tool → LiveFormula Sheet Builder
Build a printable formula sheet for any class, with exam mode for self-testing.
Open tool → LiveFlashcard Maker
Spaced-repetition flashcards for any subject.
Open tool →Support the codex
This tool is free, with no account and no ads. If it saved you some time, consider supporting the indie dev behind it.
Questions or a bug to report? Email [email protected].