AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning
Shirley Wu, Shiyu Zhao, Qian Huang, Kexin Huang, Michihiro Yasunaga, Kaidi Cao, Vassilis N. Ioannidis, Karthik Subbian, Jure Leskovec, James Y. Zou
Abstract
Large language model (LLM) agents have demonstrated impressive capabilities in utilizing external tools and knowledge to boost accuracy and reduce hallucinations. However, developing prompting techniques that enable LLM agents to effectively use these tools and knowledge remains a heuristic and labor-intensive task. Here, we introduce AvaTaR, a novel and automated framework that optimizes an LLM agent to effectively leverage provided tools, improving performance on a given task. During optimization, we design a comparator module to iteratively deliver insightful and comprehensive prompts to the LLM agent by contrastively reasoning between positive and negative examples sampled from training data. We demonstrate AvaTaR on four complex multimodal retrieval datasets featuring textual, visual, and relational information, and three general question-answering (QA) datasets. We find AvaTaR consistently outperforms state-of-the-art approaches across all seven tasks, exhibiting strong generalization ability when applied to novel cases and achieving an average relative improvement of 14% on the Hit@1 metric for the retrieval datasets and 13% for the QA datasets. Code and dataset are available at https://github.com/zou-group/avatar.
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.
24 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
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models cites Self-Refine: Iterative Refinement with Self-Feedback
- Tree of Thoughts: Deliberate Problem Solving with Large Language Models cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM Systems cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- ContextAgent: Context-Aware Proactive LLM Agents with Open-world Sensory Perceptions cites Reflexion: language agents with verbal reinforcement learning
- ContextAgent: Context-Aware Proactive LLM Agents with Open-world Sensory Perceptions cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Self-Refine: Iterative Refinement with Self-Feedback cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- Optimas: Optimizing Compound AI Systems with Globally Aligned Local Rewards cites Self-Refine: Iterative Refinement with Self-Feedback
- Optimas: Optimizing Compound AI Systems with Globally Aligned Local Rewards cites Reflexion: language agents with verbal reinforcement learning
- Optimas: Optimizing Compound AI Systems with Globally Aligned Local Rewards cites SiriuS: Self-improving Multi-agent Systems via Bootstrapped Reasoning
- Reflexion: language agents with verbal reinforcement learning cites Self-Refine: Iterative Refinement with Self-Feedback
- Reflexion: language agents with verbal reinforcement learning cites Toolformer: Language Models Can Teach Themselves to Use Tools
- Reflexion: language agents with verbal reinforcement learning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
- SiriuS: Self-improving Multi-agent Systems via Bootstrapped Reasoning cites Tree of Thoughts: Deliberate Problem Solving with Large Language Models
- SiriuS: Self-improving Multi-agent Systems via Bootstrapped Reasoning cites Reflexion: language agents with verbal reinforcement learning
- SiriuS: Self-improving Multi-agent Systems via Bootstrapped Reasoning cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
Cited by top-tier papers24
- ContextAgent: Context-Aware Proactive LLM Agents with Open-world Sensory PerceptionsBufang Yang, Lilin Xu, Liekang Zeng, Kaiwei Liu et al.NeurIPS 2025 · 68 citations
- SiriuS: Self-improving Multi-agent Systems via Bootstrapped ReasoningWanjia Zhao, Mert Yüksekgönül, Shirley Wu, James Y. ZouNeurIPS 2025 · 49 citations
- Heterogeneous Swarms: Jointly Optimizing Model Roles and Weights for Multi-LLM SystemsShangbin Feng, Zifeng Wang, Palash Goyal, Yike Wang et al.NeurIPS 2025 · 26 citations
- Optimas: Optimizing Compound AI Systems with Globally Aligned Local RewardsShirley Wu, Parth Sarthi, Shiyu Zhao, Aaron Lee et al.ICLR 2026 · 25 citations
- Agent-X: Evaluating Deep Multimodal Reasoning in Vision-Centric Agentic TasksTajamul Ashraf, Amal Saqib, Hanan Gani, Muhra AlMahri et al.ICLR 2026 · 15 citations
Builds on38
- Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
- Toolformer: Language Models Can Teach Themselves to Use ToolsTimo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu et al.NeurIPS 2023 · 5,989 citations
- Reflexion: language agents with verbal reinforcement learningNoah Shinn, Federico Cassano, Ashwin Gopinath, Karthik Narasimhan et al.NeurIPS 2023 · 5,828 citations
- Tree of Thoughts: Deliberate Problem Solving with Large Language ModelsShunyu Yao, Dian Yu, Jeffrey Zhao, Izhak Shafran et al.NeurIPS 2023 · 5,068 citations
- Self-Refine: Iterative Refinement with Self-FeedbackAman Madaan, Niket Tandon, Prakhar Gupta, Skyler Hallinan et al.NeurIPS 2023 · 4,972 citations
Related papers
- PRompt Optimization in Multi-Step Tasks (PROMST): Integrating Human Feedback and Heuristic-based SamplingYongchao Chen, Jacob Arkin, Yilun Hao, Yang Zhang et al.EMNLP 2024 · 6 citations
- ATLAS: Orchestrating Heterogeneous Models and Tools for Multi-Domain Complex ReasoningJinyang Wu, Guocheng Zhai, Ruihan Jin, Jiahao Yuan et al.ACL Findings 2026
- AutoManual: Constructing Instruction Manuals by LLM Agents via Interactive Environmental LearningMinghao Chen, Yihang Li, Yanting Yang, Shiyu Yu et al.NeurIPS 2024 · 67 citations
- Dynamic Tool Dependency Retrieval for Lightweight Function CallingBhrij Patel, Davide Belli, Amir Jalalirad, Maximilian Arnold et al.ACL Findings 2026
- Evoke: Evoking Critical Thinking Abilities in LLMs via Reviewer-Author Prompt EditingXinyu Hu, Pengfei Tang, Simiao Zuo, Zihan Wang et al.ICLR 2024 · 14 citations
