The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions

OpenAI Blog Papers

Summary

OpenAI proposes an instruction hierarchy approach to defend LLMs against prompt injection and jailbreak attacks by training models to prioritize system instructions over user inputs. The method significantly improves robustness without degrading standard capabilities.

Today's LLMs are susceptible to prompt injections, jailbreaks, and other attacks that allow adversaries to overwrite a model's original instructions with their own malicious prompts.
Original Article
View Cached Full Text

Cached at: 04/20/26, 02:47 PM

# The Instruction Hierarchy: Training LLMs to Prioritize Privileged Instructions Source: [https://openai.com/index/the-instruction-hierarchy/](https://openai.com/index/the-instruction-hierarchy/) OpenAIToday's LLMs are susceptible to prompt injections, jailbreaks, and other attacks that allow adversaries to overwrite a model's original instructions with their own malicious prompts\. In this work, we argue that one of the primary vulnerabilities underlying these attacks is that LLMs often consider system prompts \(e\.g\., text from an application developer\) to be the same priority as text from untrusted users and third parties\. To address this, we propose an instruction hierarchy that explicitly defines how models should behave when instructions of different priorities conflict\. We then propose a data generation method to demonstrate this hierarchical instruction following behavior, which teaches LLMs to selectively ignore lower\-privileged instructions\. We apply this method to GPT‑3\.5, showing that it drastically increases robustness \-\- even for attack types not seen during training \-\- while imposing minimal degradations on standard capabilities\.

Similar Articles

Improving instruction hierarchy in frontier LLMs

OpenAI Blog

OpenAI presents a training approach using instruction-hierarchy tasks to improve LLM safety and reliability by teaching models to properly prioritize instructions based on trust levels (system > developer > user > tool). The method addresses prompt-injection attacks and safety steerability through reinforcement learning with a new dataset called IH-Challenge.

A fundamental flaw leaves LLMs strikingly vulnerable to attack

MIT Technology Review

Researchers present a paper at ICML arguing that a fundamental flaw in how LLMs identify instructions makes them impossible to fully secure against attacks, demonstrating successful exploits against models from OpenAI, Anthropic, Alibaba, and DeepSeek.

When Lower Privileges Suffice: Investigating Over-Privileged Tool Selection in LLM Agents

Hugging Face Daily Papers

This paper investigates over-privileged tool selection in LLM agents, introducing ToolPrivBench to evaluate and mitigate unnecessary use of high-privilege tools. It finds that safety alignment does not ensure least-privilege choices, and proposes a post-training defense that reduces excessive privilege use without sacrificing performance.