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.
Related Resources
Tutorial
Prompt Engineering: A Practical Example
Learn prompt engineering techniques with a practical, real-world project to get better results from large language models. This tutorial covers zero-shot and few-shot prompting, delimiters, numbered steps, role prompts, chain-of-thought prompting, and more. Improve your LLM-assisted projects today.
For additional information on related topics, take a look at the following resources:
By Leodanis Pozo Ramos • Updated Aug. 28, 2026