IHEval: Evaluating Language Models on Following the Instruction Hierarchy

Zhihan Zhang, Shiyang Li, Zixuan Zhang, Xin Liu, Haoming Jiang +9 more
2/12/2025
85 citations
cs.CL

Official code: ytyz1307zzh/IHEval (19 stars, Python, last commit 2025-02-25).

Abstract

The instruction hierarchy, which establishes a priority order from system messages to user messages, conversation history, and tool outputs, is essential for ensuring consistent and safe behavior in language models (LMs). Despite its importance, this topic receives limited attention, and there is a lack of comprehensive benchmarks for evaluating models' ability to follow the instruction hierarchy.

Show full abstract

We bridge this gap by introducing IHEval, a novel benchmark comprising 3,538 examples across nine tasks, covering cases where instructions in different priorities either align or conflict. Our evaluation of popular LMs highlights their struggle to recognize instruction priorities. All evaluated models experience a sharp performance decline when facing conflicting instructions, compared to their original instruction-following performance. Moreover, the most competitive open-source model only achieves 48% accuracy in resolving such conflicts. Our results underscore the need for targeted optimization in the future development of LMs.

View on arXivView PDF

Code Implementations(1)

ytyz1307zzh/IHEvalOfficial100%

Code and data for NAACL 2025 paper "IHEval: Evaluating Language Models on Following the Instruction Hierarchy"

192Python, ShellSep 11, 20241 years agoNOASSERTION
evaluationinstruction-followingllm

Similar Papers

Cite this paper

@article{zhang2025iheval,
  title  = {IHEval: Evaluating Language Models on Following the Instruction Hierarchy},
  author = {Zhihan Zhang and Shiyang Li and Zixuan Zhang and Xin Liu and Haoming Jiang and Xianfeng Tang and Yifan Gao and Zheng Li and Haodong Wang and Zhaoxuan Tan and Yichuan Li and Qingyu Yin and Bing Yin and Meng Jiang},
  year   = {2025},
  eprint = {2502.08745},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2502.08745v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2502.08745.svg)](https://codeofpaper.com/paper/2502.08745)

Discussion