What is a system prompt?
A system prompt is the standing set of instructions a product gives an AI model before the user says anything. It defines the assistant's role, tone, rules and available tools, and it applies to every conversation.
Users type the user prompt. Your team writes the system prompt. It is where a general model becomes your product: "You are the support assistant for a Canadian payroll app. Answer only from the help-centre articles provided. If a question is about tax advice, say you can't advise and offer to connect a human."
What goes in one
- Who the assistant is and who it serves
- What it should and shouldn't do, with reasons
- Tone and format
- The tools it can call and when (see tool use)
- Examples of good answers
Things to know
- Treat it like code. Keep it in version control, review changes, and test each change with evals.
- It is not a secret vault. Users can often get a model to reveal its system prompt, so don't put credentials or anything confidential in it.
- It is not a security boundary. Instructions can be overridden by clever input. See prompt injection and guardrails.