System Prompt
Every conversation with a chat assistant has a hidden first message you did not write. Before your question reaches the model, the application puts its own instructions in front of it — who the assistant is, what it must refuse, how answers should be laid out. That block is the system prompt.
How it worksMechanically it is unremarkable: a message with the role system (some providers now call it developer) placed at the top of the chat template, tokenised and prepended to the context like any other text. The model treats it as higher authority because instruction tuning and preference training taught it to, not because the architecture gives those tokens any special status. Two things follow at once. It is the strongest steering lever available to anyone using a model they cannot retrain — a few lines here change tone, scope, refusal behaviour and output format across every request. And it is only ever a very strong suggestion.
What it costs and where it breaksThe system prompt occupies context on every single call, and real ones — tool definitions, style guides, safety rules, a persona — run to thousands of tokens, which is exactly the prefix that prompt caching exists to make cheap. Because it is plain text sharing one window with everything else, a retrieved document or a user turn can argue with it, which is the mechanism behind prompt injection and jailbreaks. Treat it as configuration that shapes behaviour, never as a security boundary: the permissions a system needs belong in the code around the model, where a sentence cannot talk them away.
A system prompt is the instruction block an application places at the top of a model's context, ahead of any user turn, to set the assistant's role, rules, refusals and output format. It is the main steering lever when the weights are fixed, and it is re-sent on every request, so its tokens cost context and money each call. Its authority is learned behaviour rather than an enforced boundary, which is why untrusted text in the same window can override it.
When you take on a new assistant, you start with a briefing: who you are, what to help with, what never to say, how to lay out replies. The system prompt is that briefing for an AI assistant, written by whoever built the app and slipped in front of your message where you never see it. It is why the same underlying AI can behave as a chirpy shopping helper on one website and a terse coding tool on another. But a briefing is instructions, not a lock on the door — a cleverly worded message can sometimes talk the assistant into ignoring it.