← Back to Paper Radar

Dynamic Tool Dependency Retrieval for Lightweight Function Calling

Bhrij Patel, Davide Belli, Amir Jalalirad, Maximilian Arnold, A. Ermolov, B. Major
Annual Meeting of the Association for Computational Linguistics | 2025

Reading guide · Based on sections of the original paper

The authors propose DTDR, a lightweight tool retriever for on-device function calling. It conditions on both the user query and the growing plan of prior tool calls, using either query clusters with higher-order transition graphs (DTDR-C) or a linear classifier on frozen embeddings (DTDR-L).

Why read this

Read this if you deploy small-model agents that plan tool calls before executing them and want better tool selection and shorter prompts without fine-tuning the LLM.

What the authors found

  • On the three datasets with tool dependencies (TinyAgent, TaskBench-HF, TaskBench-MM), the authors report that DTDR raises end-to-end plan success 300–600% over no ICL and 15–200% over the best retrieval baseline. These results cover Qwen3 0.6B, 1.7B and 4B with weighted hard masking. Absolute success stays low, peaking at 35.1%. The abstract instead cites 23–104% over static retrievers. Does DTDR improve end-to-end function calling success rates?
  • In retrieval tests on Qwen3 0.6B with hard masking, DTDR-L reached 65.1% function-selection accuracy and 0.93 MRR on TinyAgent. The static learned retriever scored 25.6% and 0.53. Variants of DTDR.
  • Compared with including raw demonstrations in the prompt, DTDR shortens total prompt length by up to 73% and the per-query variable portion by up to 48%. How does DTDR perform on different datasets and model size?

Main limitation

The gains shrink or reverse at larger scale. In the appendix table, Qwen3 8B without retrieval beats DTDR-L on TaskBench-HF (70.5 vs 63.8) and TaskBench-MM (78.5 vs 67.6). The edge-beats-cloud claim holds mainly on TinyAgent. DTDR also assumes correct expert demonstrations, and the authors have not released code. Classifier optimization in DTDR-L

Where to start

Classifier optimization in DTDR-L · Use Table 8 to see, for each model and dataset, where dynamic retrieval helps and where no-ICL or raw demonstrations win at 8B, 14B and GPT-4o scale.

Abstract

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.

Generated automatically from paper sections on 2026-11-28.