Skip to main content
QUICK REVIEW

[논문 리뷰] StateFlow: Enhancing LLM Task-Solving through State-Driven Workflows

Yiran Wu, Tianwei Yue|arXiv (Cornell University)|2024. 03. 17.
Business Process Modeling and AnalysisBusiness, Management and Accounting인용 수 3
한 줄 요약

StateFlow는 유한 상태기계로 모델링된 상태 기반 워크플로우 파рад림을 도입하여 LLM 작업 해결 과정을 분리된 제어 및 해석 가능성으로 향상시킨다. InterCode SQL 및 ALFWorld 벤치마크에서 각각 ReAct 대비 13%와 28% 높은 성공률을 기록하며, 추론 비용은 3–5배 낮추었고, Reflexion과 같은 반복 보정 방법과도 효과적으로 통합된다.

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 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.

연구 동기 및 목표

  • LLM 기반 작업 해결 워크플로우의 정밀한 제어 및 해석 가능성 부족 문제를 해결하기 위해.
  • 도구 사용 및 환경 상호작용이 필요한 복잡한 다단계 작업에서 효율성과 신뢰성을 향상시키기 위해.
  • 작업 해결 과정을 유한 상태기계로 모델링하여 상태 전이와 작업 실행을 분리하기 위해.
  • 동적이고 히ュ리스틱 또는 LLM 기반 제어로 상태 간 진행을 가능하게 하여 적응형 문제 해결을 가능하게 하기 위해.
  • 반복 보정 기법(예: Reflexion)과의 호환성을 입증하여 성능 향상을 추가로 달성하기 위해.

제안 방법

  • StateFlow는 각 상태가 과정의 특정 단계를 나타내는 유한 상태기계(FSM)로 작업 해결을 모델링한다.
  • 각 상태는 맥락 기록에 기반하여 작업 전용 프롬프트를 사용한 LLM 호출 또는 외부 도구 호출을 포함하는 출력 함수 시퀀스를 트리거한다.
  • 상태 전이는 히ュ리스틱 규칙 또는 LLM 결정에 의해 제어되어 워크플로우를 동적으로 진행시킨다.
  • 프로세스 기반 설계(상태 관리)와 하위 작업 해결(상태 내 작업 실행)을 분리하여 모듈성과 제어력을 향상시킨다.
  • 외부 도구(예: SQL 실행기, 셸 명령어)는 상태 진입 시 트리거되는 액션 함수를 통해 통합된다.
  • 최종 'End' 상태에 도달하면 성공 기준 또는 오류 처리에 의해 종료된다.
Figure 1: The StateFlow models for the SQL and Bash task. Init and End state are basic components of state machines, and states like Observe , Solve , Verify , Error can be adaptable across various tasks. When reaching a state, a sequence of output functions defined is executed (e.g., $\text{M}_{i}\
Figure 1: The StateFlow models for the SQL and Bash task. Init and End state are basic components of state machines, and states like Observe , Solve , Verify , Error can be adaptable across various tasks. When reaching a state, a sequence of output functions defined is executed (e.g., $\text{M}_{i}\

실험 결과

연구 질문

  • RQ1LLM 작업 해결을 유한 상태기계로 모델링할 경우, 복잡한 다단계 작업에서 제어성, 해석 가능성, 효율성이 향상되는가?
  • RQ2다양한 벤치마크에서 StateFlow는 ReAct 대비 성공률과 추론 비용 측면에서 어떻게 비교되는가?
  • RQ3StateFlow는 Reflexion과 같은 반복 보정 기법과 얼마나 잘 통합되어 성능 향상을 추가로 달성하는가?
  • RQ4특정 상태(예: Observe, Verify, Error)가 전체 작업 해결 성공에 기여하는 역할은 무엇인가?
  • RQ5히ュ리스틱 규칙과 LLM 기반 결정이 함께 작용할 때 상태 전이 정확도와 워크플로우의 견고성에 어떤 영향을 미치는가?

주요 결과

  • InterCode SQL 벤치마크에서 StateFlow는 ReAct 대비 13% 높은 성공률을 기록했으며, LLM 추론 비용은 5배 낮췄다.
  • ALFWorld 벤치마크에서 StateFlow는 ReAct 대비 성공률을 28% 향상시키며 비용은 3배 감소시켰다.
  • 반복 보정과의 통합에서 강력한 호환성을 입증하여, 6회 반복 동안 Reflexion과 결합한 결과 ALFWorld 성공률이 84.3%에서 94.8%로 상승했다.
  • 제거 실험을 통해 Observe, Solve, Verify와 같은 상태가 성능 향상에 기여하며, 상태별 액션 시퀀스가 작업 완료 정확도를 향상시킨다.
  • StateFlow의 분리된 아키텍처는 작업 진행 상황과 의사결정 로직을 더 명확히 추적할 수 있게 하여, 종단 간 프롬프팅 대비 해석 가능성 향상을 이뤘다.
  • 히ュ리스틱 기반 전이와 LLM 기반 결정을 병행함으로써 다양한 작업 유형에 걸쳐 견고하고 적응 가능한 워크플로우 진행이 가능해졌다.
Figure 2: A ReAct few-shot example for the SQL task. From the example, we can abstract a general workflow to solve the problem.
Figure 2: A ReAct few-shot example for the SQL task. From the example, we can abstract a general workflow to solve the problem.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.