Skip to main content

AI glossary Conversational

What is a system prompt?

← All glossary terms
In short

Persistent instructions that set a model's role, rules, tools and output format before any user message is read.

Explained

A system prompt is the set of instructions an application gives a large language model before the conversation starts and keeps in place for every turn. It defines the model's role, tone, policies, what it may and may not do, which tools it can use and the format of its answers. Users normally do not see it; they only write the user messages that follow. Because it shapes every answer, the system prompt should be versioned, tested and reviewed like code, as part of operating language models and enterprise guardrails.

What a system prompt usually contains

  • Role and audience: who the assistant is and whom it serves.
  • Task and scope: what it should help with and what is out of bounds.
  • Policies: rules on safety, privacy, tone and when to hand over to a person.
  • Context: facts about the company, product or user that apply to every turn.
  • Tools: which functions the model can call and when to use them.
  • Output format: structure, length, language or a JSON schema.

System prompt vs user prompt

The system prompt is set by whoever builds the application and applies to the whole conversation. The user prompt is what the person types in each turn. Model providers expose this through separate fields, such as a system parameter or a system message. Models are trained to give weight to the system instructions, but they are not a security barrier on their own: a determined user can try to override them through prompt injection, so sensitive rules also need checks outside the model.

Writing and maintaining system prompts

  • Be explicit and specific; state rules plainly rather than relying on hints.
  • Keep the system prompt focused on what is stable, and pass task details in the user turn or as retrieved context.
  • Store it under version control and record which version produced each answer.
  • Test every change against a set of representative conversations before releasing it.
  • Do not put secrets or credentials in it, since it can sometimes be extracted.

Frequently asked questions

What is a system prompt in simple terms?

It is the hidden set of instructions that tells an AI assistant who it is, what rules to follow and how to answer. The application sets it once and it applies to every message in the conversation.

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

The system prompt comes from the developer and applies to the whole conversation. The user prompt is the message the person writes in each turn. The model reads both, giving weight to the system instructions.

Can users see or change the system prompt?

Normally they cannot see it, but users sometimes manage to extract it or to push the model to ignore it through prompt injection. For that reason, it should not contain secrets, and critical rules should also be enforced outside the model.

How long should a system prompt be?

As long as it needs to be clear, and no longer. Long prompts cost more and can dilute the important rules. Put stable instructions in the system prompt and pass task-specific details with each request.

How do you test a system prompt?

Run it against a set of typical and difficult conversations, including attempts to break the rules, and check the answers against agreed criteria. Repeat the tests after every change and when switching models.

Where it shows up at Thinkia

Products

Further reading

Sources

Updated: 2026-10-21

Want to see how this applies to your organisation?

Talk to an AI Expert