Skip to content
Search

What is a prompt in AI?

A prompt is the text a person or system gives a language model as input. AI search assistants rewrite prompts into shorter search queries.

In short. A prompt is the text that a person or a system gives to a language model as input. It can hold a question, instructions, examples and documents for the model to use. Developers add a system prompt that sets the model's role and rules. In AI search, the assistant often rewrites a user's prompt into shorter queries before it searches the web.

On this page 7 sections

The evidence

Confirmed

OpenAI's API gives instructions different levels of authority. Developer messages take priority over user messages, and messages that the model generates have the assistant role.1

1OpenAI API documentationOpenAI API documentation. Checked Nov 20, 2026.
Confirmed

Google's prompt design guide for the Gemini API recommends always including few-shot examples, and says prompts without them are likely to be less effective.2

2Gemini API documentationGemini API documentation. Checked Nov 20, 2026.
Confirmed

OpenAI says ChatGPT search typically rewrites a user's question into one or more targeted queries that it sends to search providers.3

3OpenAI Help CenterOpenAI Help Center. Checked Nov 20, 2026.
Confirmed

Anthropic recommends placing long documents above the query and instructions in a prompt. It says queries at the end can improve response quality by up to 30% in tests.4

4Claude API documentationClaude API documentation. Checked Nov 20, 2026.

The prompt a person types into ChatGPT is usually not the query its search engine receives. ChatGPT typically rewrites a question into one or more targeted queries, so a page is retrieved for words the site owner never sees.

A prompt is the input that a language model responds to. It can be one question typed into a chat assistant. It can also be a long request that an application builds from instructions, examples, documents and the user's message. The model reads the prompt as tokens and writes its answer from that text and its training.

#What a prompt contains

OpenAI's prompt engineering guide suggests that a developer prompt has these parts:1

  • The identity sets the purpose, communication style and goals of the assistant.
  • The instructions give the rules the model follows, including what it should never do.
  • The examples pair sample inputs with the outputs the developer wants.
  • The context adds information the model needs, such as private data or retrieved documents.

OpenAI places context near the end of a prompt, because it often changes from one request to the next. It says that adding relevant context to a request is sometimes called retrieval-augmented generation (RAG).1 What is retrieval-augmented generation (RAG)? explains how AI search systems add retrieved pages to a prompt.

The order of the parts can change the result. Anthropic's prompting best practices recommend placing long documents near the top of the prompt, above the query, instructions and examples. Anthropic says queries at the end can improve response quality by up to 30% in tests, especially with several documents.4

Google's prompt design guide for the Gemini API names several kinds of input. A prompt can ask a question, set a task, give an entity to work on, or give partial text for the model to complete. The guide recommends clear constraints and a stated response format, such as a table or a list.2

#System prompts and message roles

Chat models receive a prompt as a list of messages, each with a role. OpenAI's guide names three roles. Developer messages carry the application's rules and take priority over user messages. User messages carry the end user's input, and assistant messages are the ones the model generated.1

The developer's instructions are often called the system prompt. Google calls them system instructions. Anthropic says setting a role in the system prompt focuses Claude's behavior and tone, and that even a single sentence makes a difference.42

#Examples in a prompt

A prompt with no examples is a zero-shot prompt, and one with a few examples is a few-shot prompt. Google recommends always including examples, and says clear examples can replace some instructions.2 What is few-shot prompting? covers how many examples providers recommend and how to format them.

In AI search, the user's prompt is usually not the text that the search engine receives. OpenAI's help page on ChatGPT search says ChatGPT typically rewrites a question into one or more targeted queries for its search providers. In OpenAI's example, "What are some good restaurants near me?" becomes "top restaurants San Francisco" for a user in San Francisco.3

A page is retrieved for the rewritten queries, which the site owner does not see. What is query fan-out? describes how one prompt becomes several searches. What ChatGPT searches for before it answers shows the queries that ChatGPT wrote in a sample of about 26,000 responses. How to test AI search visibility with prompts covers how to choose prompts that measure whether AI answers mention a brand.

Questions

What is the difference between a prompt and a search query?

A prompt is the full input to a language model and can be a long, conversational request. A search query is the short string that a search engine matches. ChatGPT search can rewrite "What are some good restaurants near me?" into the query "top restaurants San Francisco" for a user in San Francisco.

What is a system prompt?

A system prompt is a set of instructions that the developer of an application gives the model before any user message. It sets the model's role, rules and output format. OpenAI calls these developer messages, and Google calls them system instructions.

What is prompt engineering?

OpenAI defines prompt engineering as the process of writing effective instructions for a model, so that it consistently generates content that meets the task's requirements. Common methods are clear instructions, examples, structure with Markdown or XML tags, and added context.

Notes

  1. 1
    Prompt engineeringOpenAI API documentation · Checked Nov 20, 2026 · Primary source
  2. 2
    Prompt design strategiesGemini API documentation · Checked Nov 20, 2026 · Primary source
  3. 3
    Searching the web with ChatGPTOpenAI Help Center · Checked Nov 20, 2026 · Primary source
  4. 4
    Prompting best practicesClaude API documentation · Checked Nov 20, 2026 · Primary source

About this page

Researched and reviewed by Promptly Found. Reviewed Nov 20, 2026. Next review due Feb 2027.

Cite this page
Citation style

Promptly Found. (2026, November 20). What is a prompt in AI? https://promptlyfound.com/glossary/prompt

Revisions 1
First published.