What is a system prompt?
Last checked
A system prompt is a set of instructions given to an AI model separately from the conversation. It tells the model what role it is in, how to behave and how to format its answers, and it applies to every turn of the conversation rather than to one message.
How it differs from an ordinary message
In a chat, the messages you type are user messages, and the model's replies are assistant messages. A system prompt sits outside that exchange. The model receives it along with the conversation each time it writes a reply, so its instructions stay in force without being repeated.
The APIs make the difference explicit. OpenAI's documentation describes developer messages as "instructions provided by the application developer, prioritized ahead of user messages", and the Responses API also has an instructions parameter that takes priority over the prompt in the input. Anthropic's Messages API has a top-level system parameter, described as "a way of providing context and instructions to Claude, such as specifying a particular goal or role". Google's Gemini API has a system_instruction parameter.
In practice, the distinction matters in three ways:
- Persistence. A system prompt applies to the whole conversation. Instructions in an ordinary message are part of the history and can be outweighed by later messages.
- Separation. Instructions and the material they apply to stay apart. OpenAI's documentation compares developer messages to a function definition and user messages to the arguments passed to it.
- Reuse. The same system prompt can be attached to many conversations without retyping it.
Where you can set one
Consumer chat apps do not use the term "system prompt", but each has places where standing instructions go:
| Where | Setting | Applies to |
|---|---|---|
| ChatGPT | Custom instructions (Settings, Personalization) | All chats |
| ChatGPT | Project instructions | Chats in that project |
| ChatGPT | GPT instructions (being retired) | Chats with that GPT |
| Claude | Instructions for Claude (Settings) | All chats |
| Claude | Project instructions | Chats in that project |
| Gemini | Gem instructions (being replaced by skills) | Chats with that Gem |
| Gemini | Skills | Chats where Gemini applies the skill, or where you select it |
| OpenAI API | instructions parameter or developer message | That request |
| Claude API | system parameter | That request |
| Gemini API and Google AI Studio | system_instruction / System Instructions field | That request or chat |
Some of these settings have character limits, covered in each platform guide.
When there is no setting available, or you want the instructions for a single chat only, you can paste them as the first message. The model then reads them as part of the conversation, and they apply to that chat only; a new chat starts without them. How to use the prompts on this site covers both approaches.
Short and long system prompts
A one-line system prompt such as "You are a helpful email assistant" names a role and leaves everything else to the model's defaults: how much to ask before answering, what to do when information is missing, how long the answer should be, what format it takes.
A long system prompt specifies those things. The prompts on this site run to roughly 1,500 to 4,000 words, and a typical one covers:
- what kinds of input to expect and how to read each one
- what to work out before starting
- when to ask a question and when to proceed with stated assumptions
- rules that apply every time, such as not inventing facts and marking gaps with placeholders
- situations that need different handling
- a check to run before answering
- the exact output format
The effect is that behaviour which would otherwise vary from one answer to the next is fixed in writing. For example, the Email Assistant tells the model to put [DATE] or [NAME] in a draft instead of making up a date or name, to start with the draft rather than a preamble, and to revise the current draft on follow-up requests. A one-line prompt says nothing on these points, so the model's defaults decide them.
Length also has costs to be aware of. A long system prompt is sent with every turn, so it uses part of the model's context window and, on the APIs, counts towards input tokens on each request. It also has to fit in the field you put it in: several chat app fields hold fewer characters than these prompts contain.
Anthropic's prompting documentation notes that "setting a role in the system prompt focuses Claude's behavior and tone for your use case", and the other providers' documentation describes system instructions in similar terms. A long prompt adds procedure and format on top of the role.