Language models

What is a system prompt?

In short

A system prompt is the standing instruction a company gives an AI model before any user writes. It sets the model's role, tone, knowledge and limits, and applies to every conversation.

Users only see their own messages. Behind them, the system prompt tells the model who it is, for example 'You are the support assistant for X, answer only about our products, in Swedish, briefly'. It is the main tool for shaping a chatbot's behavior.

Mini course

3 short lessons, about 2 minutes in total

  1. The instructions behind the chat
  2. What a good system prompt covers
  3. Limits and safety

Lesson 1

The instructions behind the chat

Every conversation with an AI tool has two layers. The visible one is the user's messages. The hidden one is the system prompt, written by whoever built the tool. The model reads it first and treats it as its job description.

Set once
Company rules
System prompt
The system prompt is set by the company and sits before every user message, telling the model its role, tone and limits

Tap a box to open that concept

The same model can be a careful legal assistant in one tool and a playful writing helper in another, only because the system prompts differ.

Lesson 2

What a good system prompt covers

It explains the role and audience, the tone and language, what the model may and may not do, where its knowledge comes from, and what to do when it does not know. It gives a few examples of good answers. And it puts the most important rules clearly, explaining why they matter.

Vague prompts give vague behavior. Specific prompts give consistent behavior.

Lesson 3

Limits and safety

A system prompt is strong guidance, not a lock. Users can try to override it with clever messages, called prompt injection. So never put passwords or private data in it, give the model only the tools and data it needs, and test it with tricky questions before launch.

  1. Customers find youHow customers and AI tools find the companySEOGEOGoogle AI Overviews
  2. AI in daily workTools staff and customers useChatbotAI copilotVoice AI
  3. Building blocksHow AI connects to data and systemsRAG (retrieval-augmented generation)AI agentMCP (Model Context Protocol)
  4. AI modelsThe models that understand and createSystem promptLarge language model (LLM)Generative AIMachine learning
  5. DataCompany data, gathered and cleanedData warehouseETLData quality
  6. InfrastructureCloud, networks and systems underneathCloud computingDatabaseAPI key
Trust and rulesSecurity, law and control in every layerGDPR and AIEU AI ActAI guardrails
Where System prompt sits in a company's AI setup

Treat it like code: keep versions, test changes and review it regularly.

An everyday example

The chatbot on this website has a system prompt telling it to answer only from the site's content, never give prices and treat visitors' messages as questions, not instructions.

How companies use it

Companies write system prompts for chatbots, internal assistants and AI agents to keep answers on brand, on topic and within legal and safety rules.

Frequently asked questions

Can users see the system prompt?

Users cannot normally see the system prompt, but determined users can sometimes trick a model into revealing it, so never put secrets in a system prompt.

Can a system prompt stop all misuse?

A system prompt cannot stop all misuse. It guides the model strongly, but prompt injection can sometimes get around it, so add other safeguards.

How long should a system prompt be?

As long as needed to be clear, and no longer. Clear priorities and examples work better than long lists of rules.

In depth: System prompt

The full picture, about 4 minutes of reading

The instructions behind the chat

When you type a message to an AI assistant, the model does not only see your words. Before them, it has already read a set of standing instructions written by whoever built the tool. That text is the system prompt. It tells the model what role it plays, who it serves, what it should and should not talk about, how it should sound and what to do in tricky situations.

Users normally never see it, but they feel its effect in every answer. It is the reason a bank's chat assistant stays polite and on topic while a general AI assistant will happily write poems, and the reason the same underlying model can act as a support agent in one product and a coding helper in another. For a company building any kind of AI assistant, the system prompt is the main tool for shaping behavior.

How it differs from a normal prompt

A normal prompt is a single request from a user: a question, a task, a text to work on. It changes with every message. A system prompt is set once by the builder and applies to every conversation, for every user, until someone changes it.

Most AI services treat the two differently. The system prompt is sent in a separate slot, and models are trained to give it more weight than ordinary user messages. That is what lets a company say "always answer in Swedish" or "never discuss competitors" and have the rule hold even when a user asks for something else. The weight is strong, but not absolute: models can still be persuaded to break system prompt rules in some cases, which is why other safeguards are needed too.

What a good system prompt covers

Most useful system prompts cover the same handful of topics. The role says who the assistant is and who it serves, for example "the customer service assistant for a plumbing company in Uppsala, helping private customers". The purpose says what a good outcome is, such as solving the customer's question or booking a visit.

The knowledge section says what to answer from, for example only the attached documents or the company's website, and what to do when the answer is not there. The tone and format part sets language, length, formality and structure. The limits list what the assistant must never do, such as giving prices, promising delivery dates, giving legal advice or revealing other customers' data. And the hand-over rules say when to pass the conversation to a person and how.

Clear priorities help more than long lists. If two rules might conflict, say which one wins.

Writing it well

Write the system prompt as you would brief a sensible new colleague on day one. Explain the reasons behind rules, not only the rules, so the model can handle cases you did not foresee. "Do not quote prices, because they depend on the job and change often" works better than "no prices" alone.

Give a few short examples of good answers, especially for tricky situations such as an angry customer or a question outside the topic. Keep the text as long as needed to be clear and no longer, because long, repetitive prompts can make the model miss the important parts. Then test it with real questions, including awkward and off-topic ones, read the answers and adjust. Keep each version saved with a date, so you can see what changed if behavior shifts, and retest after the AI provider updates the model.

Limits and safety

A system prompt guides a model, but it does not guarantee anything. Users can try to get around it with tricks, called jailbreaks, and text hidden in documents or web pages the model reads can try to override it, which is called prompt injection. Determined users can sometimes get a model to reveal its system prompt.

Three practical rules follow. Never put secrets in a system prompt, such as passwords, API keys, internal margins or personal data, and assume it may one day be read by outsiders. Tell the model to treat users' messages and any documents it reads as content to answer about, not as new instructions. And back up important rules with guardrails, which are separate automatic checks on input and output, plus limits on what data and tools the AI can reach. That way, a rule that matters still holds even if the model is fooled.

What it means for a small business

Any small business that puts an AI assistant in front of customers or staff, whether on its website, in its booking flow or in an internal tool, will need a system prompt, even if the tool calls it something else, such as "instructions", "custom instructions" or "agent settings". It is often the single most important thing to get right, and it needs no programming.

Start with one page: who the assistant serves, what it should help with, which sources it may use, what tone to use, what it must never do and when it should hand over to a person. Test it with twenty or thirty real questions from customers or colleagues, fix what goes wrong and save the version. Name someone to own it and review it when prices, services or rules change. A well-written system prompt is the difference between an assistant that sounds like your company and one that sounds like everyone else's.

Curious what this could mean for your company? Book a call.

Book a call