The System Prompt
Token problems: 13 of 20
Token problems: the workbook
The System Prompt
Why does every call start with the same block of tokens? The model has no memory between turns, so the agent re-sends its instructions at the front of every call. That block is the system prompt: it defines how the agent behaves, and it costs tokens every single time. Labeling where it ends and the user message begins makes the per-call overhead visible.
Problem
The model replied bonjour to the user's message translate hello into french. The tokens before the user message are the system prompt. Label each token S for system prompt, U for user message, or O for output.
Label each token S, U, or O
Count the tokens of each kind
Practice 1
The model replied here is the fix to the user's message fix the login bug. The tokens before the user message are the system prompt. Label each token S for system prompt, U for user message, or O for output.
Label each token S, U, or O
Count the tokens of each kind
Practice 2
The model replied it is three pm now to the user's message what is the time. The tokens before the user message are the system prompt. Label each token S for system prompt, U for user message, or O for output.







