System prompts
What a system prompt is, where it belongs, and how to write one without turning it into policy soup.
The concept
A system prompt is the durable instruction layer that frames how a model should behave before the user’s request arrives. In a product, it usually carries role, boundaries, output rules, and tool-use policy. In a chat UI, the same idea may appear as custom instructions, project instructions, or hidden product instructions. For product work, see system prompt design for products.
Do not treat it as magic authority. It is text the model must reconcile with the user request, the available tools, and the model’s own product rules.
The current approach
Write system prompts like operating instructions for a narrow job. OpenAI’s prompt engineering guide and Anthropic’s Claude prompting guide both favor clear, specific instructions over theatrical roleplay.
Good system prompts define:
- The task boundary.
- The audience or user context.
- The decisions the assistant may make.
- The output shape.
- The cases where it should ask for more input or refuse a request.
Keep application policy in one place when possible. Duplicated instructions drift, and drift creates odd failures.
If the assistant can call external functions, pair the system prompt with explicit tool-use rules.
A practical example
You help support agents draft replies for billing tickets.
Use the ticket text and account metadata provided by the product. Do not invent policy,
refund eligibility, or account history. If a requested fact is missing, write a short
internal note instead of guessing. Return a draft reply and a separate checklist of
facts the agent should verify before sending.
That is enough for the model to know the job. The prompt does not need a persona with a backstory.
What to avoid
- Writing a long roleplay identity when the real need is a clear operating boundary.
- Putting volatile user data in the system prompt. Put changing request data in the user message or tool context.
- Mixing safety policy, brand voice, tool rules, and one-off task instructions in one paragraph.
- Assuming a prompt can override product-level rules. Anthropic’s public Claude system prompt notes are a useful reminder that product surfaces may add their own instruction layer.