---
title: "What is a system prompt? Definition and examples"
description: "A system prompt is a set of instructions given to a language model by the app developer, separate from user messages, that defines the model's role, rules…"
canonical: "https://finic.ai/glossary/system-prompt"
last-updated: "2026-12-03"
---

# What is a system prompt?

A system prompt is a set of instructions given to a language model by the app developer, separate from user messages, that defines the model's role, rules, tone and limits.

Also called: system message, system instructions

## How it works

Chat-based models accept messages with different roles. The system prompt sets the frame for the whole conversation: who the assistant is, what it may and may not do, which tools it can call and how to format replies. User messages then arrive inside that frame.

Models are trained to give system instructions more weight than user messages. But this is a learned habit, not a hard boundary. A crafted user message or an injected document can still sometimes override it.

## Why it matters for trust and security

Attackers often try to make a model reveal or ignore its system prompt. Common methods include [jailbreaks](https://finic.ai/glossary/jailbreak) and [prompt injection](https://finic.ai/glossary/prompt-injection), where hidden text in a web page or file tells the model to act differently.

For this reason, a system prompt should not hold secrets such as API keys, and it should not be the only control on what a model can do. Permissions, tool limits and output checks belong in code outside the model.

## Good practice

- Write rules clearly and specifically, and say what to do when unsure.
- Assume the system prompt may be exposed; keep secrets out of it.
- Enforce critical limits, such as payment caps, in application code.
- Version and test system prompts like any other code change.

## Example

A hypothetical support assistant's system prompt says it can look up order status but never change payout details. An attacker asks it to "switch to admin mode" and update a bank account. The model refuses, and even if it did not, the tool it has access to cannot change payout details.

## Related terms

- [Prompt injection](https://finic.ai/glossary/prompt-injection.md): Prompt injection is an attack in which text given to an AI model contains instructions that override what its developer or user intended, so the model leaks data or takes unwanted actions.
- [Jailbreak (AI jailbreak)](https://finic.ai/glossary/jailbreak.md): A jailbreak is a prompt or series of prompts written to make an AI model ignore its safety rules and produce output its builders meant to block.
- [Guardrails (AI guardrails)](https://finic.ai/glossary/guardrails.md): AI guardrails are checks placed around a model that limit what it accepts, says or does, such as input filters, output filters and limits on tool use.
- [Prompt engineering](https://finic.ai/glossary/prompt-engineering.md): Prompt engineering is the practice of writing and testing the instructions, context and examples given to an AI model so that it produces accurate, useful and consistent output.
- [Function calling](https://finic.ai/glossary/function-calling.md): Function calling lets a language model ask an application to run a defined tool, such as a search or a database lookup, by returning structured arguments that the app executes.
