arXiv:2503.14432cs.CLcs.AI2025-03ACL被引 14

让大模型通过试错自动学会用工具,无需标注数据。

PLAY2PROMPT: Zero-shot Tool Instruction Optimization for LLM Agents via Tool Play

  • 让模型像玩游戏一样试用工具,摸索输入输出规律。
  • 在真实任务中显著提升闭源和开源模型的零样本工具使用效果。
  • 适合需要快速集成新工具的开发者或研究者。

大型语言模型(LLMs)正越来越多地与外部专用工具结合,但许多任务要求在几乎没有或仅有噪声文档的情况下实现零样本工具调用。现有方法依赖人工重写或标注数据进行验证,无法适用于真正的零样本场景。为此,我们提出PLAY2PROMPT,一种自动化框架,通过系统性地‘试用’每个工具来探索其输入输出行为。这一迭代式试错过程使PLAY2PROMPT在无任何标注数据的情况下,优化工具说明并生成使用示例。这些示例不仅指导大模型推理,还作为验证机制进一步提升工具利用率。在真实任务上的大量实验表明,PLAY2PROMPT显著提升了开箱即用和封闭模型在零样本场景下的工具性能,为领域特定工具集成提供了一种可扩展、高效的方法。

原文摘要 · Abstract (English)

Large language models (LLMs) are increasingly integrated with specialized external tools, yet many tasks demand zero-shot tool usage with minimal or noisy documentation. Existing solutions rely on manual rewriting or labeled data for validation, making them inapplicable in true zero-shot settings. To address these challenges, we propose PLAY2PROMPT, an automated framework that systematically "plays" with each tool to explore its input-output behaviors. Through this iterative trial-and-error process, PLAY2PROMPT refines tool documentation and generates usage examples without any labeled data. These examples not only guide LLM inference but also serve as validation to further enhance tool utilization. Extensive experiments on real-world tasks demonstrate that PLAY2PROMPT significantly improves zero-shot tool performance across both open and closed models, offering a scalable and effective solution for domain-specific tool integration.

大模型工具调用零样本自动化

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。