Learn

System prompt: the instruction that sets the role

A system prompt is a separate instruction given to a large language model that sets its role, tone, and rules before the conversation begins. It is distinct from the user message: the user asks questions, while the system prompt frames how the model should answer every one of them.

At a glance

What it is
A standing instruction that sets the model's role and behaviour
How it differs
Separate from the user message, it frames every turn
What it sets
Role, tone, rules, and the format of answers
Its limit
It guides behaviour, it does not lock it absolutely
Stack

What the model reads each turn

The system prompt sits above the conversation and frames every answer. The user message is one turn inside that frame.

3
User message the question for this turn
2
Conversation so far earlier turns the model still sees
1
System prompt the standing role and rules, set once

How is a system prompt different from a prompt?

Both are text you give the model, but they sit in different places. The user message is the question for this turn. The system prompt is the standing instruction that sits above the whole conversation and tells the model who it is and how to behave: its role, its tone, the rules it should follow, the shape its answers should take. You set it once, and it frames every turn that follows rather than just the next one.

That separation is the point. It lets you keep the model’s character and rules in one stable place while the user asks about whatever they like. The same model becomes a terse code reviewer or a patient explainer depending on the system prompt in front of it, with no change to the questions being asked.

What can a system prompt actually do?

A good system prompt is specific about role and format. Tell the model what it is, the tone to hold, and how to lay out an answer, and keep per-request details out of it, those belong in the user message. Be honest about the limit, though: a system prompt steers behaviour strongly, but it does not lock it absolutely. A determined or confusing user message can pull the model off the frame you set, and a very long system prompt spends tokens, the chunks of text a model reads, from the same context budget your actual conversation needs. Set the role firmly, keep it tight, and do not treat it as an unbreakable contract.

Belongs in the system prompt

  • The role the model should play
  • Tone and style that should hold all conversation
  • Standing rules and output format
  • Context true for every turn, not just one

Belongs in the user message

  • The actual question or task right now
  • Details specific to this one request
  • Data the model should act on this turn
  • Anything that changes from message to message

Related terms

← All terms Reviewed: June 2026