What this tool does, and what it refuses to do
It assembles a prompt from six sections in an order models respond well to, and prices the result as you type. It does not write the prompt for you. Tools that "generate" a prompt with a language model produce generic text, cost someone money on every click, and take your input to a server. This one is a structure, running entirely in your browser.
The token readout is the part that changes behaviour. Watching the count climb while you add a fourth example makes the trade-off concrete in a way that reviewing the prompt afterwards never does.
Why the order is fixed
Models attend more strongly to the beginning and end of a prompt than the middle — an effect consistent enough across architectures that prompt structure should assume it. The builder puts each section where that works in your favour:
- Role and task first. The framing everything else is interpreted through. If the model gets nothing else right, it should get this.
- Context and examples in the middle. Usually the bulk of the tokens, and the part that tolerates being in the low-attention zone because it is reference material rather than instruction.
- Constraints and output format last. The freshest thing before generation begins. Format instructions placed early are forgotten by the time the model reaches a long answer; placed last, they hold.
The XML tags
Wrapping sections in tags like <context> and <instructions> measurably improves instruction-following on long prompts. The reason is boundary ambiguity: without delimiters, a model reading 3,000 tokens of reference material followed by an instruction has no structural signal for where the reference stopped and the command started. Anthropic recommends the pattern explicitly.
The cost is roughly eight tokens per section. Below a few hundred tokens of context it is noise you can skip. Above that it is one of the cheapest quality improvements available. The overhead figure updates live so you can decide rather than guess.
Writing each section
Role
One sentence, or omit it. "You are a helpful assistant" changes nothing and costs tokens on every request forever. "You are a triage assistant for a B2B support desk" changes vocabulary, assumed domain and default tone.
Task
One imperative sentence. If you need two, you probably have two prompts, and splitting them almost always outperforms asking for both at once.
Examples
Two or three well-chosen examples beat several paragraphs of instruction, particularly for format compliance. But they are the most expensive section per unit of instruction, and they are resent on every request. Watch the counter: if examples double your prompt and the prompt runs a million times a month, that is a permanent line item worth being deliberate about. Price it in the cost calculator.
Constraints
Negatives belong here rather than scattered through the task. Grouped prohibitions are followed more reliably than the same rules buried mid-paragraph.
Output format
Be specific and show the shape. If you want JSON, write the exact keys. Vague format instructions are the single most common cause of a parser failing in production.
After the prompt is written
Run it through the prompt optimizer to strip structural waste, then — if this is a system prompt that ships on every request — through the system prompt analyzer, which prices each paragraph individually per year. Prompts that look reasonable in isolation frequently contain a paragraph costing four figures annually and earning nothing.