小模型用提示词就能高效用工具,别再搞复杂适配了。
Meta-Tool: Efficient Few-Shot Tool Adaptation for Small Language Models
- 用精心设计的少样本提示词替代复杂权重调整
- 30亿参数模型达GPT-5性能的79.7%,延迟低10倍
- 实验证明超网络适配无效,提示工程才是关键
小语言模型能否在不依赖复杂适配机制的情况下实现强大工具使用能力?本文通过Meta-Tool这一受控实验,对比基于超网络的LoRA适配与精心设计的少样本提示。以Llama-3.2-3B-Instruct为基座,在Gorilla APIBench、Spider 2.0、WebArena和InterCode四个基准上评估四种方法:少样本提示、文档编码、超网络生成的LoRA权重、以及价值引导束搜索。核心发现为有力的负面结果:尽管超网络(227.8M参数)生成了非平凡权重矩阵,但其性能较仅用少样本提示无显著提升。全面消融分析显示,少样本示例贡献+21.5%性能,文档编码贡献+5.0%,而超网络贡献0%。一个3B模型通过优化提示,达到GPT-5平均性能的79.7%,同时延迟降低10倍。对722个失败案例的分析表明,在5样本配置下(106次失败),任务特性决定错误类型:模式密集型任务(Spider 2.0、WebArena)格式错误极低,剩余失败为语义问题;而Gorilla格式错误占比100%,InterCode为70%。研究结论指向提示工程与示例筛选,而非复杂适配架构。
原文摘要 · Abstract (English)
Can small language models achieve strong tool-use performance without complex adaptation mechanisms? This paper investigates this question through Meta-Tool, a controlled empirical study comparing hypernetwork-based LoRA adaptation against carefully designed few-shot prompting. Using a Llama-3.2-3B-Instruct backbone, we evaluate four adaptation mechanisms--few-shot prompting, documentation encoding, hypernetwork-generated LoRA weights, and value-guided beam search--across four diverse benchmarks: Gorilla APIBench, Spider 2.0, WebArena, and InterCode. Our central finding is a well-supported negative result: despite generating non-trivial weight matrices, the 227.8M-parameter hypernetwork provides no measurable improvement over few-shot prompting alone. Comprehensive ablation studies reveal that few-shot examples contribute +21.5% to performance and documentation contributes +5.0%, while the hypernetwork adds 0%. A 3B model with well-designed prompts achieves 79.7% of GPT-5's average performance at $10 \times$ lower latency. Error analysis across 722 failure cases spanning all shot counts (0--5) shows that at the 5-shot configuration (106 failures), failure modes are task-dependent: schema-heavy tasks (Spider 2.0, WebArena) show near-zero format errors with remaining failures semantic, while format errors dominate on Gorilla (100%) and InterCode (70%). These findings redirect practitioners toward prompt engineering and example curation rather than complex adaptation architectures.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。