Dynamic Intent-Driven API Pruning for Tool Learning in Small Language Models

Tzu-Hao Wang, Ting-Chun Yang, Sin-Syuan Wu, Ming-Der Yang, Yao-Chung Fan


Abstract

Small Language Models (SLMs) struggle with tool calling, in part because a single API document often serves several usage intents and bundles the parameters of all of them into one schema, even though only a few are relevant to any given query. Providing the complete document forces the model to infer the intended usage scenario and its parameters at the same time, which lengthens the prompt and creates parameter ambiguity within a single API. We propose Dynamic Intent-Driven API Pruning. In an offline stage, an LLM decomposes each API document into Intent Units, each pairing an Intent Scenario with a Key Parameter Subset. At inference time, two-stage intent retrieval identifies the intents that match the query, and Dynamic Flat Union merges their parameter subsets into a query-specific pruned schema, keeping several intents rather than committing to a possibly incorrect top-1 choice. On 35 real-world APIs from ToolBench, our method improves argument correctness over Simulated Trial-and-Error while producing shorter prompts, with the gains concentrated on APIs that support multiple usage intents. Ablation studies confirm that both intent-driven pruning and Dynamic Flat Union reduce intra-API parameter ambiguity.

Anthology ID:
2026.inlg-long.32
Volume:
Proceedings of the 19th International Natural Language Generation Conference: Long Papers
Month:
October
Year:
2026
Address:
Utrecht, The Netherlands
Editors:
Guanyi Chen, Laura Perez-Beltrachini, Emiel van Miltenburg
Venue:
INLG
SIG:
SIGGEN
Publisher:
Association for Computational Linguistics
Note:
Pages:
572–585
Language:
URL:
https://aclanthology.org/2026.inlg-long.32/
DOI:
Bibkey:
Cite (ACL):
Tzu-Hao Wang, Ting-Chun Yang, Sin-Syuan Wu, Ming-Der Yang, and Yao-Chung Fan. 2026. Dynamic Intent-Driven API Pruning for Tool Learning in Small Language Models. In Proceedings of the 19th International Natural Language Generation Conference: Long Papers, pages 572–585, Utrecht, The Netherlands. Association for Computational Linguistics.
Cite (Informal):
Dynamic Intent-Driven API Pruning for Tool Learning in Small Language Models (Wang et al., INLG 2026)
Copy Citation:
PDF:
https://aclanthology.org/2026.inlg-long.32.pdf