Understanding Instruction Authority in LLMs

When working with language models, we often provide detailed instructions to guide the model’s behavior. However, it’s equally important to ensure that these instructions respect the model’s role hierarchy.
Language models don’t treat all instructions equally. They operate within a defined structure of roles and levels of authority, where some instructions take precedence over others. If lower-priority instructions conflict with higher-priority ones, the model is expected to ignore or override them.
The OpenAI Model Specification explains this concept clearly by outlining the different levels of authority a model can accept—such as system-level instructions, developer instructions, and user inputs—and the kinds of issues that can arise when these levels are misused or contradicted.
Understanding this hierarchy is critical for prompt engineering. Even well-written instructions can fail if they:
Conflict with higher-authority roles
Attempt to override system constraints
Mix responsibilities across roles
At a high level, this hierarchy includes:
👽 System-level instructions, which define core behavior and safety boundaries
🧑🏻💻Developer instructions, which shape the application’s intended behavior
👨🏻💼User instructions, which express end-user intent within allowed boundaries
When conflicts occur, the model must defer to the highest applicable authority. This means that even a well-written user prompt can be ignored if it contradicts system or developer constraints.
The two examples below behave differently because adding a system role changes how the model interprets and responds to the same question.
from openai import OpenAI
import os
client = OpenAI()
response = client.responses.create(
model="gpt-5",
reasoning={"effort": "low"},
input=[
{
"role": "system",
"content": "What is the capital of India",
}
],
max_output_tokens=100
)
print(response.output_text)
# Output : New Delhi
from openai import OpenAI
import os
client = OpenAI()
response = client.responses.create(
model="gpt-5",
reasoning={"effort": "low"},
input=[
{
"role": "system",
"content": "Explain answers to a 5-year-old."
},
{
"role": "system",
"content": "What is the capital of India"
}
],
max_output_tokens=100
)
print(response.output_text)
# Output:
# The capital of India is New Delhi. A capital is like the main home for the country.
The question never changes — only the role does — yet the model’s behavior, tone, and structure change consistently.
Roles are behavioural constraints and authority signals for language models. Even when the user’s question remains identical, assigning a system, developer role changes how the model reasons, prioritizes information, and structures its output.
Understanding and leveraging roles, alongside well-crafted prompts, is essential for building reliable, safe, and effective LLM applications.



