How to write good AI prompts: examples, bad vs good

8 min read, checked 2026-10-30, by Cat Form

Short answer

A prompt is the instruction you type to an AI. To write a good one, say who will read the result, what the situation is, what you want, and what format and length you want back. Anthropic, OpenAI and Google all recommend the same basics in their guides: clear instructions, background, examples and a stated format. Do not try to get it perfect in one go. Read the answer and ask for changes.

Five things to tell it

The AI does not know your situation. Give it what you would give a person you were handing the job to.

  • You do not need all five every time. If an answer is off, add whichever one is missing.
  • "Do this" works better than "don't do that". Instead of "don't be long", say "in three sentences".
  • Role

    What to write
    What viewpoint it should answer from
    Example
    Like a careful assistant, like a grade-school teacher
  • Situation

    What to write
    Background and who will read it
    Example
    An apology email to a client
  • Result wanted

    What to write
    What you want made
    Example
    A 3-line summary, a schedule, a draft
  • Format

    What to write
    Table, list, paragraphs, tone
    Example
    As a table, in a friendly tone
  • Length

    What to write
    Size or number of items
    Example
    Under 150 words, 5 items only

Bad vs. good prompts

The good versions are longer because they leave less for the AI to guess. The point is not length. It is filling in the missing information.

  • Write an email

    What is missing
    To whom, and about what
    Good
    Write a polite 5-sentence email to my landlord, Jordan Lee, asking him to fix a leaking kitchen faucet. Mention it started last Tuesday.
  • Summarize this

    What is missing
    Who reads it, how long
    Good
    Summarize the text below in 3 bullet points a busy manager could read in 30 seconds.
  • Plan a trip

    What is missing
    Group size, length, tastes
    Good
    Plan a 3-day trip to Lisbon for me and my parents. They cannot walk far, so include only two places per day.
  • How to switch cat food

    What is missing
    Situation and format
    Good
    Make a 7-day schedule, as a table, for switching my cat to a new food.

Copy-and-paste example: email

Email to a landlord
You are a polite, practical assistant. Write an email to my landlord, Jordan Lee. The kitchen faucet in apartment 4B has been leaking since last Tuesday. I would like it repaired this week and I am available after 5 pm on weekdays. Keep it friendly and professional, under 120 words, and include a subject line.

Change the names and details to match your situation. Check dates and facts before you send.

Copy-and-paste example: summaries and homework

Summarize a PDF or long text
Read the text below and give me (1) a 3-bullet summary, (2) a list of things I need to do, and (3) "not in the text" for anything you cannot find in it. Do not add anything that is not in the text.

[Paste the text here, or attach the PDF]

The "do not add anything" line helps reduce hallucination. For important documents, compare the summary with the original.

Copy-and-paste example: explaining homework

Explain a topic to a child
I need to explain photosynthesis to a fourth grader. Give me one analogy and five sentences in simple words. At the end, add two quiz questions the child can try to answer, with the answers listed separately below.

Use this to help a child understand, not to do the homework for them.

Copy-and-paste example: trip plan

Trip plan
Plan a 3-day trip to Lisbon for me and my two parents. They cannot walk long distances, so include only two places per day. Focus on local food for meals. Give the plan as a table with rough travel times, and mark opening hours and closing days as "needs checking" so I can verify them myself.

Copy-and-paste example: switching a cat's food

Treat the AI's answer as a reference for anything health related. If your cat has diarrhea or vomiting, talk to a vet.

Cat food switch schedule
My 3-year-old cat is switching from her current food to a new one. Make a table for 7 days showing what percentage of old food and new food to mix each day. At the end, add a list titled "Stop switching and call your vet if you see these signs". Use plain language.

The schedule is a general guide. If your cat has a health condition, ask your vet first.

When the answer is not good

  • Ask for specific changes: shorter, simpler, as a table.
  • Show one example of your own writing and say "in this style". The official guides say examples help the AI follow the form you want. Start with one.
  • Split complex jobs. Ask for an outline first, then the full text, one step at a time.
  • Add "if you don't know, say so". It cuts down on guessing.
  • If nothing works, start a new chat and write the prompt again from scratch.

Related terms

Prompt
Everything you type to the AI: the question and the instructions.
Context
The background the AI needs to answer: the situation, the reader, reference material.
Few-shot prompting
Showing examples of the result you want so the AI follows them.

FAQ

Is a longer prompt always better?

No. If you have given the needed information, a short prompt is fine. The official guides say to write as much as is useful and no more.

Do I need to write in a special style?

No. Plain, natural sentences work well. You do not need special keywords.

Do I need to say "you are an expert"?

It is not required. Saying who reads the result, the purpose and the format has a bigger effect. A role mainly helps set the tone.

Can I save prompts I like?

Yes. Keep the ones that work in a notes app or document and swap out the [bracketed] parts. Some apps also have projects or custom instructions for this.

Keep going

Checked against sources on 2026-10-30. Sources: Anthropic, Best practices for prompt engineering, Anthropic, Prompt engineering overview, OpenAI, Prompt engineering, Google, Gemini API prompting strategies. How we write

Read next