# System Prompt

> Rules set before the chat starts. They shape each answer the model gives.

**Field:** Artificial Intelligence  
**Category:** Working with AI  
**Also known as:** System Message, System Instructions

## Think of it like

Think of it like the rules a coach gives a team before the game. They hold for the whole game.

## Definition

A system prompt is a set of rules given to a model before the chat starts. It sets the model's job, tone and limits for every turn that follows. The person using the app most often cannot see it. Apps use it to say who the helper is, what it helps with and what it must not do. The model gives it extra weight. But it is still just text, and a user can sometimes talk the model out of it.

## Example

Lucy's bike shop bot has a short system prompt with four rules. Every customer chat starts with it, though no customer ever sees it.

## Example code

```text
You help customers of a bike shop.
Answer in two or three short sentences.
If you do not know, say so and give the shop's phone number.
Never promise a refund.
```

A short system prompt. The customer never sees it, but every answer follows it.

## Why it matters

It is how one model becomes many different assistants. Each app writes its own system prompt.

## Common mistake

Treating it as a lock. A user can sometimes talk the model out of it, so never put secrets in a system prompt.

## Three principles

- **Set before the chat.** Holds for every turn.
- **Hidden from users.** Usually not shown.
- **Not a lock.** Keep secrets out.

## Related terms

- [Prompt (AI)](https://learn.benibix.com/term/ai/prompt)
- [Role Prompting](https://learn.benibix.com/term/ai/role-prompting)
- [Agent Instruction File](https://learn.benibix.com/term/ai/agent-instruction-file)
- [Instruct Model](https://learn.benibix.com/term/ai/instruct-model)
- [Prompt Injection](https://learn.benibix.com/term/ai/prompt-injection)
- [Message Roles](https://learn.benibix.com/term/ai/message-roles)
- [Prompt Leaking](https://learn.benibix.com/term/ai/prompt-leaking)

## Told apart from

- [Custom Instructions vs System Prompt](https://learn.benibix.com/compare/custom-instructions-vs-system-prompt): People think their custom instructions are the system prompt, and they are not. The app writes its own system prompt, and you never see it. Your custom instructions are a small note added to it. So the app's own rules still win when the two clash.

## Taught in

- [The LLM Context Window](https://learn.benibix.com/learn/ai-llms/llm-context-window): LLMs, 4/15
- [System Prompts and Roles](https://learn.benibix.com/learn/ai-working-with-ai/system-prompts-and-roles): Prompt Engineering, 3/16
- [System Prompt Flags](https://learn.benibix.com/learn/ai-claude-code-commands/system-prompt-flags): Claude Code Commands, 16/17

![A chat drawn as a stack. At the top, a hidden system prompt box spans the whole chat. Below it, user and assistant turns take turns.](https://learn.benibix.com/diagrams/pr-system-prompt.svg)

---

Source: https://learn.benibix.com/term/ai/system-prompt
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-18
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
