What is a system prompt and how is it different?
A system prompt is the standing set of instructions an AI app gives the model in the background, setting the assistant role and rules.
What is a system prompt?
In a chat application, the model has already read some text before you type anything. The team behind the app uses that text to define who the assistant is, which topics it covers, which language and tone it uses and what it must not do. This background instruction is the system prompt. Users usually do not see it, but it shapes every answer.
What goes into a system prompt?
Take the support assistant of an online shop. Its system prompt might cover:
- Role: it is the shop's support assistant.
- Scope: it answers only order, return and shipping questions and politely redirects everything else.
- Tone and format: plain language, three sentences at most.
- Rules: prices and stock come only from system data, never from guesses.
- Handover: angry customers or unsolved problems go to a human.
How it differs from the user prompt
The user's message, the prompt, changes with every conversation. The system prompt stays the same across all of them. Models are trained to give the system prompt priority when the two conflict.
That priority is not absolute. Attempts to trick a model into breaking its rules are called prompt injection or jailbreaking, which is why critical rules are also enforced by a separate guardrail layer.
Writing a good system prompt
Keep it short and consistent: every rule is sent as tokens with every request and takes space in the context window. Giving the reason behind a rule ("never invent a price, because the customer will hold us to it") helps the model handle cases the rule does not spell out. Test every change against real conversations before it goes live.