Learn AI · Level 1 · Foundations · step 6 of 17

How to write a good AI prompt: the basics, with examples

Updated 28 Oct 2026 · Reviewed every quarter

A chatbot is only as helpful as what you ask it. You don't need special words or a course in prompt engineering: the same few habits work in ChatGPT, Claude, Gemini and Copilot. Here's a four-part recipe, real before-and-after examples, and six prompts you can copy today.

The recipe: four parts of a good prompt

You don't need all four every time. A clear task is enough to start; each part you add makes the answer fit you better.

  1. 1 TaskWhat do you want done?Start with a clear verb: write, explain, compare, plan, summarise.
  2. 2 ContextWho is it for, and why?Add the background a stranger would need, or paste the text you want it to use.
  3. 3 FormatWhat should the answer look like?Say the length, layout and tone: "5 bullet points", "under 100 words", "friendly but firm".
  4. 4 ExampleCan you show what good looks like?Optional, but powerful: paste one example in the style you want.

Google's guide calls these persona, task, context and format; Microsoft's calls them goal, context, expectations and source. The names differ, the idea is the same.

Before and after

The same request, written two ways. Each colour shows which part of the recipe it adds.

An email

Before

Write an email to my landlord about the heating.

After

Write a short, polite email to my landlord asking them to fix the heating. It stopped working on Monday, and I already reported it once by phone. I'd like a repair date this week. Keep it under 120 words, friendly but firm.

TaskContextFormat

The first version leaves the chatbot to guess the problem, the history and the tone. The second gives it the facts it would otherwise make up.

Learning something

Before

Explain inflation.

After

Explain inflation to me like I'm 14 and new to economics. Use one example with prices at a school canteen, avoid jargon, then give me 3 quick questions to check I understood.

TaskContextFormat

Saying who the answer is for sets the level. Asking for check questions turns a lecture into practice.

Planning

Before

Plan a trip to Japan.

After

Plan a 5-day trip to Kyoto in April for two adults who love food and temples but don't like long walks, on about $150 a day each, not counting flights. Give one section per day with morning, afternoon and evening, and flag anything that needs booking ahead.

TaskContextFormat

"Japan" could mean anything. Dates, people, likes and budget let it plan your trip instead of a generic one.

A summary for work

Before

Summarise this.

After

Summarise the report below for my manager, who has two minutes. Use only what is in the report, and say if something important is missing. Give 3 bullet points on what changed, 1 on the biggest risk and 1 recommended next step. Write in the style of this line from last month: "Sales up 4%, driven by the new app; churn flat."

TaskContextFormatExample

Telling it to stick to the pasted report keeps it from filling gaps with guesses, and the example line shows the exact style you want.

7 habits that make a big difference

  • Brief it like a smart new colleague

    It's clever but knows nothing about you or your situation. Anthropic's rule of thumb: if a colleague with no background would be confused by your request, the AI will be too.
  • Paste the source

    For summaries and facts, give it the text, email or report itself, and ask it to use only that. It makes things up far less when the answer is in front of it.Hallucination →
  • Show an example

    One example of the style you like beats a paragraph describing it. This is called few-shot prompting.Few-shot prompting →
  • Ask for steps on tricky problems

    For maths, logic or planning, add "work through it step by step". It helps the model get there, and helps you spot where it went wrong.Chain of thought →
  • Let it ask you questions first

    Not sure what to include? End with "Before you answer, ask me up to 3 questions." It will tell you what it needs.
  • Don't stop at the first answer

    Treat it as a conversation: "shorter", "more formal", "give me 3 other options", "what did you assume?" The second or third reply is usually the good one.
  • Ask it to disagree

    Chatbots tend to agree with you. For plans and drafts, ask "What are the 3 biggest weaknesses?" to get honest feedback instead of praise.

What a good prompt can't fix

  • It can still make things up. A great prompt lowers the risk but never removes it. Check names, numbers, quotes and links before you rely on them. Hallucination →
  • It may not know what's new. Unless it searches the web, it only knows what it learned up to its cutoff date. For anything recent, ask for sources with dates. Knowledge cutoff →
  • Don't paste what you'd regret. Passwords, ID numbers, health records and other people's private details don't belong in a prompt. Remove names when you can. AI and your privacy →
  • There are no magic words. Secret phrases, tips and threats are not what makes prompts work. Clear instructions and good context are.

Six prompts to copy and adapt

Replace the parts in [square brackets] with your own details.

  • Get help writing the prompt

    I want to [your goal]. Before you answer, ask me up to 3 questions that would help you give a better answer.
  • Explain something

    Explain [topic] as if I'm new to it, with one everyday example. Then give me 3 short questions to check I understood.
  • Rewrite a message

    Rewrite the text below so it is clearer and friendlier, for [who will read it]. Keep every fact and keep it under [number] words.
    
    Text: [paste here]
  • Summarise a document

    Summarise the text below in 5 bullet points for [who it is for]. Use only what is in the text, and say if anything important is missing.
    
    Text: [paste here]
  • Compare options

    I'm choosing between [option A] and [option B] for [purpose]. Compare them in a table on cost, effort and risks, then say which you would pick and why.
  • Get honest feedback

    Here is my [plan, draft or idea]. Point out the 3 biggest weaknesses and how to fix each one. Be honest rather than polite.
    
    [paste here]

Based on:Anthropic: prompting best practices · OpenAI: prompt engineering guide · Google: Gemini prompting guide · Microsoft: writing prompts for Copilot

How we put this guide together

The recipe and habits come from the official prompting advice published by the companies that make the main chatbots: Anthropic’s prompting best practices, OpenAI’s prompt engineering guide, Google’s Gemini prompting guide and Microsoft’s guide to writing Copilot prompts. They use different names, but agree on the basics: be clear and specific, give context, say what format you want and show examples. The before-and-after prompts are our own illustrations. We review this page every quarter. Got a prompt that works brilliantly? Tell us.

Learn AI path · Level 1 · Foundations · step 6 of 17

Done? Next stepUsing chatbots well →See all of level 1

← All guides