SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2403.11322 · 2024

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

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2403.11322.json · badge: /api/ran/2403.11322.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
kevin666aa/stateflow canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
bleu_score Ran
ran, honoured the contract we drafted
kevin666aa/stateflow/ALFWorld/src/chat_utils.py
pointer only (licence: NONE) · get_code("88c3f0a98558ec2f")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kevin666aa/stateflow when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

check_success Ran
ran, violated the contract we drafted
kevin666aa/stateflow/InterCode/experiments/flow_bash.py
pointer only (licence: NONE) · get_code("ca6caf87b63d4398")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kevin666aa/stateflow when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_summary Ran
ran; our contract draft was wrong, not the code
kevin666aa/stateflow/InterCode/experiments/analysis.py
pointer only (licence: NONE) · get_code("0f432ceb9a38285e")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kevin666aa/stateflow when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_base_prompts Ran
ran; our contract draft was wrong, not the code
kevin666aa/stateflow/ALFWorld/src/chat_utils.py
pointer only (licence: NONE) · get_code("91f9ad6e6584206b")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kevin666aa/stateflow when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_prompts Ran
ran; our contract draft was wrong, not the code
kevin666aa/stateflow/ALFWorld/src/chat_utils.py
pointer only (licence: NONE) · get_code("ad7277e0c33fc9aa")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kevin666aa/stateflow when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

preprocess_sql Ran
ran; our contract draft was wrong, not the code
kevin666aa/stateflow/InterCode/experiments/eval_stateflow_bash.py
pointer only (licence: NONE) · get_code("97c0a864b7200ede")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kevin666aa/stateflow when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

state_transition Ran
ran; our contract draft was wrong, not the code
kevin666aa/stateflow/InterCode/experiments/flow_bash.py
pointer only (licence: NONE) · get_code("fbd0a1980baa43a1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, kevin666aa/stateflow when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 1 are also present in other papers whose code we hold (1 with at least one paper dated earlier, 0 the same month, 0 later) and 6 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
preprocess_sql 1 other paper
1 dated earlier
2306.14898 (2023-06)
InterCode: Standardizing and Benchmarking Interactive Coding with Execution Feedback

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2403.11322")
get_code_for_paper("2403.11322")
have("2403.11322")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2403.11322.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2403.11322.svg)](https://syntology.ai/paper/2403.11322)

Connect an agent — have() is free.