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

LLM+推理+规划:在存在API的情况下支持不完整用户查询

LLM+Reasoning+Planning for Supporting Incomplete User Queries in Presence of APIs

Intuit AI Research(Intuit人工智能研究院);Intuit Inc.(Intuit公司)

Sudhir Agarwal, Anu Sreepathy, David H. Alonso, Prarit Lamba

AI总结:

针对存在API时用户查询不完整、LLM易幻觉或难编排API的问题,提出结合逻辑推理、经典AI规划与LLM的方法,通过ASP中间表示转PDDL、引入get_info_api收集缺失信息,在相关数据集上成功率超95%,显著优于纯LLM方法。

摘要:

近年来大语言模型(LLMs)的普及推动了众多基于LLM的方法的发展,这些方法旨在为各种终端用户任务提供自然语言接口。而这些终端用户任务通常可通过编排给定的API集合来完成。在实际应用中,自然语言任务请求(用户查询)往往是不完整的,即可能不包含API所需的全部信息。尽管LLM在自然语言处理(NLP)任务中表现出色,但它们在缺失信息上经常出现幻觉,或难以编排API。我们提出的方法的核心思想是利用逻辑推理和经典AI规划,结合LLM来准确回答用户查询,包括识别和收集这些查询中的缺失信息。我们的方法使用LLM和回答集编程(ASP)求解器,通过ASP中的中间表示将用户查询转换为规划域定义语言(PDDL)的表示。我们引入了一个特殊的API“get_info_api”来收集缺失信息。我们将所有API建模为PDDL动作,以支持API之间的数据流。然后,我们的方法使用经典AI规划器生成API调用的编排(包括对get_info_api的调用)来回答用户查询。我们的评估结果表明,在包含完整和不完整的单目标及多目标查询(多目标查询可能需要或不需要API间数据流)的数据集上,我们的方法在大多数情况下显著优于纯LLM方法,成功率超过95%。

英文摘要:

Recent availability of Large Language Models (LLMs) has led to the development of numerous LLM-based approaches aimed at providing natural language interfaces for various end-user tasks. These end-user tasks in turn can typically be accomplished by orchestrating a given set of APIs. In practice, natural language task requests (user queries) are often incomplete, i.e., they may not contain all the information required by the APIs. While LLMs excel at natural language processing (NLP) tasks, they frequently hallucinate on missing information or struggle with orchestrating the APIs. The key idea behind our proposed approach is to leverage logical reasoning and classical AI planning along with an LLM for accurately answering user queries including identification and gathering of any missing information in these queries. Our approach uses an LLM and ASP (Answer Set Programming) solver to translate a user query to a representation in Planning Domain Definition Language (PDDL) via an intermediate representation in ASP. We introduce a special API "get_info_api" for gathering missing information. We model all the APIs as PDDL actions in a way that supports dataflow between the APIs. Our approach then uses a classical AI planner to generate an orchestration of API calls (including calls to get_info_api) to answer the user query. Our evaluation results show that our approach significantly outperforms a pure LLM based approach by achieving over 95% success rate in most cases on a dataset containing complete and incomplete single goal and multi-goal queries where the multi-goal queries may or may not require dataflow among the APIs.

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

↑