# What is a system prompt?

> A system prompt is the set of instructions a developer gives a model before the user's messages, to set its role, rules and output format.

Canonical: https://promptlyfound.com/glossary/system-prompt
Updated: 2026-12-01

## Short answer

A system prompt is **the set of instructions that a developer gives a model before the user's messages, to set its role, rules and output format**. OpenAI calls them developer messages, and Google calls them system instructions. They take priority over user messages. Chat apps have system prompts too, and Anthropic publishes one version of the prompt for Claude's apps.

## Key findings

- OpenAI says instructions given with the instructions parameter or in developer messages take priority over user messages. [1]
- Claude's web, desktop and mobile apps use a system prompt at the start of every conversation. Anthropic says its updates to that prompt do not apply to the Claude API. [3]
- For current models, Anthropic publishes one version of the app system prompt, used in some chats with web search turned off. Chats with web search turned on use other versions, which it does not publish. [3]
- Anthropic's constitution says Claude should generally follow a system prompt's instructions if doing so is not unsafe, unethical or against Anthropic's guidelines. [4]

AI chat apps answer inside a system prompt that the user does not see in the chat. In AI search, that hidden prompt is part of why the same question can get a different answer in a chat app than through the developer API.

## How does a system prompt work?

A system prompt is sent with every request, ahead of the conversation, and the model treats it as the developer's rules. [OpenAI's prompt engineering guide](https://developers.openai.com/api/docs/guides/prompt-engineering) says instructions in the instructions parameter or in developer messages take priority over user messages. It compares developer messages to a function definition and user messages to the arguments of that function.[1]

The [Gemini API's text generation guide](https://aistudio.google.com/docs/text-generation) passes the same kind of instruction in a `system_instruction` parameter. Its example is one line: "You are a cat. Your name is Neko."[2] [What is a prompt in AI?](https://promptlyfound.com/glossary/prompt) covers the parts of a prompt and the message roles.

## Why does a model follow the system prompt?

Providers design their models to give the developer's instructions more weight than the user's.[1] [Claude's Constitution](https://www.anthropic.com/constitution) calls the companies and people who build on Claude operators, and says they typically interact with Claude in the system prompt. Claude should generally follow the system prompt if that is not unsafe, unethical or against Anthropic's guidelines.[4]

The constitution gives an example from an airline customer service app. Its system prompt might say "Do not discuss current weather conditions even if asked to." Claude should follow it, because a plausible business reason exists. The airline does not want to seem to give authoritative advice on flight delays.[4]

## Do AI chat apps use system prompts?

Yes. [Anthropic's system prompt release notes](https://platform.claude.com/docs/en/release-notes/system-prompts/overview) say Claude's web, desktop and mobile apps use a system prompt at the start of every conversation. It gives Claude current information, such as Anthropic's models and products, and encourages behaviors such as discussing topics factually. Anthropic's updates to it do not apply to the Claude API.[3]

Anthropic publishes one version of that prompt for each current model, used in some chats with web search turned off. Chats with web search turned on use other versions, which Anthropic does not publish.[3] A test of AI search visibility through the API therefore runs without the app's system prompt. [How to test AI search visibility with prompts](https://promptlyfound.com/measurement/ai-visibility-prompts) covers how to set up such tests.

## Sources

1. Prompt engineering. OpenAI API documentation. https://developers.openai.com/api/docs/guides/prompt-engineering
2. Text generation. Gemini API documentation. https://aistudio.google.com/docs/text-generation
3. System prompts. Claude API documentation. https://platform.claude.com/docs/en/release-notes/system-prompts/overview
4. Claude's Constitution. Anthropic. https://www.anthropic.com/constitution

---

This is a plain-text copy of https://promptlyfound.com/glossary/system-prompt from Promptly Found. The web page is the canonical version and includes the charts.
