System prompts: the background instructions behind an AI
A system prompt is a block of instructions given to the model before the conversation: role, tone, rules, limits. Users usually don't see it, yet it shapes every answer, which makes it the main tool for turning a general-purpose model into a specialized assistant.
Data as of October 22, 2026
Key figures
| Level | Intermediate |
|---|
A simple definition
In a conversation with a language model, not all messages carry the same weight. There’s what you type (the user message), what the model replies, and, upstream, a framing text: the system prompt. It sets the scene: “You are the customer service assistant for a bank. Reply in short sentences. Never give personalized investment advice.”
Anthropic’s documentation defines it as a way of providing context and instructions to the model, such as a goal or a role, and notes that even a single sentence setting a role changes tone and behavior. OpenAI describes “developer” role messages as instructions from the app’s developer, prioritized ahead of user messages.
A concrete example
A language school builds a Spanish tutor on the same model a general assistant uses. The difference lies in the system prompt: “You are a patient tutor for adult beginners. Correct one mistake at a time, explain it in English, then suggest a practice sentence. If the learner drifts off topic, gently bring them back to the exercise.” The result is consistent behavior from one session to the next, without the learner restating their expectations. To structure instructions like these, our prompt generator offers a template.
Why it matters
The system prompt is the simplest and cheapest way to specialize a model, long before fine-tuning. It’s also where an app’s guardrails usually live: topics to avoid, output format, how to handle off-topic requests. For agents, it describes the available tools and how to use them, making it a core part of context engineering.
Common mistakes and myths
- “The system prompt is bulletproof.” No: a prompt injection hidden in a document or web page can push the model to ignore its instructions. Real safeguards also need to exist in the application itself.
- “Writing in ALL CAPS makes the model obey.” Anthropic observes that its recent models are more responsive to the system prompt and advises normal phrasing over aggressive commands, which can cause overreactions.
- “System prompt and user prompt are the same thing.” The first frames the whole conversation; the second carries the request of the moment.
Related terms: prompt, custom instructions, prompt engineering, prompt injection, guardrails.
Related terms
- Prompt · The text, question or instruction you give an AI to get a response; how clear it is directly shapes the result.
- Custom instructions · Preferences you save once in an AI assistant (who you are, tone, format) that it then applies to every conversation.
- Prompt engineering · The practice of writing, testing and refining instructions to an AI model so its answers become more reliable and useful.
- Prompt injection · An attack that slips hidden instructions into text an AI reads, to make it ignore its original instructions or act against its user.
- Guardrails · Checks placed around an AI model to filter what goes in and what comes out, and to block unwanted answers or actions.
- Context engineering · The practice of deciding what goes into a model's context window at each step: instructions, tools, documents, memory and history.
Try it
Full glossary
Frequently asked questions
How is a system prompt different from custom instructions?
Custom instructions in apps like ChatGPT or Claude play a similar role at your level: you describe your preferences once and they apply to your chats. A system prompt is set by an app's developer, often on top of the provider's own guidelines.
Is the system prompt secret?
It isn't displayed, but you shouldn't treat it as confidential. Users regularly manage to get models to repeat these instructions. Never put passwords, API keys or sensitive information in it.
How is it sent in practice?
It depends on the API. With Anthropic, it goes in a separate “system” parameter, apart from the messages. With OpenAI, you use the “instructions” parameter or “developer” role messages, which take priority over user messages.
Is a longer system prompt better?
Not necessarily. Clear, well-organized, non-contradictory instructions matter more than length. A very long prompt also costs tokens on every call, which prompt caching can help reduce.
Data sources
Data as of October 22, 2026
Report an error
Does a figure, a date or a fact look wrong? Tell us: every report is checked.