arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2310.03046cs.SEcs.AI
收藏

EcoAssistant:更经济、更准确地使用大语言模型助手

EcoAssistant: Using LLM Assistant More Affordably and Accurately

University of Washington(华盛顿大学)

Jieyu Zhang, Ranjay Krishna, Ahmed H. Awadallah, Chi Wang

AI总结:

针对大语言模型回答代码驱动型查询准确率低、高查询量成本高的问题,提出EcoAssistant框架,通过自动代码执行迭代优化、分层模型调用和过往成功案例检索,实现了比GPT-4更高的准确率和更低的成本。

摘要:

如今,用户将大语言模型(LLM)作为助手,用来回答需要外部知识的查询:他们询问特定城市的天气、股票价格,甚至特定地点在社区内的位置。这类查询需要LLM生成调用外部API的代码来回答用户问题,但LLM很少能一次就生成正确代码,需要根据执行结果迭代优化代码。此外,使用LLM助手支撑高查询量的成本可能很高。本研究提出了EcoAssistant框架,能让LLM更经济、更准确地回答代码驱动型查询。EcoAssistant包含三个组件:第一,它允许LLM助手与自动代码执行器对话,根据执行结果迭代优化代码或生成答案;第二,我们采用分层LLM助手架构,先尝试用能力较弱、成本更低的LLM回答查询,失败后再转向能力更强、成本更高的模型;第三,我们从过往成功的查询中检索解决方案作为上下文内示例,为后续查询提供帮助。实验结果表明,EcoAssistant在经济性和准确性上均有显著优势,成功率比GPT-4高10个百分点,而成本还不到GPT-4的50%。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑