A system prompt is the set of instructions a developer or app gives an AI model before any user message arrives. It tells the model who it is, what it should and should not do, and how to answer. The user usually never sees it.
What it does
When you chat with a support bot that stays polite, refuses off-topic requests and answers in a fixed format, a system prompt is doing that work. It is the briefing a manager gives a new hire before the first customer walks in. The customer asks questions. The briefing shapes every answer.
A system prompt commonly covers:
- Role. "You are a billing assistant for Acme."
- Rules. What topics to avoid and what to do when unsure.
- Format. Length, tone, language and structure of replies.
- Tools. Which actions the model may take and when. See tool use.
- Context. Facts about the product or the user that the model should know.
How the model treats it
Models are trained to give system-level instructions more weight than user messages, and to give user messages more weight than text found in web pages or tool results. That ordering is called an instruction hierarchy. It is not a perfect wall. Clever users can sometimes get a model to ignore its rules, which is a jailbreak, and hidden text in a page can try to override it, which is prompt injection.
A system prompt also takes up space. It counts toward the context window and is billed as tokens on every request. Because it repeats at the start of each call, providers may let you reuse the processed version cheaply through prompt caching.
Why it matters
If you build with AI, the system prompt is your cheapest and fastest way to change behavior, since you do not retrain anything. If you use AI, knowing it exists explains why the same model acts differently in different apps.
Do not put secrets in it. Users can often coax a model into repeating its instructions, so never store passwords, keys or private data there.
Example
A developer writes: "You are a travel assistant. Answer in two sentences. Never give medical advice. If asked about visas, tell the user to check the official government site." A user then asks about visa rules and gets a short answer pointing to an official source, exactly as instructed.
A system prompt differs from fine-tuning, which changes the model itself through extra training. A system prompt only changes the instructions it reads. See also context engineering for how teams manage everything that goes into the model's view.