What is a system prompt?

A system prompt is the instruction text given to a language model before a conversation starts, which sets the model's role, tone, limits and output format. Users do not see it, yet it shapes every answer the assistant gives. The same model can act as a support agent, a proposal writer or a code reviewer, depending only on the system prompt.

Definition

A system prompt is the instruction text given to a language model before a conversation starts, which sets the model's role, tone, limits and output format.

How does a system prompt work?

Every request to a language model is built from layers. The team that builds the application writes the system prompt. The end user writes the user message. The system prompt is sent again with every request and takes up space in the context window. Models usually give system instructions more weight than user messages. That is a tendency, not a guarantee.

What belongs in a good system prompt?

A good system prompt says who the assistant is and whom it serves. It lists what the assistant does and does not do. It defines what to say when the answer is unknown, and how long and in what format answers should be. One or two good examples often work better than a long list of rules.

A system prompt is not written once and left alone. It is versioned like code, tested against real questions, and every change is recorded. This is the most concrete output of prompt engineering.

What should you watch for?

For multilingual assistants, state the reply language and the form of address explicitly. In Turkish or German, for example, the model may otherwise drift between formal and informal address. Add company terms and product names that must not be translated.

Keep customer data and personal data out of the system prompt. A system prompt is not a security boundary either. Prompt injection attacks try to override its instructions. Enforce permissions in code and add guardrails that check inputs and outputs. If the assistant talks to the public, the EU AI Act’s transparency rules on disclosing AI interaction may apply. Review them together with your legal counsel.

Further reading

Related terms

Frequently asked questions

What is the difference between a system prompt and a user prompt?

The system prompt is written by the team that builds the application and stays the same across conversations. The user prompt is what the end user types at that moment. Models usually give system instructions more weight.

Does a system prompt stay confidential?

Do not rely on it. Users can often extract the text with the right questions. Never put API keys, passwords or personal data in a system prompt. Write it so that a leak would do no harm.

How long should a system prompt be?

Long enough to describe the task clearly. The system prompt is sent with every request, so token cost and latency grow with its length. For knowledge that changes often, RAG is a better fit than a longer prompt.

Let’s talk about your transformation

Tell us which work repeats every week. We will tell you honestly whether it is worth automating.

How we start

  1. A free first callWe pin down the problem and the goal together.
  2. A 2-week discovery sprintWe look at the data, the process and the tools, and decide where to start.
  3. A written proposalScope, architecture and timeline, in writing.

Example questions

Go straight to

CorrAI answers with AI from the content of this site and can be wrong. Please do not enter personal details. Privacy

Book a free call