A system prompt is the instruction block you set once for the whole conversation. A user message is a single turn of input from the person or your calling code.
client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
system="You are a support agent for Acme. Answer only from the provided docs.",
messages=[{"role": "user", "content": "How do I reset my password?"}],
)
In Anthropic's Messages API the system prompt is a top-level system parameter, not a role inside messages. OpenAI's API takes it as a message with role system or developer.
The system prompt persists across every turn, so it holds the durable rules: the role and tone, the output format, and the hard limits. When a user message contradicts it, models are trained to follow the system prompt. Keep per-request data in the user message. A stable system prompt also caches well as a shared prefix.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
The diagram below the answer is the concept . Jump to it ↓