The advancement of function-calling agent models requires diverse, reliable, and high-quality datasets. This paper presents APIGen, an automated data generation pipeline designed to synthesize verifiable high-quality datasets for function-calling applications. We leverage APIGen and collect 3,673 executable APIs across 21 different categories to generate diverse function-calling datasets in a scalable and structured manner. Each data in our dataset is verified through three hierarchical stages: format checking, actual function executions, and semantic verification, ensuring its reliability and correctness. We demonstrate that models trained with our curated datasets, even with only 7B parameters, can achieve state-of-the-art performance on the Berkeley Function-Calling Benchmark, outperforming multiple GPT-4 models. Moreover, our 1B model achieves exceptional performance, surpassing GPT-3.5-Turbo and Claude-3 Haiku. We release a dataset containing 60,000 high-quality entries, aiming to advance the field of function-calling agent domains. The dataset is available on Huggingface: https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k and the project homepage: https://apigen-pipeline.github.io/
翻译:函数调用智能体模型的发展需要多样化、可靠且高质量的数据集。本文提出APIGen——一种专为函数调用应用合成可验证高质量数据集的自动化数据生成流水线。我们利用APIGen收集了涵盖21个不同类别的3,673个可执行API,以可扩展且结构化的方式生成多样化函数调用数据集。数据集中每个条目均通过三层验证阶段:格式检查、实际函数执行和语义验证,确保其可靠性与正确性。实验表明,使用我们构建的数据集训练的模型(仅含70亿参数)能在伯克利函数调用基准测试中达到最先进性能,超越多个GPT-4模型。此外,我们的10亿参数模型表现出卓越性能,优于GPT-3.5-Turbo和Claude-3 Haiku。我们发布了包含60,000条高质量条目的数据集,旨在推动函数调用智能体领域的发展。数据集发布于Huggingface平台:https://huggingface.co/datasets/Salesforce/xlam-function-calling-60k 及项目主页:https://apigen-pipeline.github.io/