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 about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext d4d9084e-8166-46fa-9819-e60e2a52ca22Cited 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 on36
- 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
- AutoManual: Constructing Instruction Manuals by LLM Agents via Interactive Environmental LearningMinghao Chen, Yihang Li, Yanting Yang, Shiyu Yu et al.NeurIPS 2024 · 67 citations
- 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
- Harnessing Large Language Models for Knowledge Graph Question Answering via Adaptive Multi-Aspect Retrieval-AugmentationDerong Xu, Xinhang Li, Ziheng Zhang, Zhenxi Lin et al.AAAI 2025 · 14 citations
- Meta-Tool: Unleash Open-World Function Calling Capabilities of General-Purpose Large Language ModelsShengqian Qin, Yakun Zhu, Linjie Mu, Shaoting Zhang et al.ACL 2025 · 3 citations
