system prompt
System prompt is a block of instructions that outranks all user inputs and establishes the assistant’s role, goals, constraints, and style. It steers how the model behaves during the session, defining rules, formatting, permitted tools, and safety guidelines.
How it reaches the model depends on the API. Chat-completion endpoints take it as the initial message in a dedicated role, which OpenAI now labels developer rather than system. Other endpoints accept it as a top-level request parameter, such as system in Anthropic’s Messages API or system_instruction in the Gemini API.
System message works as a synonym in most places, but not in OpenAI’s Model Spec, which reserves the name for the vendor’s own rules and ranks them above developer instructions.
In production, system prompts are typically protected from user editing, versioned, audited, and guarded against prompt injection or prompt extraction attacks.
By Leodanis Pozo Ramos • Updated Aug. 2, 2026