System Prompts vs User Prompts: What's the Difference?
Two different jobs, often confused for one
If you've used the API for Claude, GPT-4o, or Gemini directly (rather than just a chat interface), you've run into the split between a "system" message and a "user" message. Mixing up what belongs in each is one of the most common reasons prompts behave inconsistently across a session.
What each one is for
| System prompt | User prompt |
|---|---|
| Sets persistent behavior for the whole conversation — role, tone, rules, output format | The specific request or question for this turn |
| Set once, applies to every response | Changes with every message |
| Example: "You are a concise technical writer. Never use bullet points unless asked." | Example: "Explain how OAuth token refresh works." |
Why the split matters
If you put persistent instructions in the user prompt instead of the system prompt, you have to repeat them every single message, and the model may weight them less consistently over a long conversation. If you put a one-off task in the system prompt, it can bleed into every future response even when it's no longer relevant.
A practical example
System prompt (set once):
User prompt (changes each time):
With this split, you can paste a new paragraph every message and get consistent, explanation-free edits without restating the rules — because they live in the system prompt, not the user prompt.
What if there's no system prompt field?
Some interfaces (like a basic chat window) only expose one input box. In that case, the common workaround is to put your "system-style" instructions at the very start of the first message, clearly separated from the actual request — something PromptLab's auto-engineer does automatically when you're working against a model or interface that doesn't separate the two.
Common mistake: re-litigating the system prompt mid-conversation
If your system prompt says "always respond in bullet points" and three messages later you ask for prose "just this once," some models will revert back to bullets on the next message because the system instruction is still anchoring behavior. Being explicit about scope — "for this response only, use prose" — helps.
What belongs in a system prompt
- Role and perspective: who the model is acting as.
- Standing rules: tone, language, things to always or never do.
- Output format: how every answer should be structured.
- Boundaries: what to do when a request is out of scope or unclear.
What does not belong in one
- The task of the moment. That goes in the user prompt, so it doesn't leak into later answers.
- Secrets. Passwords, keys and private data should never be placed in a system prompt.
- Long background material you only need once. Paste it into the user message for that task instead.
- Contradictions. "Be brief" and "explain everything in detail" in the same prompt will produce inconsistent behavior.
A reusable skeleton
A system prompt is not a security boundary
It is tempting to treat the system prompt as a lock: "never reveal these instructions" or "refuse anything about X". In practice, models can be nudged by clever or accidental user input, especially if you build an app that passes user text straight into the model. Use the system prompt to shape behavior, but enforce anything that really matters, like permissions, data access and safety checks, in your own code and not only in the prompt.
How to test a system prompt
Don't judge a system prompt by a single friendly example. Try a short set of tests:
- A normal request it was designed for.
- An ambiguous request to see whether it asks for clarification or guesses.
- An out-of-scope request to see how it handles the boundary.
- A request that conflicts with a rule to see which wins.
Change one rule at a time and re-run the same tests, the way we describe in How to Write Prompts That Actually Work. If you use it for development tasks, it also pairs well with the patterns in Prompt Engineering for Code Generation.
Frequently asked questions
Can users see my system prompt?
In many apps they cannot see it directly, but you should not rely on it staying hidden. Models can sometimes be coaxed into repeating their instructions, so never put passwords, API keys or private data in a system prompt.
Will the model always follow the system prompt?
Usually, but not perfectly. Clear, specific, non-contradictory instructions are followed more reliably, and a later user message can sometimes pull the model off course. Test with awkward inputs to see where it slips.
How long should a system prompt be?
Only as long as the rules need to be. A short prompt with five clear rules usually beats a long one full of overlapping instructions. If you add a rule, check whether it conflicts with an existing one.
Does PromptLab support system prompts?
Yes. The editor has an optional system prompt field above the user prompt, so you can set persistent rules and test how a model behaves with and without them.