TokenPad
Building

Structured Prompt Builder

Assemble a prompt from the parts that actually change the output.

Sections

Who the model is acting as. One sentence. Skip it if it adds nothing.

The single thing you want done, stated as an imperative.

Reference material the model needs. Usually the largest section.

Two or three usually beat several paragraphs of instruction.

What not to do. Negatives work better here than buried in the task.

Last, so it is the freshest instruction before generation.

PromptExact
0tokens
Sections used0 / 6
Cost as input$0.00
× 100K requests$0.00
Tag overhead~0

Nothing here is generated by an AI. You supply the content; the builder enforces an ordering models respond well to, and prices the result as you type.

Stored in your browser only — no account, nothing uploaded.

Assembled prompt
Fill in a section above and the assembled prompt appears here.

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.

Frequently asked questions

Does this use AI to write my prompt?
No, and that is deliberate. Tools that "generate" a prompt with a language model produce generic text and cost someone money on every click. This is a structure: you supply the content, it enforces an ordering that models respond to well, and it prices the result. Nothing is sent anywhere.
Why does section order matter?
Models weight instructions near the start and end of a prompt more heavily than the middle. Role and task belong at the top, long reference context in the middle, and output format constraints at the end where they are least likely to be forgotten. The builder enforces that ordering rather than leaving it to chance.
What are the XML tags for?
Delimiting sections with tags such as <context> and <instructions> measurably improves instruction-following on long prompts, because it removes the ambiguity of where reference material ends and commands begin. Anthropic recommends the pattern explicitly. The tags cost a handful of tokens and are usually worth it above a few hundred tokens of context.
Should I include examples?
Two or three well-chosen examples usually beat several paragraphs of instruction, and the builder counts what they cost so the trade is visible. Watch the token readout as you add them: if examples double your prompt and the prompt runs on every request, that is a permanent bill worth being deliberate about.

More building tools