Switchcraft:面向代理工具调用的AI模型路由
Switchcraft: AI Model Router for Agentic Tool Calling
AI总结:
Switchcraft是首个面向代理工具调用优化的模型路由系统,通过选择成本最低且正确的模型,降低推理成本达84%,同时保持准确率与最佳单个模型相当。
摘要:
能够调用外部工具的代理AI系统强大但成本高,导致开发者倾向于使用大模型并超支推理预算。模型路由可缓解此问题,但现有路由器针对聊天完成而非工具使用设计。我们提出了Switchcraft,首个(据我们所知)面向代理工具调用优化的模型路由器。Switchcraft在线运行,选择成本最低且正确的模型。我们构建了五个函数调用基准的评估框架,并训练了一个基于DistilBERT的分类器,在延迟预算下部署。Switchcraft实现82.9%的准确率,与最佳单个模型匹配或超过,同时将推理成本降低84%,节省每百万查询超过3600美元。我们发现较大模型在工具使用任务中并不总是优于较小模型,且名义上更便宜的模型可能因token密集的推理而产生更高的总成本。我们的工作实现了在不牺牲正确性的前提下,实现成本感知的代理AI部署。
英文摘要:
Agentic AI systems that invoke external tools are powerful but costly, leading developers to default to large models and overspend inference budgets. Existing model routers target chat responses or end-task success, not the correctness of the individual tool calls on which agent tasks depend; we present Switchcraft, the first (to the best of our knowledge) model router optimized for strict tool-call correctness in agentic workloads. We construct an evaluation framework on six function-calling benchmarks, holding one out entirely, and fine-tune a calibrated DistilBERT-based classifier, deployed inline under a latency budget, to select the lowest-cost model subject to correctness or abstain when none is likely to answer correctly. Switchcraft reaches 78.3% answer accuracy (86.4% when correct abstentions are credited) at 59% lower cost than the best individual model (75.6%), saving over $3,800 per million queries, and outperforms kNN, MIRT, heuristic, and random routers. On the held-out benchmark, it matches or exceeds every individual model at 5--7X lower cost than the strongest ones. We find two counter-intuitive results: larger models do not consistently outperform smaller ones on tool-use tasks, and nominally cheaper models can incur higher total cost due to token-intensive output.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。