What is a system prompt? How to write one, with examples
What a system prompt is, how it differs from a user prompt, what to put in one, and system prompt examples for ChatGPT, Claude, Gemini and custom AI assistants.
By the ThinkWithPrompt editorial team at Synottic · Updated 16 October 2026
A system prompt is a set of standing instructions given to an AI model before the conversation starts, telling it who it is, what it should do, how it should respond and what it must never do. The user’s messages then arrive on top of it. Every AI chat product has one, and every custom assistant you build in ChatGPT, Claude or Gemini starts with one, so writing a good system prompt is the single biggest lever on how an assistant behaves.
How is a system prompt different from a user prompt?
A user prompt is the message you type for one task: “summarise this report”. A system prompt sits underneath every message in the conversation and sets the ground rules: “You are a support assistant for an accounting app. Answer only from the help-centre articles provided. If you are not sure, say so and offer to connect the user with a person.” Models are trained to give system instructions more weight than ordinary messages, which is why they are the place for role, scope, tone and safety rules.
| System prompt | User prompt | |
|---|---|---|
| Written by | The person or team building the assistant | Whoever is chatting |
| Applies to | The whole conversation | One turn |
| Contains | Role, audience, scope, rules, tone, output format, tools | The task and its details |
| Where you set it | Custom Instructions, GPTs, Claude Projects, Gems, the API “system” field | The message box |
What should a system prompt include?
- Role and purpose. Who the assistant is and the one job it exists to do. “You help new employees at Acme find answers about HR policies.”
- Audience. Who it is talking to and what they already know. This sets vocabulary and depth.
- Scope. What it should and should not handle, and what to do with out-of-scope requests (“politely say this isn’t something you can help with and suggest who to contact”).
- Knowledge and sources. What to rely on: uploaded documents, a pasted policy, only the context provided. Say what to do when the answer isn’t there.
- Behaviour rules. Ask a clarifying question when the request is ambiguous; never guess figures; cite the section it used.
- Tone and format. Plain English, short paragraphs, bullet lists for steps, a fixed structure if answers feed another system.
- Hard limits. Things it must never do, stated plainly: give legal advice, share personal data, make commitments on the company’s behalf.
A system prompt example
How do you write a better system prompt?
- Explain the why. “Keep answers under 150 words because people read them on their phones” works better than a bare limit, because the model can apply the reason to cases you didn’t list.
- Say what to do, not only what not to do. Pair every “don’t” with the behaviour you want instead.
- Show one example of an ideal answer if format matters. One good example often beats a paragraph of description; see few-shot prompting.
- Separate instructions from material. Put reference documents under a clear label or between tags so the model doesn’t mistake their content for instructions.
- Test with awkward inputs. Off-topic questions, vague requests, attempts to make it ignore its rules. Fix the prompt, then test again.
- Version it. Keep each change and the reason, so you can roll back when a “small tweak” breaks something.
For a structured way to write the core of a system prompt, the RCTF framework (Role, Context, Task, Format) maps neatly onto role, audience and scope, the job, and the output format.
Frequently asked questions
Where do I put a system prompt in ChatGPT, Claude or Gemini?
In the chat apps you don’t see the real system prompt, but you control something very close to it: Custom Instructions and custom GPTs in ChatGPT, Project instructions in Claude, and Gems in Gemini. In the APIs, the system prompt is a separate field (or “system” message) sent with every request.
How long should a system prompt be?
As long as it needs to be to remove guesswork, and no longer. Simple assistants work well with 150–300 words. Assistants with many rules, tools or a large knowledge base often need more, but every line should change behaviour; delete anything the model would do anyway.
Can users see or override my system prompt?
Assume a determined user can get a model to reveal its system prompt, and that clever inputs can sometimes push it off its instructions. Never put passwords, keys or private data in a system prompt, and enforce anything security-critical in your own code, not just in the prompt.
What is the difference between a system prompt and a prompt template?
A system prompt is standing instructions that apply to the whole conversation. A prompt template is a reusable message with blanks that you fill in and send for a specific task. Many assistants use both: a system prompt for role and rules, templates for repeat tasks.
Prompts that help you write system prompts and instructions
- Write custom instructions for my AI assistantCustom instructions, a project brief, or a custom GPT/Claude Project setup so the AI works the way you do.
- Design an internal knowledge assistantHow an AI assistant should answer employee questions from your documents: sources, tone, and escalation.
- Write an operating contract for an AI agentDefines an AI agent's objective, scope, what it can and cannot do, success measures, and who owns it.
- Diagnose why my AI chatbot gives off-topic or irrelevant answersPinpoints whether the problem is the prompt, retrieval, context, or settings, and gives targeted fixes plus test cases to confirm them.
- Make AI ask me the questions that matter before it answersMakes AI identify missing information and ask the fewest questions needed before producing a high-quality result.
- Build a reusable prompt templateCreates a fill-in-the-blanks template for a task you repeat often.
More guides
- How to write a good AI prompt: a practical guide
- RTF vs RCTF vs RCTFVV: which prompt framework should you use?
- The CO-STAR prompt framework explained, and how it compares to RCTF
- Few-shot vs chain-of-thought prompting: when to use each
- Prompt meaning: what is a prompt in AI? Parts and examples
- Prompt meaning in Hindi: प्रॉम्प्ट का मतलब, AI प्रॉम्प्ट क्या है और उदाहरण
- What is prompt engineering? A practical beginner’s guide
- Prompt templates: how to build reusable AI prompts, with examples
- How to prompt reasoning models: what changes with “thinking” AI
- Prompt chaining: how to break big AI tasks into steps