Hidden instructions given to a language model that shape its behavior and persona.
A system prompt is a special input provided to a large language model (LLM) before any user interaction begins, typically invisible to the end user but processed by the model as authoritative context. Unlike user messages, which represent the human side of a conversation, the system prompt is usually authored by the developer or operator deploying the model. It can specify the model's persona, constrain its behavior, define its scope of knowledge, set a tone, or provide background information the model should treat as ground truth throughout the session.
In practice, system prompts work because transformer-based chat models are trained to treat different parts of a conversation — system, user, and assistant turns — with distinct levels of authority. The system prompt occupies a privileged position in this structure, allowing operators to steer model behavior without modifying the underlying weights. Instructions like "You are a helpful customer service agent for Acme Corp. Do not discuss competitors" are typical examples. The model integrates these instructions with each subsequent user query, shaping its responses accordingly.
System prompts became a central tool in the deployment of instruction-tuned models, particularly after OpenAI's ChatGPT and the GPT-4 API introduced explicit system message fields in 2022–2023. They are now a standard mechanism across virtually all major LLM APIs, including those from Anthropic, Google, and Meta. Their importance extends beyond convenience: system prompts are a primary lever for alignment, safety filtering, brand customization, and task specialization in production AI systems.
The design of effective system prompts has itself become a recognized discipline within prompt engineering. Poorly written system prompts can lead to inconsistent behavior, jailbreaks, or model confusion when user inputs conflict with operator instructions. Researchers and practitioners study how models prioritize conflicting instructions, how much context a system prompt can reliably carry, and how adversarial users attempt to override or extract hidden system prompts — making this a topic with both practical and security implications.