# System prompt

> A system prompt is the standing set of instructions sent to a chat-style AI model before any user message, defining its role, rules, tone and limits for every conversation in an application.

Also called: system message, system instructions, developer message, meta prompt. Category: Models and training. Source: https://aibuildindex.com/glossary/system-prompt

## In the index

- Customer support chatbot: median $2,000, middle half $300 to $5,300, 1,344 priced briefs (https://aibuildindex.com/cost/support-chatbot)
- Chatbots: median $1,800, middle half $300 to $6,400, 3,801 priced briefs (https://aibuildindex.com/skills/chatbots)

When a business deploys an AI assistant, users only see their own messages and the replies. Behind the scenes, every conversation starts with a hidden block of instructions written by the builder: the system prompt. It tells the model who it is acting for, what it is allowed to discuss, how to format answers and what to do when it cannot help. For a buyer, the system prompt is where much of the assistant's policy lives, so it deserves the same review as any customer-facing script.

## How it works

Chat-style model APIs accept messages with roles, typically system, user and assistant. The system message is placed first and treated as higher-priority guidance than what follows. Some providers call it a developer message or put it in a separate parameter, but the idea is the same.

A support assistant's system prompt might cover:

- The company and products it represents, and that it must not discuss competitors' pricing.
- How to answer: short paragraphs, plain language, links to help articles where relevant.
- What to do when unsure: say so and offer to pass the conversation to a person.
- Hard limits: never promise refunds, never ask for card numbers.

The system prompt is sent with every request, alongside retrieved documents and the conversation history, and it counts towards the [context window](https://aibuildindex.com/glossary/context-window) and token usage each time.

It is guidance, not enforcement. Users can try to talk the model out of its instructions ([prompt injection](https://aibuildindex.com/glossary/prompt-injection)), and models occasionally drift from long or conflicting rules. Anything that must never happen should also be blocked in code or by separate [guardrails](https://aibuildindex.com/glossary/guardrails).

## What it means for cost

Writing a good system prompt is part of [prompt engineering](https://aibuildindex.com/glossary/prompt-engineering): drafting rules, testing them on realistic conversations including hostile ones, and revising. It is usually a modest share of a chatbot build, but skipping the testing shows up later as embarrassing replies.

Because the system prompt is repeated on every call, its length has a direct running cost. A very long system prompt multiplied by thousands of conversations becomes noticeable. [Prompt caching](https://aibuildindex.com/glossary/prompt-caching), offered by several providers, can reduce the cost of a fixed opening block. Ask a builder to show you the system prompt, explain each rule, and say which rules are also enforced outside the model.

## Common questions

### Can users see the system prompt?

Not normally, but it should not be treated as secret. Determined users can sometimes coax a model into revealing its instructions, so nothing confidential, such as passwords or private pricing logic, belongs in it.

### Should the business be able to edit the system prompt?

It helps. Policies, product names and tone change over time, and a build that stores the system prompt as editable configuration avoids a developer change for each update. Edits should still be tested before going live.

### Is a system prompt enough to keep an assistant safe?

No. It sets intended behaviour, but models can be manipulated or make mistakes. Sensitive actions and data need checks in the surrounding software, not only instructions to the model.

## Related terms

- [Prompt](https://aibuildindex.com/glossary/prompt): A prompt is the input given to an AI model to tell it what to do, typically instructions, context, examples and the user's request, from which the model generates its response.
- [Prompt engineering](https://aibuildindex.com/glossary/prompt-engineering): Prompt engineering is the practice of designing, testing and refining the instructions, context and examples given to an AI model so that it produces accurate, consistent and correctly formatted output for a specific task.
- [Guardrails](https://aibuildindex.com/glossary/guardrails): Guardrails are the checks and controls placed around an AI model, such as input filters, output validation, topic limits and action restrictions, that keep its behaviour within safe, permitted and useful bounds in a live system.
- [Prompt injection](https://aibuildindex.com/glossary/prompt-injection): Prompt injection is a security attack in which hostile instructions are hidden in content an AI system processes, such as an email, web page or document, causing the model to follow the attacker's instructions instead of its own.
- [Prompt caching](https://aibuildindex.com/glossary/prompt-caching): Prompt caching is a provider feature that stores the processed form of a repeated opening section of a prompt, such as long instructions or a reference document, so later requests that reuse it are cheaper and faster.
