What are the three message roles in a chat-style LLM prompt and what does each represent?
Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
system carries standing orders, user carries the current turn's input, assistant replays prior model responses so the next call has context.
Imagine a new employee at a help desk. Before the shift the manager hands them a short briefing: who they work for, what tone to use, what they must never say. That briefing is the system message. During the shift, customers walk up and ask questions; each question is a user message. The employee's previous answers are written down on a notepad they keep referring to so the conversation feels continuous; those notes are the assistant messages. Every new question, the employee re-reads the briefing, the conversation so far, and the new question, then replies.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
3 min: role definitions + stateless API + transcript ownership + where RAG context goes + prompt caching implication for system.
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Putting the user's per-turn question into the system message; the system role is for persistent rules, not the current query.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.