How to Write a Good Prompt for an AI Chatbot

Say what you want, who it’s for and what good looks like. Then treat the first answer as a draft.

Short answer

A good prompt is like a good brief to a colleague: say what you want done, give the background they can’t guess, and describe what a good result looks like — length, tone, format. OpenAI’s own guidance boils down to being clear and specific, then refining: read the first answer, and ask for changes rather than starting over.

In this article 11 sections
  1. Start with the task
  2. Add the context only you know
  3. Show the shape of the answer
  4. Set a boundary or two
  5. Split big jobs into smaller prompts
  6. Refine instead of restarting
  7. Save preferences you repeat
  8. Check what matters
  9. Common mistakes
  10. Common questions
  11. Related guides
A hand holding a smartphone with the ChatGPT app open on the screen
The ChatGPT app keeps your chats in your account unless you change its settings. Photo: Jernej Furman from Slovenia / Wikimedia Commons, CC BY 2.0

Start with the task

Begin with an action verb — summarise, draft, compare, explain, plan. “Tell me about laptops” gives the chatbot nothing to aim at; “Compare three laptops under €800 for a student who edits photos” does. OpenAI, Google and Microsoft all put a clear goal first: Microsoft says a goal is the only part a prompt strictly needs, and everything else makes the answer more specific.1,4,5

You don’t need special syntax. Google suggests writing to Gemini the way you would talk to a colleague, so “Write a training plan for the sales team for a new product launch” works far better than “Training plan.”4

Add the context only you know

The model can’t see your situation. Anthropic compares Claude to a brilliant new employee who doesn't know your norms: the more precisely you explain, the better the result. Its quick test is to imagine handing your prompt to a colleague with no background — if they’d be confused, the chatbot will be too.3

Include the details that change the answer:

  • Who it’s for — your manager, a child, customers.2
  • Why — a decision, a presentation, a complaint. Explaining the reason behind an instruction helps the model aim its reply.3
  • Constraints — budget, word limit, deadline, country.5
  • Source material — paste the email or attach the document you want it to work from instead of describing it, and say what it should take from each source.2

Show the shape of the answer

If you want a table, a list of five, three short paragraphs or a reply under 100 words, say so. Tell the chatbot how you’ll use the result — “a one-page summary my director can scan before the meeting” — so it can pick the right length and level of detail.2 Naming the tone helps too: OpenAI suggests words like formal, friendly or professional.1

If you have a good example of what you want, include it. Anthropic calls examples one of the most reliable ways to steer format, tone and structure.3

Before and after

Vague: “Write an email about the meeting.”

Better: “Write a short, friendly email to my team moving Thursday’s 10:00 meeting to Friday at 14:00 because the room is booked. Ask them to reply if Friday doesn’t work. Under 80 words.”

Microsoft splits a prompt into four parts — goal, context, source and expectations — and gives a holiday example that uses all of them: plan a relaxed three-day city trip for two adults who like food and walking tours, built around the attached flight times, as a day-by-day table.5

Set a boundary or two

Sometimes the most useful line is what the chatbot must not do. OpenAI’s examples include “keep the approved dates and budget figures unchanged” and “use only the supplied sources; flag missing information instead of guessing.”2 One or two boundaries that matter are enough — you don’t need to control every step.2

Split big jobs into smaller prompts

If you need several related things — research, then an outline, then a draft — ask for them one at a time. Google recommends breaking complex tasks into separate prompts so each answer stays focused.4

Refine instead of restarting

Treat the first answer as a draft. Follow-ups like “shorter”, “more formal”, “use simpler words” or “add an example” usually work better than rewriting the whole prompt. OpenAI describes prompting as iterative: start, review the response, then adjust the wording or add context.1 Its newer guidance adds that your first prompt doesn’t need to be perfect — you can add a missing source or change the level of detail without starting over.2 Microsoft says to expect some back-and-forth too.5

A simple checklist

  1. Task: what should it produce?

  2. Context: who is it for, and why?

  3. Input: paste or attach the material it should use.

  4. Format: length, structure and tone.

  5. Boundaries: what must stay unchanged?

  6. Check: read the result and ask for specific changes.

Save preferences you repeat

If you always want British spelling or short answers, you don’t have to type it every time. In ChatGPT, preferences that should apply across chats go in Settings › Personalization as custom instructions; details that only matter for one task belong in the prompt.2

Check what matters

Chatbots can state wrong facts confidently. Google warns that Gemini may suggest inaccurate information and shouldn’t be relied on as medical, legal or financial advice, and Microsoft tells users to review and verify Copilot’s responses.4,5 For important work, ask the chatbot to flag anything it couldn’t verify, then check the result yourself before you share it.2 See Why Does AI Sometimes Make Things Up?

Mind what you paste

Don’t paste passwords, card numbers or other people’s private information into a chatbot. Check your provider’s settings to see how your conversations are stored and used, and read our privacy tips for AI chatbots.

Common mistakes

  • One-word prompts. “Marketing talking points” leaves the model guessing; “12 questions to ask a marketing director about next year’s strategy” doesn’t.4
  • Describing a document instead of sharing it. Paste or attach it.2
  • Cramming five jobs into one message. Split them up.4
  • Starting a new chat after a weak answer. A specific follow-up usually fixes it faster.1

Common questions

Should I tell the chatbot who it is, like "You are a lawyer"?

A role can help set the tone and focus — Anthropic says even a single sentence makes a difference.3 But it doesn’t give the chatbot real expertise. What helps more is your own context: who the answer is for, what you already know, and what you plan to do with it.2

Do longer prompts always work better?

No. A short prompt is often enough for simple questions; add context, format and boundaries when the task is bigger or more important.2

What should I never put in a prompt?

Passwords, full card or bank numbers, ID numbers and other people's private details. Treat a chatbot like any online service, and check its privacy settings before sharing anything sensitive.

Sources and further reading

  1. Prompt engineering best practices for ChatGPT — OpenAI Help Center
  2. Prompting — OpenAI (ChatGPT Learn)
  3. Prompting best practices — Anthropic
  4. Tips to write prompts for Gemini — Google Workspace Learning Center
  5. Get started writing prompts in Microsoft Copilot — Microsoft Support2026-09-01

Was this article helpful?

Tell us where you got stuck

Didn’t work? Tell us which step went wrong. We read every note and use them to fix and improve this guide.

Private. This goes only to the ByteExplained editors with the guide’s title. It isn’t published on the site.

Please don’t include passwords, QR or activation codes, or identifiers such as your phone number, EID or IMEI.

Comments

No comments yet. Questions and tips from readers are welcome.