用逆向生成法高效构建高准确率工具调用数据集
ToolGrad: Efficient Tool-use Dataset Generation with Textual "Gradients"
- 先生成正确工具链,再反推用户问题,避免标注错误
- 生成500条数据,成功率接近100%,成本更低
- 适合需要高质量工具调用训练数据的研究者
以往方法先生成用户查询,再添加复杂的工具调用标注(如深度优先搜索),导致标注失败和效率低下。本文提出ToolGrad,一种代理框架,采用“答案先行”的逆向思路:先通过文本“梯度”引导的迭代过程构建有效的工具使用链,再生成对应的用户查询。该方法生成了ToolGrad-500数据集,具备更复杂的工具调用、更低的成本和近乎100%的成功率。实验表明,基于ToolGrad训练的模型在性能上优于使用昂贵基线数据集或专有大模型训练的模型。代码、数据集及模型已开源。
原文摘要 · Abstract (English)
Prior work synthesizes tool-use LLM datasets by first generating a user query, followed by complex tool-use annotations like depth-first search (DFS). This leads to inevitable annotation failures and low efficiency in data generation. We introduce ToolGrad, an agentic framework that inverts this paradigm. ToolGrad first constructs valid tool-use chains through an iterative process guided by textual "gradients", and then synthesizes corresponding user queries. This "answer-first" approach led to ToolGrad-500, a dataset generated with more complex tool use, lower cost, and almost 100% pass rate. Experiments show that ToolGrad models outperform those trained on expensive baseline datasets and proprietary LLMs. The ToolGrad source code, dataset, and models are available at https://github.com/zhongyi-zhou/toolgrad.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。