TL;DR
AGENTIF is the first benchmark designed to evaluate how well Large Language Models (LLMs) follow instructions specifically in realistic, agentic scenarios. While top models excel on standard benchmarks, they struggle when faced with long, multi-constraint agent system prompts: even leading frontier reasoning models satisfy fewer than 30% of instructions completely.
What Problem Does This Paper Address?
Popular instruction-following benchmarks (like IFEval) rely largely on short, synthetic prompts (averaging around 45 words) evaluating simple rules like keyword inclusion or word counts. In real-world agent deployments, however, models are given massive system prompts that include:
- Complex tool and API specifications.
- Dynamic condition-action rules (e.g., "If X happens, call tool Y").
- In-context examples and structural guidelines.
Adhering to these specifications is crucial for building reliable agents. The authors introduce AGENTIF to test whether state-of-the-art LLMs can actually follow realistic, lengthy, and multifaceted agent prompts without dropping constraints.
Methods
The authors built AGENTIF using a semi-automated pipeline backed by human verification:
- Instruction Sourcing & Synthesis: Sourced 50 real-world agent system prompts from open-source repositories (e.g., Cursor, Manus) and enterprise frameworks. GPT-4o generated realistic user queries, which human annotators filtered and rewrote.
- Block-wise Constraint Extraction: Because instructions are long, prompts were segmented into semantic blocks (e.g., task structure, available tools). GPT-4o extracted atomic constraints, validated cross-block dependencies, and human annotators verified each constraint (totaling 8,415 constraints).
- Constraint Taxonomy:
- Aspect types: Formatting (layout, syntax), Semantic (tone, factual bounds), and Tool (tool-call parameters, allowed APIs).
- Presentation types: Vanilla (plain text rules), Condition (triggered only in certain contexts), and Example (implicit rules derived from few-shot demos).
- Meta Constraints: Rules governing other constraints (e.g., constraint selection, prioritization, detailing).
- Three-Tier Evaluation Paradigm: Depending on verifiable structure, constraints are checked via deterministic Python code, LLM verification (via GPT-4o), or a Hybrid pipeline (LLM extracts the relevant segment; code verifies properties).
Datasets
- AGENTIF (introduced): Contains 707 human-annotated instructions spanning 50 agentic tasks across 9 broad domains (Legal, Coding, Health, Tourism, Finance, Gaming, Enterprise, Research, General).
- Length: Average 1,723 words (max 15,630 words).
- Complexity: Average 11.9 constraints per instruction (up to 14 tokens/constraint ratios).
- Multi-turn instructions account for 19.1% of the dataset.
- Compared Prior Benchmarks: IFEval, FollowBench, InfoBench, SysBench, ComplexBench, AgentOrca, and Multi-IF.
Key Insights and Ideas
- Current LLMs fall off a cliff: A model like GPT-4o achieves ~87% constraint adherence on synthetic benchmarks like IFEval, but drops to 58.5% Constraint Success Rate (CSR) on AGENTIF.
- Condition constraints fail at the check step: In over 30% of failures on conditional rules, the model failed because it misidentified whether the condition was triggered in the first place, rather than failing to execute the rule itself.
- Tool adherence is a major weak spot: Models frequently omit required tools or use disallowed ones. Interestingly, "thinking" models (reasoning models) omitted required tools more frequently than non-thinking models, likely relying excessively on internal knowledge rather than calling tools.
- Overly long instructions break completion: When instruction length exceeds 6,000 words, Instruction Success Rates (ISR) drop to nearly 0% across all evaluated models.
- Meta constraints confuse models: Models especially struggled with constraint selection (e.g., "If multiple tasks are listed, only do the first"), often getting confused by conflicting base instructions.
Key Results
The authors evaluated models on Constraint Success Rate (CSR) (percentage of individual constraints satisfied) and Instruction Success Rate (ISR) (percentage of instructions where all constraints were satisfied):
- Top Models:
- Reasoning/Thinking models led the board: GPT-5 (ISR: 30.2%, CSR: 60.8%), GLM-4.6 (ISR: 23.1%, CSR: 60.5%), and o1-mini (ISR: 26.9%, CSR: 59.8%).
- General frontier models: Claude 3.5 Sonnet (ISR: 24.9%, CSR: 56.6%) and GPT-4o (ISR: 26.4%, CSR: 58.5%).
- Open-weight models: DeepSeek-R1 (CSR: 57.9%), Qwen3-32B (CSR: 58.4%), and LLaMA-3.1-70B-Instruct (CSR: 56.3%).
- Academic Fine-tuned Models: Models explicitly trained for constraint following (e.g., Crab-DPO-7B at 47.2% CSR; Conifer-DPO-7B at 44.3% CSR) performed noticeably worse than general-purpose base-instruct models, demonstrating a lack of generalization to lengthy, agentic prompts.
- Single-turn vs. Multi-turn: For top models, multi-turn dialogue context lowered CSR by roughly 10–18% compared to single-turn contexts (e.g., DeepSeek-R1 scored 81.0% single-turn vs. 63.1% multi-turn).
Limitations and Future Work
- Manual Bottleneck: Constructing and validating AGENTIF required extensive manual human review, making automated scaling to massive datasets difficult.
- Language Support: AGENTIF only evaluates English and Chinese instructions; multilingual coverage remains limited.
- Zero-Shot Only: Experiments evaluated zero-shot adherence; the effect of prompt engineering techniques (like least-to-most prompting or dynamic few-shot selection) was not studied.
- Actionable Next Steps: The authors recommend training post-training datasets using realistic, specification-heavy texts (such as technical manuals) and exploring reinforcement learning to improve compliance over complex, multi-constraint instructions.
Summary updated