EDGEGEN: Improving Tool-Calling Agents Beyond Happy Paths with Synthetic Edge Case Generation

LLM SFT Agent Tool Learning Agent Eval Benchmarks
面向工具调用的大语言模型(LLM)智能体正日益广泛部署于企业级应用中。然而,要实现高效评估与优化,亟需高质量、多样化的任务数据集;而受隐私保护及其他实际约束限制,此类数据集往往难以获取。当前主流的合成任务生成方法通常仅产出泛化性强但缺乏针对性的任务,既忽略智能体自身的内部状态或所连接数据库的具体情况,也无法真实反映现实场景中任务使用的多样性。为此,我们提出 EdgeGen——一种新型合成任务生成框架:该框架首先从智能体的规格说明中自动提取合规性规则,继而基于这些规则生成以真实数据库为支撑的“边界案例”(edge-case)任务,旨在刻意触发对前述规则的违反。当与现有合成数据生成技术协同使用时,EdgeGen 可支持通过微调(finetuning)和测试套件优化(harness optimization)两种路径提升智能体性能。由此构建的完整流程形成了一套完全自动化的闭环系统,全程无需人工标注。在 tau2bench 航空领域基准测试中,仅使用 EdgeGen 生成的数据进行微调,即可使各类模型的平均任务进展率(mean progress)稳定提升 2% 至 42%;相比之下,其他基线方法在部分模型上反而导致性能下降。而在测试套件优化方面,针对 Gemma-4-e4b 模型,EdgeGen 方法相较人工精心构建的测试套件与基础测试套件,分别实现了 10% 和 30% 的平均任务进展率提升。
Tool-calling LLM agents are increasingly deployed in enterprise applications. However, effective evaluation and optimization require high-quality, diverse task datasets that are often difficult to obtain due to privacy and other constraints. Existing synthetic task generation methods often produce generic tasks that ignore an agent's underlying state or database and fail to reflect real-world usage diversity. We propose EdgeGen, a synthetic task generation framework that extracts compliance rules from an agent's specification and uses them to generate database-grounded edge-case tasks designed to violate these rules. When combined with existing synthetic data generation techniques, EdgeGen enables agent improvement through finetuning and harness optimization. The resulting pipeline forms a fully automated closed-loop system that requires no human annotation. Finetuning on data generated by EdgeGen yields a consistent mean progress improvement of 2 percent to 42 percent on tau2bench airline domain, while other baseline methods show degradation for some models. On the other hand, for harness optimization, our method shows a mean progress improvement of 10 percent and 30 percent over the human-curated and base harnesses, respectively, for the Gemma-4-e4b model.
许愿