What is a prompt? How to write one that works (with examples)

What a prompt is, which parts a good one has according to Google, weak and effective prompt examples from the OpenAI, Anthropic and Google guides, and what the assistant does with your question before answering.

Published 27 November 2026 — Co-founder of DoGeo, responsible for the technical side of GEO

Short answer

A prompt is the text a person writes to an artificial intelligence assistant, such as ChatGPT, Claude or Gemini, to ask it for something: a question, an instruction or a task with its context. A prompt works best when it says which role the assistant should take, what task is wanted, with what context and in what format, the four areas Google recommends. And the assistant does not search for the prompt as written: when it needs the web, it turns the prompt into one or more shorter searches, which is why two people asking the same thing can get different answers.

What is a prompt

Definition

A prompt is the request you write to an artificial intelligence (AI) assistant so that it does something: answer a question, draft a text, summarise a document or compare options. Everything the assistant knows about what you want comes from the prompt and from the conversation around it.

A simple example: “What should I do with a tax refund I wasn’t expecting?” is a prompt. So is “Summarise this contract in five points for someone who is not a lawyer”, with the contract pasted underneath. The job changes, but in both cases the prompt is all the assistant has to go on.

Google describes a prompt as a conversation starter with your AI assistant, in its guide to writing effective prompts for Gemini. A prompt does not have to be perfect first time: the conversation can continue with another prompt that corrects or extends the first one.

What parts a good prompt has

Structure

A good prompt has up to four parts, according to Google’s guide to writing prompts for Gemini: the persona, the task, the context and the format of the answer. Google points out that you do not need all four in every prompt, but that using a few will help.

The persona in a prompt: who is speaking, or for whom

Persona

It tells the assistant which role to answer from. Google illustrates it with “You are a program manager in [industry]”. It helps the tone and level of detail fit whoever will use the answer.

The task in a prompt: what the assistant has to do

Task

It is the verb of the request: summarise, write, compare, change the tone. Google recommends telling Gemini exactly what you need it to do and giving it as much context as possible.

The context in a prompt: what the assistant does not know

Context

The details that make the request unique: what it is for, who will read it, which documents to use. In Google’s example, the context is the details of the program documents the summary is based on.

The format in a prompt: what the answer should look like

Format

The shape of the result: a list, a table, an email, how many sentences. Google’s example ends with “Limit to bullet points.” Without a format, the assistant picks one, and it is not always the one you needed.

How to write a prompt that works

Tips

To write a prompt that works, ask for something specific, in full sentences, with the context the assistant does not have. The official guides from Google, OpenAI and Anthropic agree on the basics, and Google sums it up in one line of its Gemini guide: “Write as if you’re speaking to another person.”

  • Spell out the result. OpenAI asks you to be specific about the context, outcome, length, format and style, in its best-practice guide to writing prompts.
  • Swap vague words for numbers. “Fairly short, a few sentences only” leaves the length to chance; “a 3 to 5 sentence paragraph” does not, according to the same OpenAI example.
  • Say what to do, not only what to avoid. OpenAI recommends replacing prohibitions (“do not ask for the password”) with an instruction on what to do instead.
  • Explain why. Anthropic, the company behind Claude, notes that giving the motivation behind an instruction helps the model understand the goal and deliver a more targeted answer.
  • Show examples. Anthropic recommends including 3 to 5 examples of the answer you want when format or tone matter.
  • Keep the conversation going. Google advises refining the result with follow-up prompts when the first one does not deliver.

Anthropic suggests a simple test for any prompt: show it to a colleague with minimal context on the task and ask them to follow it. If they would be confused, the assistant will be too.

Prompt examples: less effective versus effective

Examples

The most reliable prompt examples are the ones the assistants’ makers publish themselves. In the OpenAI, Anthropic and Google guides, the effective prompt always adds the same thing: the concrete result, the context or the format the weak prompt left open.

Less effective promptMore effective promptWhat it addsSource
Write a poem about OpenAI.Write a short inspiring poem about OpenAI, focusing on the recent DALL-E product launch (DALL-E is a text to image ML model) in the style of a {famous poet}.Length, tone, a concrete topic and a styleOpenAI
The description for this product should be fairly short, a few sentences only, and not too much more.Use a 3 to 5 sentence paragraph to describe this product.A measurable length instead of a vague oneOpenAI
NEVER use ellipsesYour response will be read aloud by a text-to-speech engine, so never use ellipses since the text-to-speech engine will not know how to pronounce them.The reason behind the instructionAnthropic
Write a program summary.You are a program manager in [industry]. Draft an executive summary email to [persona] based on [details about relevant program docs]. Limit to bullet points.Persona, task, context and formatGoogle
Examples from OpenAI’s prompt engineering best practices, Anthropic’s prompting guide for Claude and Google’s guide to writing effective prompts for Gemini, checked on 27 November 2026.

The last less effective prompt is not in Google’s guide: it is the bare-bones version of Google’s example, to show what its four parts add. The other pairs are quoted from the guides as published.

What the assistant does with your prompt before answering

How it works

When an AI assistant needs information from the web, it does not search for the prompt as written: it splits it into topics and runs several shorter searches. According to Google’s help page for AI Mode in Search, it divides the question into subtopics and searches for each one at the same time, and OpenAI describes a similar process in ChatGPT.

OpenAI gives an example in its help page on searching the web with ChatGPT. Asked “what’s the latest on the development of drugs that target CCR8 for cancer?”, ChatGPT might first search for “CCR8 immunotherapy drug development 2025” and, after reviewing the results, send more specific searches. The prompt is a long sentence; the searches are keywords, with a year nobody typed.

This technique is called query fan-out, and it is explained in more detail in the sub-queries AI search runs when you ask a question.

In a DoGeo study of 1,230 Gemini runs with Google Search turned on (October 2026):

  • When Gemini searched, it ran about 2 sub-queries per answer, between 1.8 and 2.2 on average depending on the question set.
  • Each answer that searched used about 10 sources, between 9.6 and 10.4 on average.
  • It did not always search: with the English questions on tech hiring in Spain, 26% of the runs answered without running any web search.

Why two people who write the same prompt get different brands

Different answers

Two people who write the same prompt can get different answers and different brands because the assistant adds things to the search that neither of them typed: where each one is, what they searched before, or the current year. The searches change, the pages it reads change, and so does the answer.

  • Location. According to OpenAI’s help, if someone types “What are some good restaurants near me?” and their IP address places them in the San Francisco area, ChatGPT may rewrite the prompt into the search “top restaurants San Francisco”.
  • History. Google explains that personalisation in AI Mode draws on previous searches and activity saved in the account’s history to tailor suggestions to each person’s tastes and preferences.
  • The year. In DoGeo’s study of 1,230 Gemini runs (October 2026), between 11% and 15% of the sub-queries on recruiting tools contained “2025” or “2026”, even though the question did not; for questions on GEO, 1%.

For a business, this means there is no single answer to win, but many small searches, and the work of appearing in them has a name: GEO, generative engine optimisation. Why some brands appear in those answers and others do not is explained in why AI won’t recommend your site.

Keep reading

Let’s talk about your visibility

Book a call with DoGeo. We come to it with a report already prepared on how Google and AI assistants see you today, and on what we would do first.