Writing Clear Prompts: Task, Context, Format & Constraints
Learn the four building blocks of a clear prompt — task, context, format and constraints — and a simple template you can reuse for almost any request.
On this page 9 sections
Introduction
Most disappointing AI answers come from prompts that leave out information the writer had in their head. You know who the email is for, how long the summary should be and what you plan to do with the result — the model does not, unless you say so. A good prompt reads like a clear brief you would give a smart new colleague on their first day.
In this lesson you will learn four building blocks that turn a vague request into a clear one, and a short template you can reuse whenever you are not sure what to write.
- The four building blocks: task, context, format and constraints.
- How to phrase each one so the model can act on it.
- A reusable prompt template for everyday requests.
The Four Building Blocks
| Block | Question it answers | Example |
|---|---|---|
| Task | What should the model do? | Summarise this report. |
| Context | What background does it need? | The readers are busy managers deciding on a budget. |
| Format | What should the answer look like? | Five bullet points, then one recommendation. |
| Constraints | What are the limits and rules? | Under 120 words. No technical jargon. |
Not every prompt needs all four. “Translate this sentence into French” is a complete task on its own. But when an answer disappoints, a missing block is usually the reason — so the four blocks double as a checklist.
Task: Say Exactly What to Do
Start with a clear action verb: summarise, compare, rewrite, list, explain, classify, draft. Avoid open-ended phrases like “thoughts on” or “help with” when you know what you actually want. If you need several things, say so explicitly and number them, because a model will often answer only the first or most obvious question in a long paragraph.
Prefer telling the model what to do over only what not to do. “Write in plain, everyday English” works better than “don’t be too technical”, because it gives the model a target rather than just something to avoid.
Context: Share What the Model Cannot Guess
Context is the background that changes what a good answer looks like: who you are, who the answer is for, why you need it, and any facts the model cannot know — such as your company’s policy, the error message you saw, or the text you want it to work on. A useful test: if a capable person read only your prompt, would they have to ask you a question before starting? If yes, put the answer to that question in the prompt.
When you paste material such as an article or an email, separate it clearly from your instructions, for example with a line saying “Here is the email:” followed by the text, or by wrapping it in tags. Lesson 5 shows the tag technique in detail.
Which building block is this prompt missing most clearly?
Summarise the attached meeting notes for my team.
Format: Describe the Shape of the Answer
Models are good at following formats, so describe the one you want: a numbered list, a table with named columns, a short email with a subject line, three headings, or a single word such as “positive” or “negative”. If the output will be used by a program, the format matters even more — Lesson 5 covers JSON and other structured output.
Length is part of format. Say “in 3 sentences”, “under 100 words” or “one page”, rather than “short” or “detailed”, which mean different things to different people. Numbers are easier to follow than adjectives.
Constraints: Set the Boundaries
Constraints are the rules the answer must respect: tone (friendly, formal), reading level, things to include or exclude, a deadline or budget, a programming language version, or sources to stick to. Keep constraints few and specific; a long list of competing rules can confuse the model, and when two rules conflict it may follow neither well. If one rule matters most, say so.
Context: I run a small bakery and I'm posting on Instagram.Task: Write a caption announcing our new cinnamon rolls.Format: 2 short sentences, then 3 relevant hashtags.Constraints: Warm, friendly tone. Mention they are availableon weekends only. No emojis.A Reusable Template
When you are not sure how to start, fill in this template. The order — context first, then task, then format and constraints — works well because the model reads the background before the instruction that depends on it, and the rules for the answer come right before it starts writing.
Context: [who you are, who it's for, relevant background]Task: [one clear action, or a numbered list of actions]Format: [structure and length of the answer]Constraints: [tone, must include, must avoid, other rules]Put these lines of a prompt into the order of this lesson’s template (Context → Task → Format → Constraints).
- Write a short practice exercise on the SUM function.
- Use simple language and keep it under 80 words.
- Give the exercise as 3 numbered steps followed by the expected answer.
- I teach a beginner Excel class for office staff.
Key Takeaways
- A clear prompt states the task, gives context, describes the format and sets constraints.
- Use action verbs and say what to do, not only what to avoid.
- Give numbers for length instead of words like “short”.
- Keep constraints few, specific and non-conflicting.
Summary
You now have a checklist and a template for clear prompts. Next, you will learn two of the most effective ways to add context: telling the model what role to take and who the answer is for.