ChatPaper.aiChatPaper

EcoAssistant: Het gebruik van LLM-assistenten tegen lagere kosten en met hogere nauwkeurigheid

EcoAssistant: Using LLM Assistant More Affordably and Accurately

October 3, 2023
Auteurs: Jieyu Zhang, Ranjay Krishna, Ahmed H. Awadallah, Chi Wang
cs.AI

Samenvatting

Tegenwoordig vragen gebruikers grote taalmodellen (LLMs) als assistenten om vragen te beantwoorden die externe kennis vereisen; ze vragen naar het weer in een specifieke stad, naar aandelenkoersen en zelfs naar waar bepaalde locaties zich in hun buurt bevinden. Deze vragen vereisen dat het LLM code produceert die externe API's aanroept om de vraag van de gebruiker te beantwoorden, maar LLMs produceren zelden correcte code in de eerste poging, wat iteratieve codeverfijning vereist op basis van uitvoeringsresultaten. Bovendien kan het gebruik van LLM-assistenten om hoge queryvolumes te ondersteunen kostbaar zijn. In dit werk dragen we een framework bij, EcoAssistant, dat LLMs in staat stelt om code-gedreven vragen betaalbaarder en nauwkeuriger te beantwoorden. EcoAssistant bestaat uit drie componenten. Ten eerste stelt het de LLM-assistenten in staat om te communiceren met een automatische code-uitvoerder om code iteratief te verfijnen of antwoorden te produceren op basis van de uitvoeringsresultaten. Ten tweede gebruiken we een hiërarchie van LLM-assistenten, die eerst probeert de vraag te beantwoorden met zwakkere, goedkopere LLMs voordat wordt teruggevallen op sterkere, duurdere LLMs. Ten derde halen we oplossingen uit eerdere succesvolle queries op als in-context demonstraties om volgende queries te helpen. Empirisch tonen we aan dat EcoAssistant duidelijke voordelen biedt op het gebied van betaalbaarheid en nauwkeurigheid, waarbij het GPT-4 met 10 procentpunten succesratio overtreft tegen minder dan 50% van de kosten van GPT-4.
English
Today, users ask Large language models (LLMs) as assistants to answer queries that require external knowledge; they ask about the weather in a specific city, about stock prices, and even about where specific locations are within their neighborhood. These queries require the LLM to produce code that invokes external APIs to answer the user's question, yet LLMs rarely produce correct code on the first try, requiring iterative code refinement upon execution results. In addition, using LLM assistants to support high query volumes can be expensive. In this work, we contribute a framework, EcoAssistant, that enables LLMs to answer code-driven queries more affordably and accurately. EcoAssistant contains three components. First, it allows the LLM assistants to converse with an automatic code executor to iteratively refine code or to produce answers based on the execution results. Second, we use a hierarchy of LLM assistants, which attempts to answer the query with weaker, cheaper LLMs before backing off to stronger, expensive ones. Third, we retrieve solutions from past successful queries as in-context demonstrations to help subsequent queries. Empirically, we show that EcoAssistant offers distinct advantages for affordability and accuracy, surpassing GPT-4 by 10 points of success rate with less than 50% of GPT-4's cost.
PDF61February 8, 2026