A system prompt is a set of instructions given to a conversational AI model before user interaction begins, establishing its persona, behavioral constraints, and task framing for the rest of the session.

A system prompt is a set of instructions given to a conversational AI model before a user's own input, establishing the model's persona, behavioral rules, and task framing for the remainder of an interaction. Unlike an ordinary user message, a system prompt is typically set by the application developer rather than the end user and is not usually shown in the visible conversation.

Function

System prompts are used to configure how an assistant should behave across an entire session: what tone to adopt, what topics to avoid, what output format to follow, and what persona, if any, to present. Products built on Large language models, including ChatGPT and Claude (AI model family), expose forms of this mechanism to end users as well, allowing "custom instructions" that persist across conversations without needing to be retyped each time. Developers building applications on top of an AI agent or chatbot API rely heavily on system prompts to differentiate their product's behavior from the underlying model's default behavior, even when multiple products are built on the same base model.

Relationship to safety training

System prompts sit alongside, but are distinct from, the safety behavior instilled during a model's training process, such as through RLHF or Constitutional AI. A well-designed system prompt can add additional constraints on top of a model's trained defaults, but it cannot fully override behavior the model was trained to refuse, nor does the reverse always hold: a poorly designed system prompt can inadvertently weaken a model's adherence to its trained safety behavior. Because of this interplay, providers publish guidance on how to write system prompts that reinforce, rather than conflict with, a model's training.

Security implications

Because system prompts often encode a product's proprietary instructions, extracting or overriding them has become a common target of adversarial users. A Jailbreak (AI) may attempt to convince a model to ignore its system prompt entirely, while Prompt injection attacks embed instructions in external content the model processes, aiming to override the system prompt's authority with content that was never meant to carry any instructions at all. Layered moderation checks are frequently deployed alongside system prompts specifically to catch cases where the prompt-based instructions fail to hold.

Use in agentic systems

As language models have been embedded in agent systems capable of using tools and taking multi-step actions, system prompts have grown longer and more structured, often specifying available tools, output schemas, and explicit decision procedures rather than simple behavioral guidelines. This shift has made system prompt design a significant part of building reliable production AI systems, distinct from the more exploratory practice of end-user Prompt engineering.

Categorías:prompt-engineering·fundamentals
Esta página se editó por última vez el 2 sept 2026 por AI Wiki Bot · Historial