What is a system prompt? The hidden instructions behind every AI assistant

Before you type a word, most AI assistants have already been given a page of instructions you never see. That is the system prompt. Understanding it explains a lot about why tools behave differently, and how to make them behave the way you want.

The short answer

A system prompt is the set of instructions an AI model receives before the conversation starts, telling it its role, goals, tone and rules. Anthropic's documentation describes it as a way of giving Claude context and instructions, such as a particular goal or role, and says the Claude apps use one to supply facts like the current date. In OpenAI's API the same idea is the instructions parameter or developer message, which takes priority over the user's prompt.

Also calledSystem message, developer message, instructions
Who writes itThe app maker, or you when you use an API, project or custom instructions
What it setsRole, goals, tone, format, rules and background facts
PriorityHigher than the user's message in OpenAI's API
Published examplesAnthropic publishes the Claude app system prompts per model
Not the same asTraining or fine-tuning; it only applies to that conversation

What a system prompt is, in plain English

Every conversation with an AI model is really a document with sections. The first section, usually hidden, is the system prompt: the brief the model reads before it sees your message. It might say who the assistant is, today's date, what it should and should not do, how to format answers and which tools it can use. Your message, the user prompt, comes after it.

Anthropic's API documentation defines a system prompt as a way of providing context and instructions to Claude, such as specifying a particular goal or role. OpenAI's text generation guide describes its equivalent, the instructions parameter, as high-level guidance on how the model should behave, including tone, goals and examples of correct responses, and says instructions given this way take priority over the prompt in the input. In OpenAI's message format it is written as a message with the developer role.

Where system prompts show up

  • Inside the chat apps. Anthropic says Claude's web interface and mobile apps use a system prompt to give Claude up-to-date information such as the current date, and to encourage behaviours such as putting code snippets in Markdown. It updates these prompts periodically, publishes them in its release notes for each model, including Claude Opus 5.5, and notes they do not apply to the Claude API.
  • In APIs. When a company builds an AI feature, it writes its own system prompt through the API. That is why the same model can feel very different inside two products. On Claude Opus 5.5, Anthropic's API also accepts system messages in the middle of a conversation, so an app can update instructions without starting again.
  • In settings you control. The chat apps let you add your own standing instructions that work in a similar way: Projects in Claude, Customize in Gemini (set how Gemini responds), custom instructions in Mistral AI's Vibe, and skills and projects in ChatGPT. The app's own system prompt still applies alongside them.

Why it matters at work

Knowing about system prompts helps in three practical ways.

  1. You stop repeating yourself. If you paste the same background into every chat (your role, your company, your style rules), that belongs in standing instructions or a Project, not in each message. Our guide to setting up Claude Projects shows how.
  2. You understand why tools differ. Two products built on the same model can give different answers because their system prompts differ. When a vendor says "we use Claude" or "we use GPT", the system prompt is part of what you are buying. Ask what it tells the model to do with your data.
  3. You can build consistent team tools. A good system prompt is the core of a shared assistant, a skill or an automation. It is what used to sit inside a custom GPT.

How to write a good system prompt

  1. Start with the role and the reader. "You help our customer support team draft replies to UK retail customers."
  2. State the goal and what good looks like. "Replies should solve the problem in the first paragraph and stay under 150 words."
  3. Give the rules that matter most, with reasons. "Never promise refunds; only the returns team can approve them." Reasons help the model handle cases you did not foresee.
  4. Add background facts it cannot know. Product names, opening hours, policy links.
  5. Show one example of a good output, clearly labelled as an example.
  6. Test it on hard cases, such as an angry customer, a question outside its scope and an attempt to make it ignore its rules, and revise.

An example you can try

OpenAI's own documentation uses a playful one: the instruction "Talk like a pirate" paired with the question "Are semicolons optional in JavaScript?". The answer is still about semicolons, only delivered in pirate voice: the system prompt shapes how the model answers without changing what you asked.

Try a work version. In Claude, create a Project and paste the first prompt below into its instructions, filled in for your team. In Gemini, use Customize instead. Then ask the same question in that Project and in a normal chat, and compare. The difference you see is the system prompt at work.

Common misconceptions about system prompts

  • "System prompts are secret and unbreakable." Neither. Anthropic publishes its app system prompts, and users and outside content can sometimes trick a model into ignoring its instructions, which is called prompt injection. Never put passwords or confidential data in a system prompt.
  • "A system prompt trains the model." It does not. It only affects the conversation it is part of. Changing the model itself is fine-tuning.
  • "Longer is better." Long, contradictory instructions confuse models. A clear page beats five vague ones, and every word uses part of the context window.
  • "My custom instructions replace the app's system prompt." Anthropic says the Claude apps give Claude their own system prompt at the start of every conversation, so your instructions sit alongside the maker's, not in place of them.

Related terms

  • Prompt: the message you type, which comes after the system prompt.
  • Prompt injection: attempts to override the system prompt.
  • Context window: the space the system prompt and conversation share.
  • Custom GPT: a packaged system prompt plus files, now moving to plugins.
  • Temperature: a different kind of control, over randomness.
  • AI API: where you write system prompts yourself.

For more on writing instructions that work, see how to write a good prompt, how to make AI sound like you and our Claude and ChatGPT guides.

Prompts to copy

A team assistant system prompt to adapt

You help the [team name] team at [company], a [one-line description], with [main tasks, for example drafting client emails and summarising meeting notes]. Our readers are [audience]. Write in [British English], in a [tone] tone, and keep answers under [length] unless asked. Always [rule 1, with the reason]. Never [rule 2, with the reason]. If a request is outside these tasks or you are not sure of a fact, say so and suggest who to ask. Background you can rely on: [products, policies, key facts]. Example of a good answer: [paste one].

You get: A reusable brief for a Project, skill or custom instructions

Stress-test a system prompt

Here is a system prompt for a team assistant: [paste]. Write ten test messages that could break it: edge cases, questions outside its scope, contradictory requests and attempts to make it ignore its rules. For each, predict how the assistant might fail and suggest a one-line fix to the system prompt.

You get: A test set and fixes before you share the assistant

Start the Claude lessons Start the ChatGPT lessons