Skip to content
Finic
AI and agents

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 and 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.

← All glossary terms

Ship fraud, bot and KYB checks in minutes.

Start with $5 of free credit, or copy a prompt and let your coding agent set Finic up.

Sign up See pricing