Anatomy of a prompt
Before we name anything, inspect the whole prompt as plain model input. It is one sequence, but the lines are doing different jobs:
đĄ This is the token view: honest, literal model input. The tokenizer does not know which words are instruction, task, context, format, or examples.
A prompt has two truths. The token view is what the model literally receives: token IDs in order. The anatomy view is what you, the writer, should be tracking: each clause needs a job. If a sentence has no job, it is filler. If two sentences have the same job, one of them is probably noise.
The five roles are simple:
| Role | Job | Change this when⊠|
|---|---|---|
| Instruction | Sets behavior for the whole request | the model is doing the wrong kind of work |
| Task | Names the concrete operation | the goal changed |
| Context | Supplies the material to work on | the facts, document, ticket, or conversation changed |
| Format | Specifies the answer shape | a human or program needs a different output form |
| Examples | Shows boundary cases | the model is confusing categories or style |
This taxonomy is a writing tool, not a security wall. In September 2022, Simon Willison described prompt injection attacks against GPT-3, where text placed in a prompt could compete with the developerâs intended instruction. The durable lesson is not âdelimiters solve itâ; they do not create a hard boundary inside the model. The lesson is more basic: if you cannot tell which text is instruction and which text is untrusted context, you cannot even reason about the failure.
Now reread the support prompt. Instruction says âclassify, do not answer.â Task says âpick one label.â Context is the ticket itself. Format says JSON. Examples teach where two labels start and stop. If you change the ticket text, you changed context. If you ask for CSV instead of JSON, you changed format. If you add a case like "Password reset loop" -> access, you changed examples. The model sees one stream, but you should edit it with a scalpel.
The fastest debugging move is to name the role before changing text. âIt keeps apologizingâ is probably an instruction problem. âIt answered the wrong customerâ is probably a context problem. âIt wrote a paragraph when my parser needs fieldsâ is a format problem. âIt cannot tell refund requests from account-access requestsâ calls for examples. That habit keeps prompting from becoming folk magic: every edit is a hypothesis about which role is broken, and the next receipt tells you whether the hypothesis helped.
Exercise: role surgery
Write the compact support-triage prompt. The checker reads your prompt, not the modelâs answer: it looks for the five anatomy labels in order and checks the prompt token budget.
Write a compact support-triage prompt with five labeled roles, in this order: Instruction, Task, Context, Format, Examples. The checker reads your prompt and keeps it under 85 prompt tokens.
No model connected â connect one to run your attempt.
Check your understanding
What is the anatomy view for?