Skip to the page
Tecyfy

What is a system prompt?

Instructions the builder of an AI app gives the model before you type anything. It sets the role, the tone and the rules, and it outranks what users say.

beginner · Also called System Message, Developer Message, Instructions

Every AI app you use has been briefed before you arrive. A support bot knows it works for one shop. A coding assistant knows to answer in code. That brief is the system prompt: text the app's builder puts in front of every conversation, usually out of your sight.

Anthropic calls it the system prompt. OpenAI calls the same thing developer messages, or instructions. The idea is identical.

What goes in one

A system prompt usually covers:

  • A role. "You are a helpful coding assistant who specialises in Python." Anthropic notes that even a single sentence like this changes the model's focus and tone.
  • Rules. What to do, what not to do, and how to say no.
  • Context. Today's date, the product, the customer's account level.
  • Format. Short answers, plain language, no tables, always cite sources.

Why it outranks you

Models are trained to give the builder's instructions more weight than the user's. OpenAI's documentation says it plainly: developer messages are prioritised ahead of user messages. That is what lets a bank's chatbot refuse to write your essay. It was told to stick to banking, and your request ranks below that.

It is also why a system prompt should say that text from web pages, files and tool results is information, not orders. That line is one of the defences against prompt injectionPrompt InjectionAn attack that hides instructions in text a model reads, such as a web page, an email or a file, so the model follows the attacker instead of you..

What it is not

A system prompt is not a safe. OWASP, the security group, says it should not be treated as a secret or used as a security control. Users do sometimes coax a bot into repeating its instructions, so builders should keep passwords and keys out of it and enforce real limits in code.

It also takes up room. The system prompt sits in the context windowContext WindowEverything a model can see at once while it writes an answer, counted in tokens. When the window is full, something has to be left out. on every turn, so a long one costs tokens on every message.

Using the idea yourself

You can write your own. If your chat app has a setting for custom or standing instructions, that is your system prompt. Keep it short and specific: who you are, what you want, what to avoid. Calm wording works better than capitals. Anthropic warns that "CRITICAL: you MUST" style prompts can make newer models overdo the thing you asked for.

Sources

Where each fact comes from

  1. 1Prompting best practices
  2. 2Text generation
  3. 3Mitigate jailbreaks and prompt injections
  4. 4LLM07:2025 System Prompt Leakage
  5. 5Context windows