Part of the guide: Claude vs ChatGPT (and Gemini): which AI should you pay for?

How to write a prompt for AI: a simple formula, with before and after examples

Written by Jeff Pascal · Updated · 5 minute read

In short

  • A good prompt gives the AI four things: who it writes as (or for), the task, the facts it needs, and what the result should look like.
  • Two additions help most: say why you want it, and paste one example of a good result.
  • Put long pasted text between clear markers, say what to do rather than only what to avoid, and fix a weak answer by adding what was missing to the prompt.
  • The same rules work in ChatGPT, Claude and Gemini; they come from the official guides of OpenAI, Anthropic and Google.

To write a good AI prompt, tell the model four things: who it writes as, what the task is, the facts it needs, and what the result should look like. Add why you want it and one example of a good result, and ChatGPT, Claude or Gemini will usually give you something you can use on the first try.

The formula below comes from the official prompting guides of Google, Anthropic and OpenAI, which we read on 17 November 2026. The examples are everyday small-business jobs: a customer reply, a quote follow-up, a review response.

The formula: Persona, Task, Context, Format

Google's guide for Gemini splits a prompt into four parts and says you do not need all four every time; a few already help. (Google, Prompting guide 101)

Part The question it answers Example
Persona Who is writing, or for whom? "You are the office manager of a dental practice."
Task What should it do? "Write a reply to the patient email below."
Context Which facts does it need? "We have openings Tuesday and Thursday mornings. Cleaning is covered by most insurance plans."
Format What should the result look like? "Under 6 lines, friendly, end with our phone number."

Read your prompt as if you were a new colleague who knows nothing about the job. Anthropic suggests the same test: if a colleague would be confused, the model will be too. (Anthropic, Prompting best practices)

Before and after: three business examples

A customer reply

  • Before: "Reply to this customer."
  • After: "You answer emails for a heating and air-conditioning company. Reply to the customer below, who asked for a quote for two units. Tell them the quote comes Thursday because we are waiting for the supplier's price, and ask for two photos of the wall where the units go. Five lines at most, no prices."

A review response

  • Before: "Write a response to this bad review."
  • After: "You manage the Google reviews for a family bakery. Write a reply to the 2-star review below about a late cake order. Apologize once, say we have added a second pickup slot on Saturdays, and invite them to ask for Emma next time. Under 80 words. Do not argue with the customer's account."

Meeting notes into actions

  • Before: "Summarize this."
  • After: "Below are my notes from a call with a client. List the decisions, then the tasks as a table with owner and due date. If a task has no owner in the notes, write 'unassigned'. Nothing else."

The "after" versions are longer only by the facts the model could not guess.

Six habits that make prompts better

1. Say why

Anthropic writes that the reason behind an instruction helps the model understand your goal. "No jargon, because our customers are homeowners, not engineers" works better than "No jargon".

2. Show an example

Anthropic writes that a few well-chosen examples improve accuracy and consistency and suggests 3 to 5 for the best results. OpenAI also says to show the format you want through examples. (OpenAI, best practices) In practice, paste two emails you sent that worked and add "Write in the same style."

3. Keep pasted text apart from your instructions

When you paste a long email, contract or report, wrap it in clear markers. OpenAI suggests ### or triple quotes; Anthropic suggests tags such as <contract> and </contract>, with the long document first and your question at the end. In Anthropic's tests, putting the question at the end improved answers by up to 30 percent.

4. Say what to do, not only what to avoid

OpenAI advises saying what to do instead of only what not to do. "Don't be formal" leaves the model guessing. "Write the way you talk to a long-time customer, in short sentences" does not.

5. Name the format

Length, structure and tone: "a table with three columns", "five bullet points", "under 100 words". Without it, you get whatever length the model picks.

6. Fix the prompt, not only the answer

If you have to change more than one sentence of the answer, something was missing from the prompt. Add it (a fact, an example, a rule) and ask again. Google recommends follow-up prompts to review and refine. Anthropic describes a self-correction loop: a draft, a review against your criteria, then a better version.

A template to copy

You are [role] at [type of business]. We write to [audience]. Tone: [tone].

Task: [one sentence, starting with a verb].

Why: [what the result is for].

Facts:
- [fact 1]
- [fact 2]

Format: [length, structure, how it ends].

Example of a good result:
"""
[paste one you liked]
"""

<input>
[paste the email, notes or document here]
</input>

Save every prompt that works in a shared document. Next time the job comes up, you start from a version that already works.

When a prompt still gives you a bland answer and you want a second pair of eyes, bring it to my WhatsApp community, Team of One. I run it for people learning to stretch what they can do with AI.

Prompts for ChatGPT, Claude and Gemini

The rules are the same; the three vendors' guides agree on the main points. Small differences in what each guide suggests:

  • ChatGPT: OpenAI suggests ### or triple quotes around pasted text and specific, descriptive instructions about length, format and style.
  • Claude: Anthropic suggests XML-style tags such as <document> around long texts and putting the long document before the question.
  • Gemini: Google's four-part formula (Persona, Task, Context, Format), with follow-up prompts to refine.

Which assistant to use in the first place: Claude vs ChatGPT (and Gemini). Why long prompts and long chats use up your plan faster: what is a token in AI.

Before you paste anything

On free and personal plans, do not paste customers' personal data: your chats can be used to train the models unless you opt out. Use a business plan for customer data. The details: is ChatGPT GDPR compliant?

Questions

What is the best formula for an AI prompt?

Google's guide uses four parts: Persona, Task, Context, Format. Anthropic and OpenAI add two habits that help most: give the reason behind the request, and show an example of the result you want.

How do I write a prompt for ChatGPT?

The same way as for Claude or Gemini. Say who it writes as, what to do, the facts it needs and the format you want. OpenAI suggests marking pasted text with ### or triple quotes so it is kept apart from your instructions.

How long should a prompt be?

As long as the facts the task needs, and no longer. OpenAI advises cutting "fluffy" and imprecise descriptions. A three-line prompt with the right facts beats a page of vague instructions.

What is prompt engineering, for beginners?

OpenAI defines it as "the process of writing effective instructions for a model". For a beginner it means giving clear context, one example, and the format you want.

Can I write prompts in a language other than English?

Yes. ChatGPT, Claude and Gemini understand many languages. Ask for the answer in the language you want, and give an example written in your own style.

Sources

  1. Anthropic: Prompting best practices: clear instructions, context and motivation, 3 to 5 examples, XML tags, long documents first, self-correction, checked 17 November 2026
  2. OpenAI Help Center: Best practices for prompt engineering with the OpenAI API: be specific, show the format with examples, separators, say what to do, checked 17 November 2026
  3. OpenAI: Prompt engineering guide: definition, checked 17 November 2026
  4. Google Workspace: Prompting guide 101: writing effective prompts (Persona, Task, Context, Format; follow-up prompts), checked 17 November 2026

Free WhatsApp community

Learning AI? Learn it on real work.

In “Team of one” I post what I actually tried on my own work. Most of it is in Romanian, but ask in English any time and we will work it out together.

Join the community