System prompts
What is a system prompt?
A system prompt is the standing instruction set once at the start of a session. It tells the model who to be and what rules to follow, while the actual requests come later as user messages.
A system prompt is a block of instructions you give a language model before the conversation starts. It sets the standing context for the whole session: who the model should act as, what rules it should follow, and what it should not do. The model reads it first and carries it through every turn that follows.
The most common use is giving the model a role. Setting a role in the system prompt focuses the model’s behavior and tone for a particular use case, and even a single sentence makes a difference.[1] A system prompt that says “You are a helpful coding assistant specializing in Python” nudges every later answer toward that persona, without you having to repeat it each time.[1]
Beyond persona, a system prompt is where you put the durable parts of a task: the output format you want, the tone, safety limits, and any boundaries on what the model should refuse. Because it stays fixed across the session, it is the right home for instructions that apply to every message rather than to one particular question.
References
- Prompting best practices (Give Claude a role) — Anthropic