Toolcompass improves language model tool use by guiding trial choices

Toolcompass: Guiding Tool Trialing, Not Suppressing It

Artificial IntelligenceMachine Learning

Summary

When language models use external tools, they must decide which ones to try without wasting time. Too many tests slow things down, but testing too little stops learning about new tools. The authors developed ToolCompass, a method that helps guide these trial choices by grouping tools with similar functions. This approach helps the model explore useful new tools while avoiding irrelevant ones, improving success in tasks it hasn’t seen before.

What this means in practice

  • For software developers: Enhance AI assistants to better select appropriate tools when solving new tasks by guiding tool trials based on function similarity.
  • For automation engineers: Improve automation systems that integrate multiple tools by efficiently exploring new tool options without excessive testing.

Authors

Junlin Fang, Chong Zhang, Do Nguyen-Thanh, Xiaogang Xu, Zhen Fang, Sean Du

Abstract

Large language model (LLM) agents must generalize from tools seen during training to unseen tools at deployment. A key challenge is tool trialing, i.e., excessive trials waste the interaction budget, whereas selective trials enable exploration of unfamiliar tools. Existing outcome-based post-training leaves wasteful trials unguided, while turn-level supervision may suppress necessary exploration. We introduce ToolCompass, a post-training framework that guides tool trialing by organizing tool-call representations according to shared functions. Specifically, ToolCompass models each function class as a von Mises--Fisher distribution and jointly reduces intra-function variation across domains and increases inter-function separation. This structure transfers experience from seen tools to functionally similar unseen tools, directing exploration away from unrelated alternatives. ToolCompass requires no ground-truth call traces or unseen-tool access and incurs no inference overhead. Experiments on AppWorld and FTRL show consistent gains across GRPO, RFT, and DMPO. improves AppWorld OOD task success by up to 10.71 percentage points over vanilla post-training and performs best among competitive baselines on both benchmarks.