{"repo":"zou-group/avatar","free":true,"listed":false,"github":"https://github.com/zou-group/avatar","clone":"git clone https://github.com/zou-group/avatar.git","description":"(NeurIPS 2024) AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning","language":"Python","stars":241,"topics":["agents","knowledge-base","llms","retrieval","tool-use"],"license":null,"category":"ai-agents","readme_excerpt":"AvaTaR: Optimizing LLM Agents for Tool Usage via Contrastive Reasoning (NeurIPS 2024) NeurIPS paper DSPy Implementation AvaTaR is a novel and automatic framework that optimizes an LLM agent to effectively use the provided tools and improve its performance on a given task/domain. During optimization, we design a comparator module to iteratively provide insightful and holistic prompts to the LLM agent via reasoning between positive and negative examples sampled from training data. News [July 2024] 🔥 Avatar is integrated into DSPy - Credit to Herumb Shandilya! You can try out the example on jupyter notebook. 1. (For general QA）Using Avatar with DSPy Avatar is now integrated with DSPy as Avatar Module for agent execution and AvatarOptimizer for Actor optimization. To use Avatar you'll need: Task Signature and Tools. Task Signature is a dspy.Signature class defining the structure of your task. So if your task is of QA type you can create a signature with question input field and answer output field. Tools is a list of dspy.Tools containing all the tools of langchain tool format. Here is an example You can execute it like any other DSPy module by passing the inputs you specified in your task signature: You can optimize the Actor for optimal tool usage using AvatarOptimizer which optimizes it using the comparator module: For a detailed walkthrough, you can refer to the notebook in DSPy repo. 2. (To reproduce the results) Run AvaTaR on STaRK and Flickr-30kEntities Installation Prepa","default_branch":null,"files":null,"tree":[],"storefront":"/r/zou-group","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/zou-group/avatar/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}