StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows
Yiran Wu, Tianwei Yue, Shaokun Zhang, Chi Wang, Qingyun Wu

TL;DR
StateFlow introduces a state machine-based paradigm for LLM task-solving, improving control, interpretability, and efficiency in complex, multi-step tasks involving external tools and dynamic interactions.
Contribution
It proposes a novel state-driven framework for LLMs that separates process grounding from sub-task solving, enhancing adaptability and performance.
Findings
Achieves 13% higher success rate on InterCode SQL benchmark
Achieves 28% higher success rate on ALFWorld benchmark
Reduces task-solving cost by up to 5x
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsBusiness Process Modeling and Analysis · Cloud Data Security Solutions
