English.guru
Back

Prompts That Work: Role, Context and Constraints

The structure of a good prompt — role, task, context and constraints — and how to write all four in clear, precise English.

A strong prompt is not a long prompt. It is a prompt that tells the model four things it could otherwise only guess: who it is writing as, what it is doing, why, and within what limits. Most bad outputs come from leaving one of the four out.

The four parts

Part Answers Example
Role who the model should act as Act as an experienced editor.
Task what to do Rewrite this paragraph.
Context what it is working with and for It is the opening of a cover letter for a teaching job.
Constraints the limits — length, tone, format Under 80 words, formal, no clichés.

You do not always need all four. A one-line Summarise this. is fine for a quick task. But when the output matters — a job application, an email to a client, an explanation you will publish — the four parts are the difference between a first draft and a usable one.

Role

The role frames everything that follows. Act as… is the standard opener:

  • Act as a patient tutor and explain this to a complete beginner.
  • Act as a hiring manager and point out the weaknesses in this CV.
  • Act as a proofreader and correct only grammar and spelling.

Role is register — it tells the model which variety of English to use, exactly as you choose your register with a person. Saying act as a lawyer changes the tone more than any instruction about tone could. This is the same skill as register and formality, aimed at a machine.

Task

The task is the imperative, as in writing instructions. State it as a command: rewrite, explain, compare, list. The task is the one part you can never omit.

Context

Context is the information the model cannot see unless you give it. It is the part most people skip, and the part that most improves the answer.

  • Rewrite this paragraph. — the model does not know the paragraph is a cover-letter opening, so it rewrites generically.
  • Rewrite this paragraph. It is the opening of a cover letter for a teaching job. — now it knows the audience and the goal.

Context answers why this is being written and for whom. Give the model the same background you would give a new colleague you were handing the task to.

Constraints

Constraints stop the model from guessing. The most useful are length, tone, format and what to avoid:

  • lengthunder 80 words, three bullet points
  • toneformal, friendly, neutral
  • formatas a table, as a list, with headings
  • avoidno jargon, don't use the word "amazing"

Constraints are where numbers and formats do their work: a model can count words and produce a table, but it can only guess at "not too long".

The four parts in one prompt

Weak:

Write a reply to this email.

Strong:

Act as a customer-success manager. Reply to this complaint email. The customer is upset that their order arrived late and wants a refund. Keep it under 100 words, apologetic but firm — offer a replacement instead of a refund.

Every part is present: role (customer-success manager), task (reply), context (late order, wants a refund), constraints (under 100 words, apologetic but firm, offer a replacement). The weak version gets a plausible email that could be for any complaint; the strong version gets the specific one the situation calls for.

The model cannot ask you questions. When a human colleague finds a task unclear, they ask. A model does not — it guesses and gives you a confident-looking answer built on the guess. So the four parts are how you ask the questions for it.

Test yourself

The quiz below checks the four parts and which one is missing in a prompt.

Test yourself: Quiz: Prompts That Work →