0
Act 2

Understanding

8 / 8

System Prompts & Personas

Act 2 · ~4 min

Theory

Every chat request arrives as a structured list of messages, each tagged with a role. Before tokenization, role markers wrap each message so the model distinguishes developer intent from user input.

system"You are a concise support assistant. Only answer billing questions."
user"Why was I charged twice this month?"
assistantmodel generates here
Each chat turn is a role-tagged message; the model conditions on the full sequence before generating.
RoleWritten byPurpose
systemDeveloperInstructions, persona, constraints, format
userEnd userThe human's actual request
assistantPrior model turnsConversation history the model conditions on

System prompts shape outputs in three ways: persona, operational constraints, and format.