26 Aug 2024 | Yiran Wu, Tianwei Yue, Shaokun Zhang, Chi Wang, Qingyun Wu
StateFlow is a novel framework for enhancing the efficiency and control of Large Language Models (LLMs) in solving complex, multi-step tasks. It conceptualizes the task-solving process as a state machine, distinguishing between "process grounding" (via state transitions) and "sub-task solving" (through actions within a state). This approach allows for dynamic and adaptive progression, with states representing the status of the running process and transitions controlled by heuristic rules or LLM decisions. The framework integrates external tools and environments, improving both the effectiveness and efficiency of LLMs.
In experiments, StateFlow outperforms existing methods in terms of success rates and cost reduction. For instance, it achieves 13% and 28% higher success rates compared to ReAct in InterCode SQL and ALFWorld benchmarks, with 5× and 3× less cost, respectively. StateFlow can also be combined with iterative refining methods like Reflexion to further enhance performance. The main contributions of StateFlow include introducing a new paradigm for LLM workflows, providing guidelines for building StateFlow models, and demonstrating its effectiveness and efficiency through case studies and ablation studies.StateFlow is a novel framework for enhancing the efficiency and control of Large Language Models (LLMs) in solving complex, multi-step tasks. It conceptualizes the task-solving process as a state machine, distinguishing between "process grounding" (via state transitions) and "sub-task solving" (through actions within a state). This approach allows for dynamic and adaptive progression, with states representing the status of the running process and transitions controlled by heuristic rules or LLM decisions. The framework integrates external tools and environments, improving both the effectiveness and efficiency of LLMs.
In experiments, StateFlow outperforms existing methods in terms of success rates and cost reduction. For instance, it achieves 13% and 28% higher success rates compared to ReAct in InterCode SQL and ALFWorld benchmarks, with 5× and 3× less cost, respectively. StateFlow can also be combined with iterative refining methods like Reflexion to further enhance performance. The main contributions of StateFlow include introducing a new paradigm for LLM workflows, providing guidelines for building StateFlow models, and demonstrating its effectiveness and efficiency through case studies and ablation studies.