arXiv:2512.17052cs.LG2025-12ACL被引 2

动态检索工具依赖关系,提升轻量级函数调用的准确率

Dynamic Tool Dependency Retrieval for Lightweight Function Calling

  • 根据初始查询和工具调用计划动态更新检索
  • 相比静态检索,成功率提升23%至104%
  • 适合资源受限设备上运行的智能代理系统

由大语言模型驱动的函数调用智能体通过选择外部工具来自动化复杂任务。在设备端运行的智能体通常使用检索模块来选取相关工具,以提升性能并减少上下文长度。然而,现有方法依赖静态且有限的输入,无法捕捉多步工具依赖关系和不断演化的任务上下文,常引入无关工具,误导智能体,降低效率与准确性。我们提出动态工具依赖检索(DTDR),一种轻量级检索方法,其基于初始查询和持续演化的工具调用计划进行条件判断。DTDR从函数调用示范中建模工具依赖关系,支持随计划推进而自适应检索。我们在多个数据集和不同LLM主干上对DTDR进行基准测试,评估检索精度、下游任务准确率及计算效率。此外,我们探索了将检索到的工具集成到提示中的策略。结果表明,与最先进静态检索器相比,DTDR将函数调用成功率提升了23%至104%。

原文摘要 · Abstract (English)

Function calling agents powered by Large Language Models (LLMs) select external tools to automate complex tasks. On-device agents typically use a retrieval module to select relevant tools, improving performance and reducing context length. However, existing retrieval methods rely on static and limited inputs, failing to capture multi-step tool dependencies and evolving task context. This limitation often introduces irrelevant tools that mislead the agent, degrading efficiency and accuracy. We propose Dynamic Tool Dependency Retrieval (DTDR), a lightweight retrieval method that conditions on both the initial query and the evolving tool calling plan. DTDR models tool dependencies from function calling demonstrations, enabling adaptive retrieval as plans unfold. We benchmark DTDR against state-of-the-art retrieval methods across multiple datasets and LLM backbones, evaluating retrieval precision, downstream task accuracy, and computational efficiency. Additionally, we explore strategies to integrate retrieved tools into prompts. Our results show that DTDR improves function calling success rates between $23\%$ and $104\%$ compared to state-of-the-art static retrievers.

函数调用工具检索轻量级推理LLM智能体

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