System message
A system message is the highest-priority instruction message in a chat-style API call — used to set role, constraints, and behaviour for the entire conversation.
Most chat APIs in 2026 (OpenAI, Anthropic, Google, Mistral) accept a separate system message that the model treats as higher-trust than user turns. The system message sets persona, constraints, format rules, refusal policy, and tool guidance. It is the most cost-effective behaviour-steering surface in production LLM apps — typically more impactful than fine-tuning for the same effort. Best practices in 2026: keep it concise (under 2,000 tokens to maximise prompt caching), declarative (always / never rules), example-light (examples go in user turns), and version-controlled.
When to use system message
- Any production chat or agent feature.
- Locking output format across many user inputs.
- Enforcing safety rules.
Common mistakes
- Cramming examples into the system message — they belong in user turns.
- Variable content (timestamps, user ID) in the system prefix — breaks prompt caching.
FAQ
What is system message?
A system message is the highest-priority instruction message in a chat-style API call — used to set role, constraints, and behaviour for the entire conversation.
When should I use system message?
Any production chat or agent feature. Locking output format across many user inputs. Enforcing safety rules.
What are the most common mistakes with system message?
Cramming examples into the system message — they belong in user turns. Variable content (timestamps, user ID) in the system prefix — breaks prompt caching.
Related terms
- System prompt — A system prompt is the high-priority instruction block that defines a model's role, constraints, and default behaviors for an entire conversation.
- Prompt caching — Prompt caching reuses the model's internal state for a repeated prompt prefix so the API charges and computes the prefix only once across many calls.
- Instruction hierarchy — Instruction hierarchy is a model's trained ordering of trust — system prompt outranks user message which outranks retrieved content — used to resist prompt injection and jailbreak attempts.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/system-message.md.