Advancing Tool-Augmented Large Language Models: Integrating Insights from Errors in Inference Trees
Sijia Chen, Yibo Wang, Yi-Feng Wu, Qingguo Chen, Zhao Xu, Weihua Luo, Kaifu Zhang, Lijun Zhang
Abstract
Tool-augmented large language models (LLMs) leverage tools, often in the form of APIs, to improve their reasoning capabilities on complex tasks. This enables them to act as intelligent agents interacting with the real world. The recently introduced ToolLLaMA model by Qin et al. [2023] utilizes the depth-first search-based decision tree (DFSDT) mechanism for multi-step reasoning with real-world APIs, effectively enhancing the performance of tool-augmented LLMs compared to traditional chain reasoning mechanisms. However, their approach only employs successful paths from decision trees (also called inference trees) for supervised fine-tuning (SFT), missing out on the potential learning opportunities from failed paths. Inspired by this, we propose an inference trajectory optimization framework based on preference learning to address this limitation. We first introduce a novel method for constructing step-wise preference data from tree-like expert trajectories, which leverages the previously ignored failed explorations in the decision trees. In the subsequent training phase, we first fine-tune the LLM with successful tool-usage expert trajectories and then apply direct preference optimization (DPO) with the preference data to update the LLM's policy, resulting in our ToolPrefer-LLaMA (TP-LLaMA) model. This approach not only enhances the utilization of original expert data but also broadens the learning space of the model. Our experiments demonstrate that by obtaining insights from errors in inference trees, TP-LLaMA significantly outperforms the baselines across almost all test scenarios by a large margin and exhibits better generalization capabilities with unseen APIs. At the same time, TP-LLaMA has also demonstrated superior reasoning efficiency compared to the baselines, making it more suitable for complex tool-usage reasoning tasks.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
17 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Language Models are Few-Shot Learners
- Direct Preference Optimization: Your Language Model is Secretly a Reward Model cites Training language models to follow instructions with human feedback
- Divide-Then-Aggregate: An Efficient Tool Learning Method via Parallel Tool Invocation cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Divide-Then-Aggregate: An Efficient Tool Learning Method via Parallel Tool Invocation cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language Models cites Language Models are Few-Shot Learners
- Weak-eval-Strong: Evaluating and Eliciting Lateral Thinking of LLMs with Situation Puzzles cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models cites Training language models to follow instructions with human feedback
- Training language models to follow instructions with human feedback cites Language Models are Few-Shot Learners
- CodeTool: Enhancing Programmatic Tool Invocation of LLMs via Process Supervision cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Triplets Better Than Pairs: Towards Stable and Effective Self-Play Fine-Tuning for LLMs cites Direct Preference Optimization: Your Language Model is Secretly a Reward Model
- Triplets Better Than Pairs: Towards Stable and Effective Self-Play Fine-Tuning for LLMs cites Training language models to follow instructions with human feedback
Cited by top-tier papers17
- Iterative Tool Usage Exploration for Multimodal Agents via Step-wise Preference TuningPengxiang Li, Zhi Gao, Bofei Zhang, Yapeng Mi et al.NeurIPS 2025 · 21 citations
- Divide-Then-Aggregate: An Efficient Tool Learning Method via Parallel Tool InvocationDongsheng Zhu, Weixian Shi, Zhengliang Shi, Zhaochun Ren et al.ACL 2025 · 16 citations
- Weak-eval-Strong: Evaluating and Eliciting Lateral Thinking of LLMs with Situation PuzzlesQi Chen, Bowen Zhang, Gang Wang, Qi WuNeurIPS 2024 · 13 citations
- Triplets Better Than Pairs: Towards Stable and Effective Self-Play Fine-Tuning for LLMsYibo Wang, Hai-Long Sun, Guangda Huzhang, Qingguo Chen et al.NeurIPS 2025 · 12 citations
- CodeTool: Enhancing Programmatic Tool Invocation of LLMs via Process SupervisionYifei Lu, Fanghua Ye, Jian Li, Qiang Gao et al.ACL 2025 · 8 citations
Builds on23
- Language Models are Few-Shot LearnersTom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah et al.NeurIPS 2020 · 64,255 citations
- Training language models to follow instructions with human feedbackLong Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida et al.NeurIPS 2022 · 24,707 citations
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Direct Preference Optimization: Your Language Model is Secretly a Reward ModelRafael Rafailov, Archit Sharma, Eric Mitchell, Christopher D. Manning et al.NeurIPS 2023 · 10,924 citations
- BLIP-2: Bootstrapping Language-Image Pre-training with Frozen Image Encoders and Large Language ModelsJunnan Li, Dongxu Li, Silvio Savarese, Steven C. H. HoiICML 2023 · 7,873 citations
Related papers
- Learning Planning-based Reasoning by Trajectories Collection and Process Reward SynthesizingFangkai Jiao, Chengwei Qin, Zhengyuan Liu, Nancy F. Chen et al.EMNLP 2024 · 1 citation
- TPO: Aligning Large Language Models with Multi-branch & Multi-step Preference TreesWeibin Liao, Xu Chu, Yasha WangICLR 2025
- ToolChain*: Efficient Action Space Navigation in Large Language Models with A* SearchYuchen Zhuang, Xiang Chen, Tong Yu, Saayan Mitra et al.ICLR 2024 · 119 citations
- AutoTool: Efficient Tool Selection for Large Language Model AgentsJingyi Jia, Qinbin LiAAAI 2026 · 4 citations
- Building Math Agents with Multi-Turn Iterative Preference LearningWei Xiong, Chengshuai Shi, Jiaming Shen, Aviv Rosenberg et al.ICLR 2025 · 1 citation
