How to Write a Good AI Prompt: Checklist with Before/After Examples

A good AI prompt gives the model what a capable new colleague would need: the task, the facts, who the result is for and what shape it should take. Most weak prompts are not badly worded. They are missing information, so the AI fills the gaps with generic guesses.

OpenAI, Anthropic and Google all publish prompting guides for their own models, and they agree on the basics. The checklist below is built from those guides rather than from tips collected elsewhere, followed by three before/after examples from ordinary office work and a measured look at whether longer prompts cost more.

The checklist

Run through these eight points before you press Enter. Short tasks need only the first four.

  1. State the task in one sentence. “Write a reply”, “Summarise for”, “Compare these”. Google’s Gemini guide starts with giving the model clear and specific instructions (Google).
  2. Give the facts it cannot know. Names, dates, numbers, what has been decided. Google warns against assuming the model has all of the required information, and its Workspace guide says the more context you give, the better the response (Workspace tips).
  3. Say who will read it. A customer, your manager, new staff. Audience sets vocabulary and length.
  4. Specify the format. Length limit, bullet list or table, subject line or not. Google lists response format as its own step.
  5. Explain why a rule matters. Anthropic’s guide says giving the reason behind an instruction helps Claude deliver more targeted responses (Anthropic). “Under 100 words, because it will be read on a phone” works better than “under 100 words”.
  6. Separate instructions from pasted material. Use quotes, headings or tags. OpenAI suggests Markdown headings and XML tags to mark where content such as a reference document begins and ends (OpenAI).
  7. Show an example if the format is unusual. Anthropic suggests three to five examples for best results. Google advises varied examples with consistent formatting, and notes that too many can lead the model to copy them too closely.
  8. Put long documents first and the question last. Anthropic says placing long inputs above the query can improve response quality by up to 30 percent in its tests, especially with complex, multi-document inputs.

Anthropic also offers a quick test: show your prompt to a colleague with minimal context on the task. If they would be confused, the model will be too.

Before and after: three office examples

1. Late order email

Before (10 words):

Write an email to a customer about their late order.

What you get: a polite, generic apology with placeholders like [Customer Name] and [new date], and often an offer of a discount you never agreed to. You then spend longer editing than writing.

After (107 words):

You are writing on behalf of Harbor Print Co., a small print shop.
Task: write a short apology email to a customer whose order is late.
Context:
- Customer: Maria Chen, order #4471, 500 business cards.
- Promised delivery: Tuesday 3 November. New delivery: Friday 6 November.
- Cause: our cutting machine broke down; it is now repaired.
- We will refund the $12 express shipping fee.
Requirements:
- Under 120 words. Plain, friendly tone. No exaggerated apologies.
- Say what happened, the new date, and the refund, in that order.
- End with a direct phone number placeholder: [PHONE].
Output: subject line, then the email body.

What to expect: a subject line naming the order, three short paragraphs in the order you asked, and the correct dates and refund amount. What to check: that both dates and the $12 figure match your records, and that no extra offer has appeared.

2. Report summary

Before: Summarise this report.

After:

Summarise the report below for our operations manager, who has five minutes.
Give: the 3 findings that affect staffing, any figure with its page number,
and one line on what the report does not cover.
Use bullet points. Do not add recommendations of your own.
"""
[PASTE REPORT]
"""

The “before” version produces a balanced overview of everything. The “after” version produces a short list filtered to one decision. Asking for page numbers lets you check each figure against the source.

3. Spreadsheet help

Before: How do I add up sales by region?

After:

Google Sheets. Column B = Region, column E = Amount, rows 2 to 500.
In H2 I want total Amount where Region is "North" and column F is "Paid".
Give the formula and explain each argument in one line.

The “before” version gets a general tutorial. The “after” version gets one formula you can paste, such as =SUMIFS(E2:E500,B2:B500,"North",F2:F500,"Paid"). Our spreadsheet guide shows how to test formulas like this on known answers.

Does a longer prompt cost more?

On a flat subscription (ChatGPT Plus, Claude Pro, Google AI Pro), no: you pay the same monthly price however long your prompts are, within the plan’s usage limits. On the API, every input token is billed, so we measured it.

We counted both versions of the late-order prompt with OpenAI’s tiktoken library (o200k_base encoding):

PromptWordsTokens
Before1011
After107147
Difference97136

On GPT-6.1 Sol at $2 per million input tokens (OpenAI API pricing):

Claude models use a different tokenizer. Anthropic states that Claude 4.7 and later produce about 30% more tokens for the same text, so on Claude Sonnet 5.5 (also $2 per million input) the same extra text is roughly 136 × 1.3 = 177 tokens, or about $3.54 for 10,000 requests. That is an estimate, not a measured count.

The bigger cost question is reusable instructions. A 2,000-token set of standing instructions sent with 10,000 requests a month is 20 million input tokens: 20 × $2 = $40. If the provider’s prompt caching applies, GPT-6.1 Sol’s cached input price of $0.10 per million brings the cached part to 20 × $0.10 = $2. The extra 136 tokens that made the email usable are small next to that, and they are cheaper than the minutes spent fixing a generic draft.

To turn a vague idea into a structured prompt, try Idea → Prompt or browse the prompt library. To convert words into tokens, see How many words is a token?.

Check the answer, then fix the prompt

A good prompt reduces errors but does not remove them. Check every fact the draft contains against your source, especially dates, money and commitments. When the output is wrong in the same way twice, fix the prompt rather than the output: add the missing fact or the rule that was broken. Once a prompt works, save it. Our office prompt templates are a starting library you can copy and edit.

Frequently asked questions

What is the single most useful change to a weak prompt?

Adding the facts the AI cannot know, such as names, dates, numbers and what has already been decided. Google's Gemini guide warns against assuming the model has all of the required information.

Is a longer prompt always better?

No. Longer is better only when the extra words are facts, constraints or format instructions. Our improved example went from 11 to 147 tokens, and every added line answered a question the AI would otherwise have guessed.

How much does a longer prompt cost?

On a subscription, nothing extra. On the API, our 136 extra tokens cost $0.000272 per request on a $2-per-million-token model, or $2.72 for 10,000 requests.

Should I use XML tags or headings in prompts?

For long prompts that mix instructions and pasted material, yes. Anthropic says XML tags help Claude parse complex prompts, and OpenAI suggests Markdown headings and XML tags to mark sections.

How many examples should I include?

Anthropic suggests three to five examples for best results. Google advises varied examples with consistent formatting, and warns that too many can make the model copy them too closely.

Sources

Written by Editorial team · Last updated: · Facts last verified: · Editorial policy