How is the system prompt different from the user prompt?
easyAnswer
- Chat-tuned LLMs use a chat template with roles: 'system' (developer instructions, persona, guardrails, style), 'user' (query), 'assistant' (response).
- RLHF training teaches the model to weight system instructions higher than user instructions in case of conflict — the primary defense against user jailbreaks and prompt injection.
- Best practice: put durable, safety-critical, and format instructions in the system prompt; put per-request context in the user prompt.
Check yourself — multiple choice
- No difference
- System = developer / persona / durable instructions; RLHF weights it higher than user → put safety and format there
- Same weight as user prompt
- User overrides system by default
System prompt: durable instructions with higher priority than user (post-RLHF).
#prompting
Practise LLMs & GenAI
214 interview questions in this topic.