The following is a response from a gpt-5.2 query:
Message Roles And Responses.Create Instructions
I. System Role Purpose And Scope
The âsystemâ role is the highest-level channel for defining the assistantâs identity, behavioral boundaries, and nonnegotiable safety or policy constraints. It is typically used to establish global rules such as the assistantâs persona, what kinds of content are disallowed, formatting requirements, and any platform-level constraints that must hold throughout the session. In practice, a system message is treated as the most authoritative instruction set because it defines the operating envelope within which all other instructions are interpreted.
II. Developer Role Purpose And Scope
The âdeveloperâ role is used to define application-specific behavior and task framing that should generally persist for the session, but that is subordinate to the system message. It is where an application specifies how it wants the assistant to behave for its use case, for example tone, output structure, domain assumptions, tool usage preferences, and product requirements. A developer message is usually the right place for requirements that must reliably apply across many user turns for a particular app, while still yielding to any higher-priority system constraints.
III. User Role Purpose And Scope
The âuserâ role carries the end userâs requests, questions, and context. User instructions are typically the most variable and most local to a single turn or a short segment of the conversation. The assistant should satisfy user requests as fully as possible, provided those requests do not conflict with higher-priority instructions from the system or developer roles. When a user asks for something that would violate higher-level constraints, the assistant must follow the higher-level constraints rather than the user request.
IV. Responses.Create âInstructionsâ Field Meaning
In the Responses API, the top-level âinstructionsâ field is an additional instruction channel that supplements the prompt content supplied elsewhere in the request, commonly alongside an âinputâ field that contains messages or other input items. Conceptually, âinstructionsâ acts like a request-scoped directive that is often comparable to a developer-style instruction: it sets how the model should behave for that specific API call, without necessarily becoming part of the long-lived conversation state unless the application carries it forward. Exact precedence can be platform-defined, but the intended use is to provide per-request guidance that is stronger than ordinary user text while remaining subordinate to system-level constraints.
V. When To Use Each Mechanism
The system role is used when the behavior must be enforced at the highest level, such as safety boundaries, immutable identity constraints, or platform governance requirements. The developer role is used when the application needs consistent behavior across a session, such as a house style, output schema expectations, or domain-specific operating rules. The Responses API âinstructionsâ field is used when the application needs to adjust behavior for a single call, such as changing the output format, focusing on a particular subtask, or applying a one-off constraint, without changing the broader conversation framing.
VI. Behavior When All Three Are Present
When system, developer, and user roles are all present, the assistant applies them together under a priority ordering that favors higher-level constraints. The effective behavior is the result of combining compatible instructions and resolving incompatibilities by deferring to the higher-priority source. In a typical implementation, the assistant first adheres to system constraints, then applies developer constraints that do not violate the system constraints, and then fulfills the user request to the extent it does not violate system or developer constraints. If âinstructionsâ is also supplied in responses.create, it is merged into this stack as an additional directive layer for that request, commonly treated as stronger than ordinary user phrasing and often aligned with developer-level intent, while still constrained by the system message.
VII. Multiple Messages With The Same Role
Multiple messages with the same role are allowed and are common in real applications. For example, multiple âuserâ messages represent a multi-turn conversation, multiple âdeveloperâ messages can represent layered or updated application policies, and multiple âsystemâ messages can represent successive system-level constraints if a framework composes them from different sources. When there are multiple messages of the same role, the assistant generally interprets them cumulatively, with later messages often clarifying, narrowing, or overriding earlier messages at the same priority level when they are incompatible.
VIII. Conflicting Instructions And Conflict Resolution
When instructions conflict, the assistant resolves conflicts by prioritizing the higher-authority role over the lower-authority role and then, within the same role, by favoring the most recent or most specific instruction when a direct conflict exists. A user instruction that conflicts with a developer constraint is typically not followed, and a developer instruction that conflicts with a system constraint is typically not followed. If conflicts exist within the same role, the assistant attempts to reconcile them; if they are irreconcilable, the newer or more specific instruction at that same role usually governs, subject to any higher-level constraints.