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

StateFlow:通过状态驱动工作流增强大语言模型的任务求解能力

StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows

Pennsylvania State University(宾夕法尼亚州立大学);MathGPTPro;Microsoft Research Redmond(微软研究院雷德蒙德分部)

Yiran Wu, Tianwei Yue, Shaokun Zhang, Chi Wang, Qingyun Wu

AI总结:

本研究提出基于状态机的LLM任务求解范式StateFlow,分离流程接地与子任务求解以提升可控性和效率,在多个基准上优于ReAct且成本更低,还可结合迭代优化方法进一步提效。

摘要:

利用大语言模型(LLM)处理复杂任务(例如需要一系列动作、与工具及外部环境动态交互的任务)是当前的显著趋势。本文提出了一种新颖的基于LLM的任务求解范式StateFlow,它将复杂任务求解过程概念化为状态机。在StateFlow中,我们区分了“流程接地”(通过状态和状态转移实现)与“子任务求解”(通过状态内的动作完成),提升了任务求解过程的可控性与可解释性。状态代表运行中流程的当前状态,状态间的转移由启发式规则或LLM的决策控制,可实现动态自适应的推进。进入某个状态后,系统会执行一系列动作,不仅包括调用由不同提示词引导的LLM,还可根据需要使用外部工具。实验结果表明,StateFlow显著提升了LLM的效率:例如,在InterCode SQL和ALFWorld基准测试中,StateFlow的成功率相比ReAct分别高出13%和28%,同时成本分别降低至原来的1/5和1/3。我们还证明,StateFlow可与Reflexion这类迭代优化方法结合,进一步提升性能。

英文摘要:

It is a notable trend to use Large Language Models (LLMs) to tackle complex tasks, e.g., tasks that require a sequence of actions and dynamic interaction with tools and external environments. In this paper, we propose StateFlow, a novel LLM-based task-solving paradigm that conceptualizes complex task-solving processes as state machines. In StateFlow, we distinguish between "process grounding" (via state and state transitions) and "sub-task solving" (through actions within a state), enhancing control and interpretability of the task-solving procedure. A state represents the status of a running process. The transitions between states are controlled by heuristic rules or decisions made by the LLM, allowing for a dynamic and adaptive progression. Upon entering a state, a series of actions is executed, involving not only calling LLMs guided by different prompts, but also the utilization of external tools as needed. Our results show that StateFlow significantly enhances LLMs' efficiency. For instance, StateFlow achieves 13% and 28% higher success rates compared to ReAct in InterCode SQL and ALFWorld benchmark, with 5x and 3x less cost respectively. We also show that StateFlow can be combined with iterative refining methods like Reflexion to further improve performance.

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

↑