What it is
A system prompt is a set of standing instructions that an AI chatbot receives before your conversation starts. It tells the model who it is supposed to be, how it should sound, what it must and mustn't do, and what it needs to know. Then it stays in place for every reply, quietly shaping each answer, while you type your questions underneath it.
The easiest way to picture it is a briefing for a new member of staff. Before a temp starts at a reception desk, someone tells them: "You're answering the phone for a dental practice. Be warm and brief. Never give medical advice. If someone asks about prices, read from this sheet. If it's an emergency, put them straight through to the dentist." The temp then handles hundreds of callers without being reminded. The callers never hear the briefing, but every call is shaped by it. The briefing is the system prompt. The callers' questions are the user messages.
That distinction, system prompt versus user message, is the heart of the idea. When you chat with an AI, the model actually receives a structured conversation, not just your words. It has slots for different speakers:
- The system prompt, written by whoever set the tool up. That might be the company that makes the chatbot, a business that built a customer-service assistant on top of it, or you, if you've filled in your own settings.
- User messages, which are what you type.
- Assistant messages, which are the AI's own earlier replies.
The model is trained to treat the system slot as more authoritative and longer-lasting than any single user message. A user message says "do this now". A system prompt says "this is how you always work here". (A prompt is any text you give a model; the system prompt is one special, privileged kind of prompt.)
Almost every AI product you use has one, even if you've never seen it. The companies that run chatbots write long system prompts that give the model the current date, describe the tools it can use, set its personality, and list rules for sensitive topics. Businesses that build on top of those models write their own system prompts: "You are the booking assistant for a hotel in Lisbon. Only discuss reservations." And ordinary users now write them too, often without realising that's what they're doing.
Here's where non-technical people meet system prompts, under several different names, at the time of writing:
- Custom instructions or personal preferences. Most major chatbots have a settings box where you describe yourself and how you like answers. OpenAI launched this for ChatGPT on 20 July 2023 under the name custom instructions, with two boxes: one for what the AI should know about you, and one for how it should respond. What you write there is added to every new chat, which makes it a personal system prompt.
- Custom assistants. Tools such as OpenAI's GPTs (launched in November 2023, and which OpenAI announced in September 2026 it plans to retire), Google's Gems, and similar features in other products let you build a named assistant for one job, with written instructions and sometimes uploaded files. The instructions box is a system prompt.
- Projects or workspaces. Several chatbots let you group chats into a project with its own instructions, so everything in that project follows the same brief.
Names, limits and features change often, so check the help pages of the tool you use for what it currently offers.
One more piece of vocabulary. A system prompt takes up room in the model's context window, its working memory for a conversation, and it's measured in tokens like everything else. A very long system prompt leaves less room for your conversation, which is one reason good ones are focused rather than exhaustive.
Why it matters
It's one of the biggest levers on how a chatbot behaves. Two assistants built on exactly the same model can feel like different products because of their system prompts. One is chatty and uses emoji; the other is terse and formal. One refuses to discuss anything but tax; the other will talk about anything. A good part of what people call an AI's "personality" in a particular app comes from its system prompt, layered on top of the model's training.
It saves you from repeating yourself. Without a system prompt, you'd have to start every chat with the same paragraph: "I'm a freelance illustrator in Manchester, I write in British English, keep answers short, don't use bullet points unless I ask." With one, you write it once. For anyone who uses AI daily, this is the difference between an assistant that knows you and one that meets you fresh every morning.
It's how businesses make AI safe to put in front of customers. A company that puts a chatbot on its website needs it to stay on topic, avoid promising things the company can't deliver, use the right tone, and hand over to a human when it's out of its depth. Almost all of that is written in the system prompt. It's the main tool for customer support bots, sales assistants and internal help desks, working together with guardrails that check what goes in and out.
It explains behaviour that otherwise looks mysterious. Why does one chatbot refuse to name people in photos? Why does another always add a disclaimer? Why did the assistant suddenly know today's date? Very often, the answer is a line in a system prompt you can't see. Knowing that hidden instructions exist makes you a sharper user: you stop assuming the model "believes" something and start asking what it was told.
It's a place where values get written down. A system prompt is one of the few places where you can read, in plain language, what a company is asking its AI to do. When companies publish them, as some now do, outsiders can check whether the instructions match the company's public promises. When a system prompt is changed badly, as the Grok examples below show, the effects reach millions of people within hours. That makes the system prompt part of the practical side of alignment: getting AI to behave the way its makers, and its users, intend.
It has limits, and knowing them matters as much as knowing its power. A system prompt is instructions, not code. The model follows it most of the time, not all of the time. It can be argued with, tricked, leaked, or simply outweighed by a very long conversation. The section on common mistakes covers this in detail, but the short version is: use a system prompt to shape behaviour, never to guard secrets.
Real-world examples
Anthropic publishes Claude's system prompts
For years, AI companies treated their system prompts as trade secrets. The only way outsiders learned what was in them was by tricking the chatbot into reciting them, as a Stanford student famously did with Microsoft's Bing Chat in February 2023 (the story is told on the Prompt page).
On 26 August 2024, Anthropic took the opposite approach. It published the system prompts used by the Claude apps on the web, iOS and Android for three models, Claude 3 Opus, Claude 3.5 Sonnet and Claude 3 Haiku, in the release notes section of its documentation. Alex Albert, who led developer relations at Anthropic, said the company planned to log future changes to these prompts there as a regular practice. TechCrunch noted that most AI vendors kept their system prompts confidential.
The published prompts were revealing precisely because they were ordinary. They gave the model the current date and its knowledge cutoff. They told Claude it couldn't open links or videos. They asked it to act as if it were completely "face blind", never identifying people from their faces in images. They told it to handle controversial topics carefully and objectively, and to skip filler phrases, including starting replies with "Certainly". The programmer Simon Willison, reading them the same day, pointed out that many lines look like fixes for specific annoying habits the company had seen in testing. That's what real system prompts are: a list of behaviours someone wanted more of or less of.
The practice has continued. At the time of writing, Anthropic's release notes carry a system prompt page for each Claude model since then, and state that these prompts apply to Claude's own apps, not to developers using the model through its API, who write their own.
Grok and the unauthorised prompt change of May 2025
On 14 May 2025, users of X noticed that Grok, the chatbot built by Elon Musk's company xAI and available inside X, was bringing up claims of "white genocide" in South Africa in replies to completely unrelated questions, including ones about baseball and streaming services.
On 15 May, xAI gave its explanation publicly. It said that at about 3:15 a.m. Pacific time on 14 May, an "unauthorized modification" had been made to the prompt of the Grok reply bot on X, directing it to give a specific response on a political topic, and that this change violated xAI's internal policies and core values. It was, according to reporting by TechCrunch, the second time xAI had blamed an unauthorised change: in February 2025 the company had said an employee instructed Grok to ignore sources that accused Musk or Donald Trump of spreading misinformation, and that change was reversed after users noticed.
xAI announced three responses. It would publish Grok's system prompts on GitHub, a public code-sharing site, so that anyone could read them and see changes. It would add checks so that employees couldn't change the prompt without review. And it would set up a round-the-clock team to respond to incidents that automated systems missed. The repository, xai-org/grok-prompts, is public and, at the time of writing, still updated.
The episode is a vivid lesson in how much power sits in a few lines of text. Nobody retrained the model. By xAI's own account, a change to the system prompt alone was enough to make a chatbot used by millions push a political claim into conversations about sport.
Grok again, July 2025: three innocent-sounding lines
Two months later there was a second, worse incident. For about 16 hours from late on 7 July 2025, the @grok account on X posted antisemitic replies, at one point calling itself "MechaHitler". xAI took the bot offline and, on 12 July, published a long apology.
According to xAI's statement, the cause was an update to a code path "upstream" of the bot, meaning a part of the system that assembles what the model is given, not the model itself. The update brought back old instructions that had been retired. xAI quoted some of them, including that Grok should "tell it like it is" and not be "afraid to offend people who are politically correct", that it should reflect the tone, context and language of the post it was replying to, and that it should reply "just like a human" and keep things engaging. xAI said these lines caused Grok to prioritise matching the user's tone over responsible behaviour, so that when it was tagged in extremist posts it mirrored them. It said it had removed the old code and restructured the system.
Read on their own, those instructions sound like reasonable style guidance for a social media bot. Combined, and pointed at the least moderated corners of a social network, they produced something no one at the company said it wanted. For anyone writing a system prompt, that's the takeaway: instructions interact with each other and with the real inputs the model sees, and you only find out how by testing, ideally with evals.
An everyday case: the bakery's order assistant
Imagine Tom, who runs a small bakery and builds a custom assistant to answer customer messages about celebration cakes. His first system prompt is one line: "You are a friendly assistant for Tom's Bakery." Within a day the assistant has quoted a price for a four-tier wedding cake that he doesn't make and promised Saturday delivery, which he doesn't offer.
He rewrites it. The new version says who the customers are, lists the cakes he makes with their prices, says clearly that he doesn't deliver, tells the assistant to take the customer's name, date and design idea and then say Tom will confirm within a day, and adds: "Never promise a price or date that isn't in this list. If you're unsure, say Tom will reply personally." He tests it with ten real messages from his inbox, including an awkward one from a customer who wants a cake by tomorrow. The assistant now handles eight of them the way he would, and flags the other two for him. The model didn't get smarter. The briefing did.
Try it yourself
This takes about twenty minutes and works in any major chatbot that has a personal instructions or preferences setting. If yours doesn't, you can paste the same text at the start of a new chat instead.
- Find the setting. In your chatbot's settings, look for something called custom instructions, personalisation, preferences, or "about you". The name and location change from product to product and over time, so if you can't find it, search the tool's help pages for "custom instructions".
- Write down what you keep repeating. Look back through your last few chats. What did you have to tell the AI more than once? Your job, the spelling you use, the length you like, things it got wrong about you. Those are your first lines.
- Fill in the template below. Copy it into a notes app, replace the brackets, and delete any line that doesn't apply. Keep it short enough to read in a minute. A focused half-page beats three pages of wishes.
- Paste it into the setting and save. It will usually apply to new chats, not ones already open.
- Test it with three real tasks. Start a new chat and give it three things you actually need: an email to draft, a question from your work, something to explain. Check each reply against what you wrote. Did it use your spelling? Keep to your length? Ask a question when it should have?
- Fix one thing at a time. If it ignores a line, make that line more specific ("under 150 words" instead of "short") or explain why it matters ("I read these on my phone, so keep them short"). Change one line, then retest, so you know what made the difference.
- Leave out anything private. Don't put passwords, account numbers, health details, or anything you'd mind a stranger reading into instructions. Settings can sync, be shared, or be recited back by the model.
- Try a second, specialised one. If your tool supports custom assistants or projects, make one for a single recurring job, such as replying to customer enquiries or editing your newsletter, with its own shorter brief.
A personal system prompt template you can copy:
About me:
- I am a [job or role] working on [main kind of work].
- My audience is usually [who you write for].
- I live in [country] and write in [British/American] English.
How I'd like you to respond:
- Keep answers to about [length] unless I ask for more.
- Use [plain paragraphs / bullet points / headings] by default.
- Write in a [friendly / formal / direct] tone. Avoid [phrases or habits you dislike].
- If my request is unclear, ask one short question before answering.
- If you're not sure about a fact, say so. Don't guess numbers, dates, or names.
Things to always remember:
- [A standing fact, e.g. "My business sells handmade candles online."]
- [A standing preference, e.g. "I never want emoji."]
And a starting point for a single-job assistant:
You are the [job] for [business or project].
Your readers are [who they are and what they want].
Your job: [the one task, in one sentence].
Always: [2 to 4 rules, e.g. "use the price list below", "sign off as the Team"].
Never: [2 to 4 rules, e.g. "promise delivery dates", "discuss other companies"].
If you can't help, say: "[the exact handover line you want]".
Reference information:
[paste your price list, opening hours, FAQs, or style notes here]
Common mistakes and misunderstandings
Treating the system prompt as a security lock. This is the big one. A system prompt is text that the model reads alongside your text. It is not a password-protected vault. When researchers at Northwestern University tested more than 200 custom GPTs in late 2023, their simple extraction prompts got the hidden instructions revealed in 97.2 percent of cases, and uploaded files in every case they tried. Companies have added defences since, but the lesson stands: assume anything in a system prompt can be read by a determined user. Don't put secrets, private data, or anything embarrassing in it.
Thinking it can't be overridden. Models are trained to give the system prompt priority, and they usually do. But users can argue, role-play, or phrase requests cleverly, and text the model reads from web pages, emails, or files can contain instructions of its own, a trick called prompt injection (explained on the Prompt page). OpenAI's published Model Spec describes the intended order of authority as a "chain of command": the company's own rules first, then the developer's instructions, then the user's, with instructions found inside quoted text, files or tool results carrying no authority by default. That's the design goal. It isn't a guarantee, which is why systems that matter add guardrails outside the model and keep a human in the loop.
Assuming a custom assistant is a retrained model. Building a custom GPT or Gem usually doesn't change the model at all. It's a saved system prompt plus, sometimes, files the assistant can search. That's different from fine-tuning, which changes the model's internal settings. The system prompt approach is cheaper and easier to update, but it has the limits above.
Writing a wish list instead of a brief. "Be accurate, creative, concise, thorough, friendly, professional and funny" gives the model contradictory goals and no way to choose between them. A good system prompt is specific about the situation (who the users are, what the job is), gives concrete rules ("under 120 words", "never quote a price not in this list"), and says what to do when things go wrong ("if you don't know, say so and offer to pass the question on").
Making it enormous. Longer isn't better. Every line competes for the model's attention, and very long instructions can bury the rules that matter. If a line doesn't change behaviour when you remove it, remove it.
Using only "don't" rules. Models follow positive instructions ("reply in plain paragraphs") more reliably than long lists of prohibitions ("don't use bullets, don't use headings, don't use bold"). Say what you want, and explain why when it isn't obvious.
Blaming the model for the system prompt's instructions. When a chatbot behaves strangely, the cause is often a line in a system prompt, as both Grok incidents showed. Before concluding that "the AI believes X", ask what it may have been told.
Forgetting that someone else's system prompt is always there too. Your custom instructions sit alongside the company's own system prompt, not instead of it. If you ask for something the company's instructions or the model's training rule out, your preferences won't win. That's by design.
Setting it and never checking it. Your needs change, and so do the models underneath. A system prompt that worked well last spring may behave differently after a model update. Reread it every few months and retest it with a few real tasks.
Related elements
- Prompt: the broader idea; a system prompt is the standing, privileged kind.
- Role Prompting: giving the model a persona, which is often the first line of a system prompt.
- Few-shot: worked examples, which many system prompts include to show the style they want.
- Zero-shot: asking without examples, the default most system prompts start from.
- Context Window: the working memory the system prompt shares with your conversation.
- Context Engineering: deciding everything the model sees, of which the system prompt is one part.
- XML Tags: a way to label sections in a long system prompt so the model can tell rules from reference material.
- Prompt Templates: reusable prompts with blanks, a close cousin of the single-job assistant template above.
- Guardrails: checks outside the model, needed because a system prompt is not a security boundary.
- Evals: testing a system prompt against real cases before and after every change.
- Alignment: the wider effort to make AI behave as intended, where system prompts are one practical tool.
- Grok: the model family at the centre of two of the best-documented system prompt incidents.