Skip to content

ResourcesArticles

How to write a good AI prompt: a step-by-step guide

How to write a good prompt for ChatGPT, Claude or Gemini: say who it's for, name the task, set the limits and format. Six steps from the makers' guides.

By Jason Nguyen, and OggyUpdated 6 min read
Gemini's home screen, headed Meet Gemini, your personal AI assistant, above the Ask Gemini box
Picture: Gemini's homepage
Short answer

To write a good prompt, explain who the answer is for and why, name the task plainly, then set the limits and format. Add an example when a style is hard to describe, and refine the reply with follow-up messages. Anthropic, OpenAI and Google all give this advice in their own prompting guides.

What makes a good prompt?

A prompt is the message you send to an AI assistant. A good one supplies the information it can't guess: who the answer is for, what you want made and what a finished result looks like.

Google's guides for Gemini split a prompt into persona, task, context and format. OpenAI's guide for ChatGPT uses goal, context, output and boundaries, while Anthropic's guides for Claude ask for clear instructions, background, exact requirements and examples. All three say you rarely need every part, so use the ones that change the answer.

How to write a good prompt, step by step

Each step below builds on one plain request: Write an email about our new hours.

  1. 01Say who it's for and why. Google calls this the persona and context, and Anthropic suggests briefing the AI like a bright new colleague. Before: “Write an email about our new hours.” After: “We run a small bakery. Write to our regulars, who are mostly parents on the school run.”
  2. 02Name the task with a clear verb. Google's guide says to state the job plainly, such as summarize, write or change the tone. Before: “Can you help with something about our hours?” After: “Write a short email announcing that we open at 8am instead of 7am from March 2.”
  3. 03Set the limits that matter. OpenAI's help article prefers exact numbers to vague words, and both OpenAI and Anthropic say to state what to do, not only what to avoid. Before: “Keep it short and don't sound corporate.” After: “Keep it under 120 words and write the way you'd talk to a regular at the counter.”
  4. 04Describe the output you want. OpenAI suggests saying how you'll use the result, so the assistant picks the right length and order. Before: “Write the email.” After: “Give me a subject line and the body, with the new opening time in the first sentence.”
  5. 05Show an example when words fall short. Anthropic suggests starting with one example and adding more only if needed, while Google's developer guide recommends always including them. Before: “Make it sound like us.” After: “Match the tone and length of this email we sent last spring: [paste it].”
  6. 06Read the reply, then refine. OpenAI's guide says your first prompt doesn't need to be perfect, so ask for the exact change you want instead of starting over. Before: “That's not right, try again.” After: “Make the opening warmer, keep the times as they are and thank people for their patience.”

The finished prompt

Each line below matches one of the six steps. Paste them as one message, without the labels:

  • Who and why: We run a small bakery, and our regulars are mostly parents on the school run.
  • Task: Write a short email announcing that we open at 8am instead of 7am from March 2.
  • Limits: Keep it under 120 words and write the way you'd talk to a regular at the counter.
  • Format: Give me a subject line and the body, with the new time in the first sentence.
  • Example: Match the tone of this email we sent last spring: [paste it].
  • Safety net: If a detail is missing, ask me rather than guess.

That last line follows Anthropic and OpenAI, which both suggest letting the AI admit what it doesn't know instead of guessing.

Do ChatGPT, Claude and Gemini need different prompts?

Mostly, no: the six steps work in all three assistants, although each maker's guide emphasizes different habits. If you're still choosing one, our ChatGPT vs Claude vs Gemini comparison covers the plans and limits.

1. ChatGPT: start with the result, then add boundaries

OpenAI's ChatGPT guide says to describe the result you need rather than a list of steps. Then add one or two boundaries where a mistake would be costly, such as figures that must stay the same. For important work, it suggests asking ChatGPT to check its result before it finishes. Preferences you want in every chat belong in custom instructions, under Settings, then Personalization.

ChatGPT's homepage
Picture: ChatGPT's homepage

2. Claude: explain why, and put long material first

Anthropic's guides emphasize the reason behind each instruction, so rather than a bare rule like “no jargon,” add “our readers are new to investing.” Claude can then apply that reason to situations you didn't list. With long documents, put the material first and your question last. Anthropic's docs say this ordering can improve answers by up to 30% on long, multi-document inputs.

Claude's homepage
Picture: Claude's homepage

3. Gemini: four parts, in plain sentences

Google's Gemini guides ask for natural language in full sentences, as if you're talking to a person, and for brief requests without jargon. Its developer guide notes that Gemini 3 models answer briefly and directly by default, so ask outright when you want more detail. If you're stuck, start a message with “Make this a power prompt:” and your draft, and Gemini will suggest a stronger version.

How long should a prompt be?

A prompt should be as long as the task needs, and no longer. OpenAI says a short prompt is often enough for everyday questions, and Anthropic warns that a longer prompt isn't automatically a better one. Save the full brief for work that other people will read.

Save the prompts that work

Once a prompt works, keep it where you can reuse it: custom instructions in ChatGPT, a Gem in Gemini or project instructions in Claude. For a job you repeat with the same steps and files, an agent skill packs the instructions into a folder the assistant loads when needed. To skip the blank page, Recaply's prompt library has written-out prompts sorted by task.

How we checked

On Nov 8, 2026, we read the prompting guides from Anthropic, OpenAI and Google, along with their help articles and developer docs. We haven't run these prompts ourselves, so every tip comes from the makers' pages and the examples are ours. We update this page and its date when the guides change.

Questions people ask

What are the 4 parts of a good prompt?

Google's Gemini guides name persona, task, context and format. OpenAI's ChatGPT guide uses a similar set: goal, context, output and boundaries. Both say to include only the parts that would change the answer.

How do you write a good prompt for ChatGPT?

Start with the result you need, add the context that would change it, then say what format and length you want. OpenAI's guide also suggests one or two boundaries and follow-up messages to refine the reply.

How do you write a good prompt for Claude?

Be clear and direct, explain why each instruction matters and show an example of the output you want. Anthropic's guides also recommend placing long documents above your question, so the question comes last.

Can AI write a prompt for you?

Yes, an assistant can draft a prompt or improve one you've written. Google's Workspace guide suggests starting a message with “Make this a power prompt:” followed by your draft, then checking the result. Anthropic points developers to a prompt generator for a first draft.

What is prompt engineering?

Prompt engineering is the practice of writing and refining instructions so an AI model gives the output you need. For most people, it means the steps above: context, a clear task, limits and a format, then a few rounds of edits.