Skip to content

Back to the catalog

Training Small Language Models for Transferable Tool Selection
arxiv.orgpaper

Training Small Language Models for Transferable Tool Selection

This paper trains small open language models with reinforcement learning to select tools for multi-step instructions over corpora of more than ten thousand tools. A Qwen3-8B model post-trained with the recipe outperforms Llama-4-Maverick (402B) on ToolBench. The trained model transfers to different retrievers and generalizes to new tool corpora in other domains, without relying on proprietary LLMs like Claude or ChatGPT.

TL;DR Shows an RL-trained Qwen3-8B can pick tools from huge corpora, beating Llama-4-Maverick on ToolBench and transferring across retrievers.
Document

What it claims

A Meta and Carnegie Mellon team (October 2026) fine-tunes Qwen3 models at 1.7B, 4B and 8B with supervised fine-tuning followed by GRPO. The trained models run a Plan–Retrieve–Select loop over a tool corpus. Per the abstract, the trained 8B model beats a prompt-tuned Llama-4-Maverick (402B) on ToolBench. The paper says all three sizes exceed that baseline. The training corpus is ToolBench G3: 21,361 instructions over 1,419 APIs. The model is then applied zero-shot to ToolBench G2, Gorilla, CRAFT and TaskBench. A model trained with BM25 also drives COLT, a dense retriever trained on ToolBench, without retraining.

How it works

One model serves two prompts, and every call is stateless.

flowchart TD
  A[User instruction] --> B[Plan: split into substeps]
  B --> C[Retrieve per substep]
  C --> D{Any tool above threshold?}
  D -- no --> E[Skip substep]
  D -- yes --> F[Select one tool from top K]
  F --> G[Add to tool set]
  E --> H{More substeps?}
  G --> H
  H -- yes --> C
  H -- no --> I[Return union]

The retriever is BM25 by default. Each substep is scored against the corpus, tools scoring above τ = 3 are kept, and the list is capped at K = 15. Context per call is bounded regardless of corpus size.

SFT data comes from Llama-4-Maverick, which is also the baseline being beaten. Gold tools are filtered first. A pair is kept if the query and the tool documentation share a content word. Otherwise, it is kept only if the teacher judges that the query paraphrases the tool's function. The teacher then decomposes each instruction into substeps and drops gold tools it does not use. Reasoning text is generated separately so that it does not leak gold tools. A validator regenerates any reasoning that names an off-candidate tool.

For RL, Plan and Select are trained separately. Select trains on teacher substeps, not on the model's own plans. The Plan reward is an F1 score. Precision is the share of substeps matched to a unique gold tool. Recall is a rank-weighted coverage term: the sum of 1/rank, divided by the number of gold tools. The Select reward is 1 only for an exact pick of the gold tool.

Evidence

The metric is exact match of the predicted tool set against the filtered gold set, measured on the 2,124-instruction G3 test split. Figure 3 compares Base, SFT and SFT+RL at each scale. The fetched text ends before the numeric tables. No success-rate figures, transfer results or COLT numbers are available here, only the claims.

How to use it

The fetched text gives no code, weights, licence or compute figures. Reproducing the method requires a gold tool set per training query and a teacher LLM for curation. The authors used Llama-4-Maverick as that teacher.

Limits

The workflow assumes that each substep needs exactly one tool. It also assumes that substeps are independent, so no substep uses another's output. Instructions with chained dependencies fall outside the design. The gold set used for evaluation is the authors' filtered set, so success rates are not directly comparable to scores from other work on raw ToolBench gold. The 402B baseline is prompt-tuned, not fine-tuned. Training covered 1,419 APIs. Behaviour on the 10,000-plus tool corpora named in the motivation depends on the transfer results, which are cut off in this text.

Organisations named here

Technologies named here

Techniques named here

  • Reinforcement learning post-training for tool selection
  • LLM-driven retrieval for tool selection