arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2402.00798cs.LGcs.AIcs.CLcs.FL
收藏

Formal-LLM:融合形式语言与自然语言以实现可控的基于LLM的智能体

Formal-LLM: Integrating Formal Language and Natural Language for Controllable LLM-based Agents

Rutgers University(罗格斯大学)

Zelong Li, Wenyue Hua, Hao Wang, He Zhu, Yongfeng Zhang

AI总结:

本文提出Formal-LLM框架,将规划约束表达为自动机并在其监督下进行基于栈的LLM计划生成,使基于LLM的智能体规划过程可控,实验显示整体性能提升超过50%。

摘要:

大语言模型(LLMs)的最新进展使AI智能体能够自动生成并执行多步计划以解决复杂任务。然而,由于LLM的内容生成过程难以控制,当前基于LLM的智能体经常生成无效或不可执行的计划,这损害了所生成计划的性能,并破坏了用户对基于LLM的智能体的信任。针对这一问题,本文提出了一种新颖的“Formal-LLM”框架,通过整合自然语言的表达能力和形式语言的精确性来构建基于LLM的智能体。具体而言,该框架允许智能体开发者将规划过程中的需求或约束表达为一个自动机。随后,在该自动机的监督下进行基于栈的LLM计划生成过程,以确保生成的计划满足约束,从而使规划过程可控。我们在基准任务和实际现实任务上进行了实验,我们的框架实现了超过50%的整体性能提升,这验证了采用Formal-LLM来引导智能体计划生成的可行性和有效性,防止智能体生成无效和不成功的计划。此外,更可控的基于LLM的智能体可以促进LLM在规划有效性至关重要的应用场景中得到更广泛的利用。本工作的源代码可在 https://github.com/agiresearch/Formal-LLM 获取。

英文摘要:

Recent advancements on Large Language Models (LLMs) enable AI Agents to automatically generate and execute multi-step plans to solve complex tasks. However, since LLM's content generation process is hardly controllable, current LLM-based agents frequently generate invalid or non-executable plans, which jeopardizes the performance of the generated plans and corrupts users' trust in LLM-based agents. In response, this paper proposes a novel "Formal-LLM" framework for LLM-based agents by integrating the expressiveness of natural language and the precision of formal language. Specifically, the framework allows agent developers to express their requirements or constraints for the planning process as an automaton. A stack-based LLM plan generation process is then conducted under the supervision of the automaton to ensure that the generated plan satisfies the constraints, making the planning process controllable. We conduct experiments on both benchmark tasks and practical real-life tasks, and our framework achieves over 50% overall performance increase, which validates the feasibility and effectiveness of employing Formal-LLM to guide the plan generation of agents, preventing the agents from generating invalid and unsuccessful plans. Further, more controllable LLM-based agents can facilitate the broader utilization of LLM in application scenarios where high validity of planning is essential. The source code of this work is available at https://github.com/agiresearch/Formal-LLM.

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

↑