What is a system prompt?
A system prompt is the standing instructions a developer gives an LLM before the user speaks. Providers differ on where it goes and who wins in a conflict.
A system prompt is a set of instructions given to a large language model before any user input, setting how it should behave for a whole conversation or application. It usually defines a role, rules, tone and output format. The user prompt, by contrast, is the request itself. Anthropic’s API reference describes a system prompt as “a way of providing context and instructions to Claude, such as specifying a particular goal or role”. It is one part of prompt engineering.
System prompt vs user prompt
| System prompt | User prompt | |
|---|---|---|
| Written by | The developer of the application | The end user, or the application on the user’s behalf |
| Changes | Rarely; the same on most requests | On every turn |
| Typical content | Role, rules, tone, format, tool guidance | The question, task or data to work on |
| Priority in a conflict | Higher | Lower |
OpenAI’s Model Spec (the October 2026 version) says that “when both are present in a conversation, the developer messages have greater authority”, and ranks its instruction levels root, system, developer, then user.
How each provider exposes it
The idea is shared, but the field name differs.
| Provider | Where it goes | What the docs say |
|---|---|---|
| Anthropic (Claude) | The top-level system parameter of the Messages API |
Sets a goal or role; a role in the system prompt focuses behavior and tone |
| OpenAI | A developer message, or the instructions parameter |
developer messages are “prioritized ahead of user messages”; instructions take priority over the input prompt and apply only to the current request |
| Google (Gemini) | The system_instruction parameter |
“You can guide the behavior of Gemini models with system instructions” |
Two details matter in practice. OpenAI’s instructions parameter “only applies to the current response generation request”, so a chain of requests must resend it. And system prompts count against the context window on every call, like any other input.
What goes in a system prompt
Treat the list as a starting point to test, not a rule.
- A role. Anthropic’s guide says that “even a single sentence makes a difference”, and its example is “You are a helpful coding assistant specializing in Python.”
- Standing rules and format. Anthropic’s guide shows system-prompt instructions such as telling the model to respond directly without preamble, or to take action by default.
- Examples. Few-shot examples can go here too; OpenAI’s guide says “Typically, you will provide examples as part of a
developermessage”.
Per-request content, such as the user’s question and retrieved documents, belongs in the user turn, because it changes every time.
Model changes can shift how a system prompt lands
The same system prompt can behave differently on a different model, so retest it after every model change. Anthropic’s guide gives a dated example: it notes that Claude Opus 4.5 and 4.6 are “more responsive to the system prompt than previous models”. A prompt written to push an older model to use a tool could then overtrigger, and the guide’s fix is to soften emphatic wording such as “CRITICAL: You MUST”.
The opposite problem shows up too. Anthropic’s Haiku 5.5 guide lists “a chatbot stops following its system prompt when users argue or keep asking” as a behavior to watch, and suggests adding a line saying the rules hold for the whole conversation.
It is not a security boundary
A system prompt tells the model what to do. It does not enforce anything. The OpenAI instruction hierarchy paper (Wallace et al., April 2024) argues that a key vulnerability behind prompt injections and jailbreaks is that LLMs often treat system prompts with the same priority as text from untrusted users and third parties. It proposes training models to “selectively ignore lower-privileged instructions”, and reports a large robustness gain on GPT-3.5. Even with that training, put limits that must hold in code, not in the prompt. See prompt injection for the attacks.
System prompts you can read
Consumer chat apps have system prompts too. Anthropic publishes the ones for claude.ai and its mobile apps, per model and dated. They provide “up-to-date information, such as the current date” and encourage behaviors “such as always providing code snippets in Markdown”. Anthropic states these do not apply to the Claude API, so API output can differ from what the app produces for the same model.
Testing and versioning a system prompt in HoneyHive
Because a system prompt changes behavior on every request, change it like code. Run each version over the same test cases and grade the outputs, as described in LLM evaluation.
In HoneyHive, a prompt is saved as a configuration that you can fork, compare side by side across versions in Studio, and deploy to an environment such as dev, staging or prod. Application code then fetches the deployed prompt with the SDK at runtime, so an updated prompt can reach the app without a code change.
FAQ
What is the difference between a system prompt and a user prompt?
A system prompt carries the developer's standing instructions, such as role, rules and format. A user prompt carries the end user's request. OpenAI says developer messages are prioritized ahead of user messages, so on a conflict the developer's instruction should win.
Can users see or override a system prompt?
Users usually do not see it, and a well-trained model should not let them override it, but that is not guaranteed. A 2024 OpenAI paper argued that models often treat developer system prompts with the same priority as text from untrusted users. Treat the system prompt as guidance, not as a security boundary.
Do I need a system prompt?
No. The API calls work without one. Anthropic says that even a single sentence giving Claude a role makes a difference, so it is worth adding at least that.
Do the published Claude system prompts apply to the API?
No. Anthropic publishes the system prompts used on claude.ai and its mobile apps, and says these updates do not apply to the Claude API. On the API you write your own.