Guide 1 of 6, 6 min read
How to write a prompt that gets a useful answer
A five-part pattern for writing AI prompts: role, task, context, format and a check. With a before and after example you can copy.
Most weak answers from ChatGPT, Claude or Gemini come from weak questions. The model is not guessing what you mean on purpose. It fills every gap you leave with the most average answer it can find. A good prompt closes those gaps.
This guide gives you a five-part pattern that works for almost any task, then shows it on a real example.
The five parts
- Role. Who should the model act as? "You are an editor for a busy operations team" sets vocabulary, tone and priorities in one line.
- Task. What exactly should it do? Use one verb you could check: rewrite, list, compare, summarise, draft.
- Context. What does it need to know that it cannot see? Your audience, your goal, what you have tried, what must not change.
- Format. What shape should the answer take? Three bullet points, a table with named columns, under 120 words, plain text with no headings.
- Check. How should it test its own work before it answers? "If anything in my draft is unclear, ask me one question first" or "List any claim you are not sure of at the end."
You do not need all five every time. A quick question needs a task and nothing else. The more the answer matters, the more parts you add.
A before and after
Here is a prompt most people would write:
Make this email better.
The model will change the tone, add a greeting you did not want, and probably make it longer. Here is the same request with the five parts:
You are an editor who helps people write short, confident work emails.
Rewrite the email below so it sounds sure of itself without being rude.
Context: it goes to a client who missed two deadlines. I want the next deadline met, and I want to keep the relationship.
Format: keep it under 120 words. Keep my sign-off. No subject line.
Before you answer, check that every sentence asks for something or explains why it matters. Cut any that do not.
Email:
{{EMAIL}}
The second version takes 40 seconds longer to write and saves you three rounds of "no, shorter".
Show, do not only tell
If you care about a particular style, one example beats a paragraph of description. This is called few-shot prompting. Paste a sentence or two you like and say "match the style of this". Models copy patterns far more reliably than they follow adjectives like "punchy" or "professional".
Put the material last
When you paste a long document, email or code file, put your instructions first and the material at the end, inside clear markers such as """ or a line that says "Email:". This keeps the model from mixing your instructions up with the text it is working on. The glossary entry on delimiters explains why this helps.
Ask for a format you can use
If the answer is going into a spreadsheet, ask for a table. If it is going into code, ask for JSON and give the field names. If you need to scan it, ask for bullet points that start with the conclusion. The model can produce almost any shape, but it will not pick the one you need unless you say so. See structured output for more on this.
When the first answer misses
Do not start again from scratch. Reply with what was wrong and what to keep: "Good structure. Too formal. Cut the second paragraph." Short, specific corrections work better than rewriting the whole prompt. If you keep making the same correction, add it to the original prompt so you never need to make it again.
Save the prompts that work
Once a prompt gives you good results, keep it. Replace the parts that change each time with blanks like {{EMAIL}}, and you have a template you can reuse in seconds. Every prompt in the Promptlexity library is written this way, and the prompt improver will turn a rough prompt of yours into one that follows the pattern above.
Quick checklist
- Did I say what the answer is for?
- Did I name one clear task?
- Did I give the context the model cannot see?
- Did I say how long, and in what shape?
- Did I put the pasted material last, clearly marked?
If you can answer yes to all five, your prompt is better than most.