How it works
Several texts in one context can disagree: the system prompt, the user, a tool result and a retrieved page. Without a hierarchy the model blends them into a compromise, or it obeys whichever span came last. Instruction hierarchy is the ordered rule that names the winner before the run starts. A common order puts system and developer rules above the user, and the user above untrusted pages and tool results. That order is a decision the team writes down, not a property of the model.
Write the order where a reviewer can see it, and test conflicts on purpose. Give the agent a system rule, a user ask that breaks it, and a retrieved page that sides with the user. The pass condition is that the higher instruction wins and the lower one is quoted as data, not obeyed. Tool results are evidence unless the hierarchy says a tool may give instructions. When a lower source wins, label the run as a hierarchy failure even if the person got what they asked for.
A worked example
An FAQ loses to the name-change ban
An airline agent has a system rule: never change the passenger name on a ticket.
The traveller asks to change the surname after a typo.
A retrieved FAQ page says name changes are free and take one step.
The booking tool returns that same FAQ text in its result.
The hierarchy says the system rule outranks the user, and the user outranks retrieved pages and tool results.
The agent should refuse the change, explain the rule, and point the traveller at the desk that can override it.
If it edits the ticket because the FAQ came last in the context, the hierarchy failed.
The FAQ was data.
The system rule was the instruction that was supposed to win.
Illustrative example, not a production trace and not a measured result.
What goes wrong
- The model averages the conflict, telling the traveller the change is both forbidden and already submitted, so neither the rule nor the request is cleanly obeyed.
- The latest text wins by position. A tool result that echoes the FAQ overwrites the system rule simply because it was appended at the end of the context.
- The hierarchy is undocumented, so one reviewer calls the edit a success for the traveller and another calls it a breach, and the suite cannot score either way.
How to measure it
Build a set of conflicts with a known winner: system against user, user against a retrieved page, system against a tool result. Score whether the higher source won, and keep the reply next to the four texts.
In live traffic, flag runs where an action matched a lower source and contradicted a higher one. Those are the hierarchy breaks. A satisfied person does not clear them, and the lower source should be named on the turn.
Further reading
How Abracadabra helps
When the system prompt, the user and a retrieved page disagree, record which source the agent obeyed and which it ignored. The conflict is the thing to label, not only the final sentence.
Abracadabra does not block an attack or run a guardrail. It shows the conversation: a task that never started, off-topic drift, or a refusal, linked to the turn. Those sessions are the cases a guardrail should have caught.
Request access to read this on your own agent.