← Back to the roundtable

From Vague to Specific

Prompts need to answer decisions. Almost all prompts are built from the same seven parts. Most prompts only need four. By using a combination of these parts, we can build better prompts with higher clarity to get the most out of our token usage.

1. The parts of a prompt

Every prompt is some subset of these seven parts.

1 Task

What to do, and what is true afterward, in a sentence or two.

Add a sign-up screen at /sign-up: a visitor creates an account, then lands on /welcome.

2 Context

The files, the stack and the material to read, fenced so it cannot be read as instructions.

src/features/auth/*, React 18, TypeScript, the shared Field and Button.

3 Constraints

What must hold, and what is out of scope, written as instructions.

Password 12+ characters, message "Use at least 12 characters." No social login.

4 Return

The shape of the answer: format, length, and what to leave out.

One patch, no commentary, nothing outside src/features/auth.

5 Approach

How to work: plan first, one step at a time, ask when a decision is missing.

Read the two files, plan in three bullets, ask before naming anything.

6 Example

One input and the output you want, when the shape of the answer matters.

input: a used email → output: "That email is already registered." above the field.

7 Check

How somebody will judge the answer, ideally by running something.

An empty submit shows both messages; 11 characters sends no request.

2. Which parts each task needs

The task Parts that carry it What you can leave out
(Standard) Build a feature you can already describe 1Task 2Context 3Constraints 4Return 5Approach 7Check The example, unless the format of the answer matters.
Fix something that is broken 1Task (the symptom) 2Context (error and environment) 3Constraints (smallest change) 7Check (the repro) Return, Approach and Example. A diff is understood.
Write copy that matches what exists 1Task (three messages) 2Context (where they appear) 3Constraints (length and limits) 6Example (two existing messages) 7Check (read beside them) Return and Approach: the examples fix the shape, and there is nothing to plan.
Choose between approaches 1Task (the question) 2Context (what is fixed) 3Constraints (no code yet) 4Return (options and tradeoffs) 7Check (your criteria) Example, and code of any kind.
Understand code you did not write 1Task (what you want to do next) 2Context (what you already know) The other five. There is nothing to build or check.
A change with one right answer 1Task 3Constraints ("nothing else") The other five. A brief would cost more than the change.

A part you leave out is a decision you hand over. That is fine when the decision is obvious and cheap to get right, and wrong when it is neither. The cheapest to drop are the example and the return contract. The most expensive is the check, because without it "done" becomes an opinion.

3. Compare a vague prompt with a clear one

Vague The prompt as sent 7 words
Add a sign-up form to my app.

What the model decides for you

  • SignUpForm.jsx, plain JavaScript, in the generic src/components folder
  • four fields, including a confirm password nobody asked for
  • a password rule invented on the spot: 8+ characters, one number
  • POST /signup, but the app serves /api/session/signup
  • alert('Signed up!'), and no navigation away from the form
  • no submitting state, so a double click creates two accounts
  • placeholder labels and a div with onClick
  • no tests at all, so "done" means it looked right once

7 words · 8 decisions handed over

Clear The prompt with the parts filled 147 words
Task: Add a sign-up screen at /sign-up. A visitor creates an account with an email and password, then lands on /welcome.

Context:
<<<
src/features/auth/SignUpPage.tsx and useSignUp.ts, React 18, TypeScript,
the existing Field and Button, the tokens in src/ui/tokens.css.
POST /api/session/signup { email, password } → 201 { userId } | 409 { problem, message }
>>>

Constraints:
password 12+ characters, message "Use at least 12 characters."
email required, message "Enter an email address."
on 409, show the server's message above the form and keep what was typed.
exclude social login, a confirm-password field and a strength meter.

Return: one patch, no commentary, nothing outside src/features/auth.

Approach: read the two files, plan in three bullets, work one step at a time, ask before naming anything new.

Check:
an empty submit shows both messages; 11 characters sends no request;
one click sends one request; a 409 keeps the email.

What each part did

  • Task fixes what "done" means, and what the visitor sees afterward
  • Context names the files, the stack and the response shape
  • Constraints carry both messages, and where the 409 message appears
  • Return keeps the answer small: one patch, nothing else touched
  • Approach makes it plan, step, and ask before inventing anything
  • Check turns "looks right" into four things to run

147 words · 0 decisions left

What changed Not the length. The facts, and their order. Every block in the second prompt fills a part the first one left to the model, and panel 1 names those parts.

4. Build your prompt

The skeleton is the default: the seven parts in the order below, with the blanks left blank. Pick an example to see the same parts filled for a feature, a fault, a decision or a rename, then replace it with your own. The seven rules under the fields say why the order matters.

Nothing is filled yet. The skeleton shows the seven parts and where each one goes. Pick an example to see one filled.

what to do, and what is true afterward
the files, the stack and the material to read; it gets fenced
what must hold, and what is out of scope
format, length, what to leave out
how to work: plan first, ask when a decision is missing
optional; use it when the shape of the answer matters
how somebody will judge the answer, ideally by running something
your prompt skeleton
Task: <what to do, and what is true afterwards>

Context:
<<<
<files, stack, material to read>
>>>

Constraints:
<what must hold>
<what is out of scope>

Return: <format, length, what to leave out>

Approach: <plan first, ask, one step at a time>

Example: <one input and the output you want>

Check: <how the answer will be judged>

seven parts, nothing filled

The order the parts go in

5. Find the vague words

Both panels hold the same prompt. The left is what was sent and the right marks the words that contribute nothing to decision making. No two people would build the same thing from them and the model is not going to be the exception. Replace each one with a fact. The table below shows the swap.

Your prompt

Make the signup page more modern and user-friendly. Add proper validation and handle errors gracefully. Make sure it's responsive and follows best practices.

as sent

What a model has to invent

Make the signup page more modern and user-friendly. Add proper validation and handle errors gracefully. Make sure it's responsive and follows best practices.

6 empty words · replace each one with a fact

The same instruction, said in a way that can be built, or debugged
What got written What the model has to invent What to write instead
"make it modern" a color, a font, a radius, a spacing scale the tokens in src/ui/tokens.css; no new colors, fonts or shadows
"add validation" a rule, a regex, a message, a moment to fire password 12+ characters → "Use at least 12 characters." on blur
"handle errors" which errors, where they appear, what survives 409 → the server's message above the form; the typed email is kept
"make it responsive" a breakpoint, a layout, a minimum target size single column under 600px; 24px gaps; nothing overlaps at 320px
"it doesn't work" which screen, which click, which error, what you expected clicking Submit on /sign-up with a used email leaves the form blank, with no request in the Network tab
"a nice loading state" when it starts, when it ends, what it says submitting → the button reads "Creating account..." and is disabled

The test If two people could build different things from a sentence, it is not a detail. It is a preference. Say the path, the status, the sentence, or the number, and it becomes a requirement.

6. Before you send

What does not help

1 An expert persona

"You are a senior engineer" does not measurably improve answers, and a 2024 comparison found personas can make them worse. Use a role line for tone, if you use one at all.

2 Politeness or threats

Adding stakes or pleading shows small, unstable effects. It is not a substitute for a better instruction, and it costs attention you could spend on the check.

3 A rigid JSON schema

Forcing the answer into strict JSON measurably lowers accuracy on reasoning tasks. Put the shape on the reply, not on the thinking.

The takeaway Structure is the cheap part. Seven parts, one order and a check you can run is most of what the published comparisons support, and none of it needs a clever sentence.

Sources