Prompt Structure (Token Sequence)

<|system|> System Prompt Start
Token: You are a helpful assistant. Answer questions accurately.
<|/system|> System Prompt End
<|user|> User Message Start
Token: What is machine learning?
<|/user|> User Message End
<|assist|> Model Output Tokens (generated)
System Prompt (stores instructions)
User Message (current request)
Assistant Output (generated)
Important: System Prompt is a normal token sequence with special markers. There's no "magic" internal treatment - it's processed like other tokens.

Attention on System Prompt

How much does the model attend to different positions (System vs. User)?

User (new)
System (old)
System
User
Observation: System Prompt (top) receives more attention weight. User Message (bottom) attends strongly to System Prompt at the beginning due to Causal Masking and Recency Bias.

Claude (Anthropic)

System Prompt Size: ~16,739 words
Purpose: Tool definitions, guidelines
Example Hotfix: "Be more helpful"
Control: Detailed

GPT-4 (OpenAI)

System Prompt Size: ~2,218 words
Purpose: Minimal instructions
Example Hotfix: "Assistant is helpful"
Control: Minimal
Key Insights

🔑 Key Insights