System prompt
A system prompt is a set of instructions given to an AI model before the conversation begins, defining its role, tone, rules and output format for the whole session. It is usually written by the developer or configured in an app's settings, and the model applies it to every user message that follows.
Chat-based model APIs separate messages by role, typically system, user and assistant. The system message sits at the start of the context and carries standing instructions, such as "You are a support assistant for an accounting product; answer only from the provided documentation; reply in British English." Consumer apps expose a similar idea through custom instructions or project settings.
Why it matters: the system prompt is where much of an AI product's behaviour is set. Two products built on the same model can feel very different because of their system prompts. If you build internal assistants, a well-written system prompt is often the cheapest way to enforce tone, scope and safety rules before considering fine-tuning.
Example: a company configures its internal assistant's system prompt to cite the relevant policy document in every answer and to decline questions about individual employees' pay.
Limits: models usually follow system prompts but not perfectly, and users or injected content can sometimes override them. Never put secrets in a system prompt, and enforce critical rules in application code as well.
Related terms
Learn it step by step
Topic: Prompt engineering
Last updated