What is a system prompt?
A system prompt is an instruction that applies in the background to every conversation with an AI service, steering tone, rules and what it should stick to.
The user types the questions. Whoever set up the service has also written an instruction that the model reads before every question. It is usually not visible to the user.
A system prompt can say that the assistant should answer in Swedish, stick to the organisation's documents and say so when the material is missing.
The instruction steers a lot but gives no guarantee. Important limits, such as who may see which documents, therefore need to sit in the system itself.
How it works
When a user asks a question, the service assembles a text with the system prompt first. The conversation and any documents follow. The model has been trained to give the system prompt a lot of weight, but it reads it as text, just like everything else.
A typical line in a system prompt tells the assistant to say so when the answer is not in the documents and to suggest who can help. A line like that reduces the risk of guesswork.
Why it matters
The system prompt makes an assistant behave the same way every time. It sets tone, language, length and how cautious the assistant is. It can also describe the job, for example that the assistant answers staff about internal procedures and refers questions about individual cases elsewhere.
What to keep in mind
Assume a system prompt can become known. Do not put passwords, internal contact details or anything else sensitive in it.
Try the assistant on the questions that usually come up, and adjust the instruction when answers do not match how it should behave.
What it means for you
Do not rely on instructions to protect sensitive information. Permissions should be enforced by the system.
Common questions
Who writes the system prompt?
Whoever builds or maintains the assistant, ideally together with the owner of the content. It should reflect how the organisation wants questions answered.
Can a system prompt stop AI from making things up?
It helps, for example by telling the assistant to stick to the material and say when there is no answer. The answers also need to be grounded in the right documents.
Can users get around the system prompt?
People do try to get models to ignore their instructions. Protection of sensitive information should therefore sit in access control, which a prompt cannot change.
Related terms
Read more
All terms Updated