System Prompt Generator
Role, task, rules and a fallback in; a structured system prompt out in markdown, XML tags or plain paragraphs, with its recurring token cost shown.
Charged on every request in the conversation, not once — a long system prompt is a recurring cost, which is what makes prompt caching worth reading about.
- Sections
- 7
- Rules
- 4
- Rules stated as prohibitions
- 2
- Vague phrases found
- 0
- Characters
- 839
- Stated as a prohibition: "Do not guess at endpoints or field names that are not in the excerpts." — a rule the model can follow positively ("use only the endpoints listed above") is followed more reliably than one it has to avoid.
- Stated as a prohibition: "Never invent a version number." — a rule the model can follow positively ("use only the endpoints listed above") is followed more reliably than one it has to avoid.
A system prompt does two jobs: it fixes the things that are true of every request, and it stays out of the way of the things that are not. Most bad system prompts fail the second half — they contain the current user's name, today's date, or a description of one particular document, all of which belong in the user message where they can change without invalidating anything.
Structure earns its tokens
Headings or tags cost a handful of tokens and make a prompt editable by someone who did not write it. They also give you somewhere to put a new rule six months from now other than the end, which is how prompts become a thousand words of sediment. Pick markdown or XML by what the rest of your prompt looks like; there is no need to mix them.
Why prohibitions get flagged
"Never mention pricing" puts the idea of pricing in the prompt and gives the model nothing to do instead. "Answer only from the excerpts provided; if the answer is not there, say so" describes an action, and a described action can be followed and checked. Not every prohibition can be rewritten this way — some really are hard limits — but the ones that can be usually should be, and the flag above is a reminder to try, not a verdict.
The fallback line matters most
The single highest-value sentence in most system prompts is the one that tells the model what to do when it does not know. Without it the model answers anyway, fluently, and you find out from a customer.