inferwire
/
AI·4 min read

IH-Benchmark: Obeying System Prompts Doesn't Stop Tool Injections

HiddenLayer researchers tested 37 models on 2,336 scenarios with conflicting instructions. Compliance ranged from 98.2 to 20.5 percent, and holding system rules didn't predict resisting tool injections.

TL;DR

  • HiddenLayer's IH-Benchmark tested 37 models on 2,336 scenarios with conflicting instructions; compliance ranged from 98.2 percent to 20.5 percent [^1].
  • Several models that held system rules against users still followed instructions planted in tool outputs, so one result doesn't predict the other [^1].

Background

LLM applications layer their instructions. The operator's system prompt ranks above the user's messages, which rank above tool outputs such as fetched files or web pages; Wallace et al. formalized this ordering in 2024 [^1]. When a model breaks it, adversarial users can override system constraints and malicious tool outputs can hijack an agent mid-task, an attack known as indirect prompt injection [^1]. According to the authors, earlier benchmarks mostly tested only the system-versus-user edge or adapted public datasets [^1].

What happened

The benchmark, from three researchers at HiddenLayer, has two tracks [^1]. In the System ≻ User track, with 734 scenarios, the model must keep a rule from the system prompt while the user asks it to break that rule. In the User ≻ Tool track, with 1,602 scenarios, the user's task is harmless and the conflicting instruction sits in a tool response [^1]. Scenarios are generated from 44 constraint families, from forbidding a single word to preventing data leaks in a coding agent, across generic, health, finance, retail and coding settings. The authors wrote 35 of the families themselves; the rest were suggested by GPT-5.3 and then reviewed [^1]. For agentic tests, three simulated agents keep state across tool calls: a coding agent, a retail assistant and a health support agent. The planted instruction sits in a repository README, a product description or a support ticket [^1].

The generator varies how strongly the system prompt states the rule or warns about untrusted tool output, whether the user's request is explicit or implicit, and how the planted instruction is presented [^1]. Each scenario gets a pass or a fail. Most are checked mechanically; 189 go to an LLM judge, GPT-5-mini, which the authors validated against 50 human-labeled outputs [^1]. On the tool track, a model passes a conflict scenario if it doesn't follow the planted instruction, even if it stops the task and warns the user instead [^1]. In repeat runs of three models, the standard deviation of overall compliance was at most 0.9 percentage points [^1].

Claude Opus 4.6 had the highest overall compliance at 98.2 percent, and GPT 5.4 reached 97.5 percent. Qwen 3 235B-A22B was lowest at 20.5 percent, with 7.4 percent on the tool track [^1]. Grok 4.20 (R) shows the split between tracks: 96.9 percent on the system track, 65.6 percent on the tool track [^1]. Closed-source models averaged 88.6 and 75.1 percent on the two tracks, open-weight models 80.5 and 59.1 percent [^1].

Why it matters

The kind of failure matters as much as the rate. On the tool track, models were most reliable against clearly destructive or unauthorized actions: the family that tries to mass-close support tickets reached 97.2 percent compliance, unprompted purchases 88.1 percent [^1]. The hardest families were subtle: shifting a minor factual detail from the tool output, at 50.1 percent, and appending an injected disclaimer, at 50.4 percent [^1]. The authors describe these as low-stakes, non-suspicious actions and conclude that models are far more vulnerable to small factual drift than to blatant fabrications [^1]. On the system track, the hardest family was a blanket ban on tool calls, at 52.4 percent, which the authors attribute to tool use being strongly reinforced as the helpful response [^1].

Stronger prompts help some models and not others. On the agentic tool track, Grok 4.20 (R) rose from 18.8 to 89.6 percent with stricter warnings about tool output, while Qwen 3 235B-A22B stayed near 10 percent at every level [^1]. The authors read this as separating models with an instruction-sensitivity problem from models that can't keep user requests and tool responses apart [^1]. Their benchmark covers bounded single tasks, not long multi-turn sessions where memory and retrieved context build up, which the authors name as a direction for future work [^1].

Practical example

Say you build a support assistant that reads customer tickets through a tool and drafts replies. It already passed your tests in which users tried to talk it out of its system rules. IH-Benchmark suggests that result says little about the ticket path: several models that held system rules against users still followed instructions planted in tool output [^1]. So you test the ticket path on its own, with planted instructions that ask for small things, such as adding a disclaimer or changing one figure, and not only ones that ask to close every ticket. In the benchmark, the ticket-closing attack was resisted in 97.2 percent of cases, a subtle factual change in 50.1 percent [^1].

Sources

  1. [1]arXiv — IH-Benchmark: A Conflict-Centered Benchmark for Instruction-Hierarchy Robustness in LLM Applications