Abstract
External tools help large language models (LLMs) succeed at tasks where they would otherwise typically fail. In existing frameworks, choosing tools at test time relies on naive greedy decoding, regardless of whether the model has been fine-tuned on tool-annotated data or prompted with in-context examples. In contrast, we find that gathering and choosing among a suitable set of candidate tools has greater potential to lead to an optimal selection. We present Tool selECTion via meta-reasONing (TECTON), a two-phase system that first reasons over a task and outputs candidate tools using a custom fine-tuned language modelling head. Then, with the custom head disabled, it meta-reasons (i.e., it reasons over the previous reasoning process) to make a final choice. We show that TECTON results in substantial gains—both in-distribution and out-of-distribution—on a range of math reasoning datasets.
Introduction
Large Language Models (LLMs) have demonstrated remarkable capabilities across various domains, yet they frequently stumble when faced with precise multi-step reasoning or complex arithmetic. To mitigate these limitations, researchers have increasingly turned to "tool-augmented" models, which can leverage external resources such as Python interpreters, calculators, or specialized APIs. However, the effectiveness of these tools is bottlenecked by the model's ability to select the correct tool at the correct time.
Most current tool-use frameworks rely on greedy decoding, where the model selects the single most probable tool token at each step. This approach is inherently fragile; if the top-ranked choice is even slightly incorrect, the entire reasoning chain often collapses. This paper introduces TECTON (Tool selECTion via meta-reasONing), a framework designed to overcome the limitations of greedy selection by introducing a deliberate meta-reasoning phase.
The Challenge of Tool Selection
The authors' preliminary investigations revealed a critical insight: while the "correct" tool might not always be the model's first choice under greedy decoding, it is almost always present within the top five candidates (occurring in over 60% of cases where greedy decoding failed). By forcing an immediate choice, traditional systems discard viable alternatives that the model might recognize as superior if given the opportunity to evaluate them more holistically.
Furthermore, there is a tension between specialization and generalization. A model fine-tuned specifically for tool use (a "specialist") might be proficient at suggesting candidates but can lose the broader logical context of the problem. Conversely, a base "generalist" model possesses strong common-sense reasoning but may not be natively trained to output specific tool tokens. TECTON seeks to bridge this gap by utilizing the specialist for proposal and the generalist for judgment.
The TECTON Framework
TECTON addresses these issues through a two-phase architecture designed to separate candidate generation from final selection:
- Reasoning Phase: The system employs a specialized, parameter-efficient fine-tuned (PEFT) language modeling head to analyze the task. Instead of selecting a single tool, it decodes the top-$k$ most likely tokens, gathering a diverse pool of candidate tools and their associated arguments.
- Meta-Reasoning Phase: The specialized head is disabled, and the "frozen" base LLM—acting as a generalist—re-evaluates the candidates. This phase leverages the base model's inherent logical reasoning to make the final selection.
The authors propose two variants for this final selection:
- TECTON-SCORE: The model treats candidates as multiple-choice options and assigns probability scores. To combat "selection bias" (the tendency of LLMs to favor certain labels like 'A' regardless of content), a bias calibration step is applied.
- TECTON-GENERATE: The model receives candidates as "hints" and generates the final answer, allowing it to dynamically integrate the most appropriate tool into its response based on the provided context.
Experimental Setup and Results
To rigorously evaluate TECTON, the researchers utilized several challenging mathematical benchmarks, including GSM8K-XL and FuncQA. To ensure the evaluation focused on tool-use logic rather than simple calculation, the researchers created "XL" versions of standard datasets by magnifying numerical values to a scale that is nearly impossible for LLMs to solve without external tools. Out-of-distribution (OOD) performance was also tested using modified versions of ASDiv, MAWPS, and SVAMP.
The results demonstrate that TECTON consistently outperforms strong baselines like ToolkenGPT and TRICE across all datasets. In the complex FuncQA-MH (multi-hop) task, TECTON-GENERATE achieved 20.6% accuracy, doubling the performance of ToolkenGPT. The gains were even more significant in OOD scenarios; for instance, on MAWPS-XL, TECTON-GENERATE reached 77.4% accuracy compared to the baseline's 68.3%. These results suggest that meta-reasoning provides a more robust mechanism for tool selection than simple fine-tuning or prompting alone.
Conclusion
TECTON represents a significant step forward in making LLMs more reliable tool users. By separating the generation of candidates from the final decision-making process, the framework allows models to "think twice" before acting, leveraging general reasoning to verify specialized tool proposals. While currently focused on mathematical reasoning, the principles of meta-reasoning for tool selection hold promise for broader applications in knowledge-intensive QA and autonomous software agents. Future work will explore the scalability of this approach to even more diverse toolsets and real-time environments where inference overhead is a primary concern.
Summary updated