用多智能体生成高质量函数调用数据,提升大模型泛化能力。
GenesisFunc: Multi-Agent Data Generation for Accurate and Generalizable Function-Calling

- 基于可靠工具构建多智能体对话系统,自动生成多样场景数据。
- 在8B模型上训练后,跨域泛化性能优于同类开源模型。
- 支持下游工具快速扩展,适合实际应用部署。
大型语言模型通过函数调用(FC)扩展能力,依赖高质量、多样化且覆盖广泛的训练数据。然而,真实函数调用数据的获取与标注困难,现有合成数据管道常存在不可靠API、工具可扩展性差、多样性不足和质量控制弱等问题。为此,我们提出GenesisFunc,一个自动化函数调用数据生成管道。从广泛使用的公开基准中的可靠工具出发,GenesisFunc采用多智能体框架,构建对话生成系统,生成涵盖多种场景的对话,同时保持数据多样性与质量。通过多阶段评估系统进一步保障数据准确性。我们在合成数据集上微调一个80亿参数(8B)的LLM,实验表明其在域内函数调用性能上优于同类开源模型,在域外泛化能力上也表现更优,达到部分最新基于API模型的水平。此外,该方法在下游工具上的可扩展性良好,展现出强现实应用潜力。
原文摘要 · Abstract (English)
Large Language Models (LLMs) extend their capabilities through function-calling (FC), which relies on training data with high quality, diversity, and broad coverage of scenario. However, obtaining and annotating real function-calling data is challenging, while synthetic data from existing pipelines often suffers from unreliable APIs, limited tool scalability, insufficient diversity, and weak quality control. To address these, we present GenesisFunc, an automated pipeline for generating FC training data. Starting from reliable tools in widely used public benchmarks, our GenesisFunc employs a multi-agent framework to support a dialogue generation system that produces conversations spanning diverse scenarios, while maintaining both diversity and quality throughout the process. The accuracy of the data is further reinforced through a multi-stage evaluation system. We fine-tune an 8B LLM on the synthetic dataset and show through extensive experiments that it outperforms similarly sized open-source models in in-domain FC performance and out-of-domain generalization, while reaching FC capabilities comparable to some of the latest API-based models. In addition, our method demonstrates strong potential to scale effectively across downstream tools, underscoring its real-world applicability.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。