2025-05-23 · 进阶 · 机器学习

AGENTIF: Benchmarking Instruction Following of Large Language Models in Agentic Scenarios

本文提出了AGENTIF,一个用于评估大型语言模型在代理场景中指令遵循能力的基准测试,其特点是指令真实、长度长且约束复杂,并通过实验验证了现有模型在处理复杂代理场景指令方面的不足。

更新于 2025-10-17。作者:Yunjia Qi、Hao Peng、Xiaozhi Wang、Amy Xin、Youfeng Liu、Bin Xu、Lei Hou、Juanzi Li。

中文摘要

大型语言模型 (LLM) 已在现实世界的自主代理应用中展现出先进的能力。越来越多的研究致力于开发基于 LLM 的代理来满足实际需求,这带来一个新的挑战:自主代理场景通常涉及带有复杂约束的冗长指令,例如扩展的系统提示和详细的工具规范。虽然遵守这些指令对于自主代理应用至关重要,但 LLM 是否能够可靠地遵循这些指令仍然未得到充分探索。在本文中,我们介绍了 AgentIF,这是第一个用于系统评估 LLM 在自主代理场景中指令遵循能力的基准。AgentIF 具有三个关键特征:(1) 真实性,源自 50 个现实世界的自主代理应用。(2) 指令长度较长,平均 1723 个单词,最长达 15630 个单词。(3) 复杂性,平均每个指令包含 11.9 个约束,涵盖各种约束类型,例如工具规范和条件约束。为了构建 AgentIF,我们从工业应用代理和开源自主代理系统中收集了 50 个自主代理任务的 707 条人工标注指令。对于每条指令,我们都标注了相关的约束和相应的评估指标,包括基于代码的评估、基于 LLM 的评估和混合代码-LLM 评估。我们使用 AgentIF 系统地评估现有的先进 LLM。我们观察到,当前模型的整体性能较差,尤其是在处理复杂的约束结构和工具规范方面。我们进一步对指令长度和元约束进行了错误分析和分析实验,提供了一些关于现有 LLM 故障模式的发现。我们已发布代码和数据以促进未来的研究。

英文摘要

Large Language Models (LLMs) have demonstrated advanced capabilities in real-world agentic applications. Growing research efforts aim to develop LLM-based agents to address practical demands, introducing a new challenge: agentic scenarios often involve lengthy instructions with complex constraints, such as extended system prompts and detailed tool specifications. While adherence to such instructions is crucial for agentic applications, whether LLMs can reliably follow them remains underexplored. In this paper, we introduce AgentIF, the first benchmark for systematically evaluating LLM instruction following ability in agentic scenarios. AgentIF features three key characteristics: (1) Realistic, constructed from 50 real-world agentic applications. (2) Long, averaging 1,723 words with a maximum of 15,630 words. (3) Complex, averaging 11.9 constraints per instruction, covering diverse constraint types, such as tool specifications and condition constraints. To construct AgentIF, we collect 707 human-annotated instructions across 50 agentic tasks from industrial application agents and open-source agentic systems. For each instruction, we annotate the associated constraints and corresponding evaluation metrics, including code-based evaluation, LLM-based evaluation, and hybrid code-LLM evaluation. We use AgentIF to systematically evaluate existing advanced LLMs. We observe that current models generally perform poorly, especially in handling complex constraint structures and tool specifications. We further conduct error analysis and analytical experiments on instruction length and meta constraints, providing some findings about the failure modes of existing LLMs. We have released the code and data to facilitate future research.

解读

一句话总结

本文提出了AGENTIF,一个用于评估大型语言模型在代理场景中指令遵循能力的基准测试,其特点是指令真实、长度长且约束复杂,并通过实验验证了现有模型在处理复杂代理场景指令方面的不足。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源