system prompt
System prompt (or system message) is a message placed before all user inputs to establish 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.
In chat APIs, it’s often sent as the initial message with a special system role. In production, system prompts are typically protected (not user-editable), versioned, audited, and guarded against prompt injection or prompt extraction attacks.
By Leodanis Pozo Ramos • Updated Oct. 17, 2025