Lesson 5 of 8 · 3 min read

The system prompt: the instructions you don't see

Before your first message even reaches the model, the app has already sent something: a block of instructions called the system prompt. It sets the model's persona, tone, rules and tools. It's why the same model can be a polite support agent in one app and a terse coding assistant in another.

What it looks like

Chat APIs take a list of messages, each with a role. The system prompt is the message with role system, placed first:

[
  {"role": "system",    "content": "You are a helpful assistant. Answer briefly."},
  {"role": "user",      "content": "What is the capital of Indonesia?"},
  {"role": "assistant", "content": "Jakarta."},
  {"role": "user",      "content": "And its population?"}
]

It is sent with every request, because the model has no memory between messages (see the context window).

It's still just text

The model doesn't have a separate input for instructions. A chat template flattens the message list into one stream of tokens, with special markers showing where each role starts. For a Qwen model it looks roughly like this:

<|im_start|>system
You are a helpful assistant. Answer briefly.<|im_end|>
<|im_start|>user
What is the capital of Indonesia?<|im_end|>
<|im_start|>assistant

The system prompt has power only because models are trained to give text in that position more weight than user messages. It's a strong habit, not a hard rule.

What a system prompt is good for

What it can't do

Writing a good system prompt