Foundations

System Prompt

The initial instructions, persona, and policies steering an assistant across a conversation — separate from user messages and given higher priority.

A system prompt is the set of instructions, persona, and behavioral policies handed to a model at the start of a conversation, before any user message. It defines the assistant’s role, tone, constraints, and policies, and shapes everything the model produces throughout the interaction.

Modern chat models are trained on a structured format in which every message carries a role — system, user, and assistant. The system prompt occupies the system role (OpenAI also uses developer) and the model is trained to treat it with higher priority than the same instructions placed inside a user message. In Anthropic’s API it is a dedicated system field; even a single role-setting sentence measurably changes behavior. The system prompt persists across the entire context window and is the foundation of prompt engineering.

Through 2025–2026, system prompts have become a focal topic: companies publish their system prompts for transparency, while the prompts themselves are targets of prompt injection and “system prompt extraction” attempts. As a result they are paired with guardrails and a robust instruction hierarchy.

Sources