How to Write a Good AI Prompt
The five parts of a complete prompt (goal, context, task, constraints, output format), with a worked rewrite and a pre-send checklist.
Key takeaways
- A complete prompt states the goal, the context, the task, the constraints and the output format.
- Test a draft by asking whether a capable stranger could do the job from it without asking you anything.
- Paste in source material and separate it clearly from your instructions instead of describing it.
- Attach numbers to length and describe the format you want; "short" and "engaging" give the model nothing to act on.
- Add detail until nothing important is left to guesswork, then stop.
A good AI prompt tells the model five things: what you are trying to achieve, the background it needs, the exact task, the limits it must respect, and the shape of the answer you want back. Write those down in plain sentences, in that order, and most vague or generic replies disappear. Length matters less than completeness: a prompt is finished when a capable stranger could do the job from it without asking you anything.
Start from the stranger test
Anthropic's documentation suggests treating the model like a brilliant new colleague who has no context on your norms, your audience or your project. That framing is the fastest check available. Read your draft and ask: if I handed this to a smart contractor who has never met me, what would they have to guess?
Every guess is a place where the model will fill in the most average answer it can. "Write a product description for our water bottle" forces guesses about the buyer, the tone, the length, which features matter and where the text will appear. None of those are hard for you to state. They are simply missing.
The five parts of a complete prompt
You do not need labels or special syntax for these, although labels help once a prompt grows past a paragraph.
1. Goal
Say what the output is for. "This is going on a product page read by commuters comparing three bottles" changes the answer more than any adjective you could add to the task line. The goal lets the model make sensible decisions about things you did not think to specify.
2. Context
Give the facts the model cannot know: who the audience is, what already exists, what you have tried, the source material it should work from. If you have a document, notes or data, paste them in rather than describing them. OpenAI's guidance describes this as providing reference text, and notes it reduces the chance of invented details because the model is asked to work from what you supplied.
3. Task
State the action with a verb and a scope. "Summarize" is a verb; "summarize the three decisions made and who owns each" is a task. If the work has stages, list them in the order you want them done.
4. Constraints
Constraints are where you prevent the failure you have already seen. Typical ones:
- Length: a word range or a number of items, not "short".
- Sources: "use only the notes below; if something is missing, say so instead of filling the gap".
- Tone and reading level: name the reader, not just the mood.
- Exclusions: what to leave out, such as pricing, competitor names or a recap of the question.
Where you can, phrase a constraint as what to do. "Write in flowing paragraphs" is easier to follow than "don't use bullet points", a point Anthropic's guidance makes about steering format.
5. Output format
Describe what the reply should look like: headings, a numbered list, a table with named columns, JSON with named keys. If the format is fiddly, show a skeleton of it. A format you describe is one you no longer have to fix by hand.
A worked rewrite
Here is the kind of first draft most people type:
Write a product description for our water bottle.
And the same request with the five parts filled in:
I'm writing the product page for a 750 ml insulated steel bottle sold
to cycle commuters. Shoppers on this page are usually comparing two or
three bottles and skim on a phone.
Facts you can use (do not add others):
- Keeps drinks cold for a working day, hot through a morning commute
- Fits standard bike cages
- Leak-proof lid, one-handed opening
- Dishwasher-safe, 10-year warranty
Write the description for the top of the page.
Constraints:
- 70 to 90 words, second person, plain language
- Lead with the benefit a commuter cares about most
- No claims beyond the facts above; no superlatives
Format: one short paragraph, then three bullets of five to eight
words each.
The second version is longer, but every added line removes a guess. Notice that it also contains no flattery, no "act as a world-class copywriter" and no capital letters. Clear information does the work.
Order and layout
When you include long material such as a transcript or report, vendor guidance generally recommends placing the material first and your instructions or question after it, and separating the two clearly. Delimiters do that job: triple quotes, a labeled block or XML-style tags such as <notes> and </notes>. They stop the model mistaking your source text for instructions and make it easy to refer back to "the notes" by name.
For short prompts none of this is needed. Two or three well-formed sentences can carry all five parts.
Common mistakes
- Asking for quality instead of describing it. "Make it engaging" gives the model nothing to act on. Say what engaging means here: opens with a specific problem, uses one concrete example, no preamble.
- Stacking unrelated jobs. A prompt that asks for research, a draft, a title and a social post usually does each one thinly. Split them, or see the guide to prompt chaining.
- Leaving the reader out. The same explanation written for a specialist and for a newcomer are different documents. Name the reader.
- Hiding the important line. If one requirement matters most, put it on its own line rather than in the middle of a paragraph.
- Treating the first reply as final. A first prompt is a draft. When the answer misses, work out which of the five parts was thin and fix that; the guide on improving AI responses walks through the diagnosis.
A checklist before you send
- Could a stranger do this without asking me a question?
- Have I said what the output is for and who reads it?
- Is the source material pasted in, and clearly separated from my instructions?
- Is there a number attached to length?
- Have I said what the reply should look like?
- Is there anything I would be annoyed to see in the answer that I have not ruled out?
If you would rather fill in fields than write from a blank page, the prompt builder assembles these parts for you, and the library's structured prompts, such as the blog writing prompt or the meeting notes prompt, show the same pattern applied to specific jobs.
How much is too much
Add detail until the stranger test passes, then stop. Extra background that does not affect the answer dilutes the instructions that do, and a constraint you do not care about is one more thing the model may over-apply. When you find yourself writing the same long prompt repeatedly, that is the signal to turn it into a reusable template with blanks, which is covered in prompt templates vs prompts.
Prompts that put this into practice
Content Writing
Blog Post Writing Prompt
Turns your own notes and experience into a focused blog post with one clear argument, and marks every spot where it needs a real example or a fact check.
- ChatGPT
- Claude
- Gemini
Productivity
Meeting Notes to Decisions and Actions Prompt
Converts a transcript or rough notes into decisions, owned action items and open questions, without assigning anything the meeting did not.
- ChatGPT
- Claude
- Gemini
E-commerce
Product Description Prompt
Writes a title, description, detail bullets and meta description from your product facts only, with a fact-check table and a list of what is missing.
- ChatGPT
- Claude
- Gemini
Content Writing
Professional Email Prompt
Drafts a single work email that leads with the ask, suits the relationship, and leaves bracketed blanks for any detail you did not provide.
- ChatGPT
- Claude
- Gemini
Keep reading
Guide
How to Improve AI Responses
A diagnostic approach to weak AI answers: name the fault, trace it to the gap in your prompt, then follow up precisely or rewrite and start again.
Guide
Prompt Templates vs Prompts: What Is the Difference?
A prompt is one complete request; a template is a reusable prompt with named variables. When to use each and how to turn one into the other.
Guide
What Is Prompt Engineering? Core Techniques Explained
What prompt engineering is, the techniques the major model vendors agree on, the working loop behind them, and what prompting cannot fix.
Sources and references
- Prompt engineering overview — Anthropic
- Prompt engineering guide — OpenAI
- Prompt design strategies — Google AI for Developers