Papers › StateAct: State Tracking and Reasoning for Acting and Planning with Large Language Models

StateAct: State Tracking and Reasoning for Acting and Planning with Large Language Models

21 Sep 2024arXiv:2410.02810archive 2025-07-28

Nikolai Rozanov, Marek Rei

Planning and acting to solve `real' tasks using large language models (LLMs) in interactive environments has become a new frontier for AI methods. While recent advances allowed LLMs to interact with online tools, solve robotics tasks and many more, long range reasoning tasks remain a problem for LLMs. Existing methods to address this issue are very resource intensive and require additional data or human crafted rules, instead, we propose a simple method based on few-shot in-context learning alone to enhance `chain-of-thought' with state-tracking for planning and acting with LLMs. We show that our method establishes the new state-of-the-art on Alfworld for in-context learning methods (+14\% over the previous best few-shot in-context learning method) and performs on par with methods that use additional training data and additional tools such as code-execution. We also demonstrate that our enhanced `chain-of-states' allows the agent to both solve longer horizon problems and to be more efficient in number of steps required to solve a task. We show that our method works across a variety of LLMs for both API-based and open source ones. Finally, we also conduct ablation studies and show that `chain-of-thoughts' helps state-tracking accuracy, while a json-structure harms overall performance. We open-source our code and annotations at https://github.com/ai-nikolai/StateAct.

PaperPDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2410.02810")

Code

Syntology Ran 12 of 19 code samples harvested from 1 repository linked to this paper; 7 have no recorded run. Of those that ran: 1 ran · our draft was wrong; 11 ran with no contract checked.

By repository: official repository: 19 samples from 1 repository, 12 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

ai-nikolai/stateact officialmentioned in papermentioned on GitHub report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

19 samples harvested; 12 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

1ran · our draft was wrong
11ran
7unverified

Licence: 19 of the 19 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from ai-nikolai/stateact. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

extract_command_and_format ai-nikolai/stateact/alfworld_runs/alfworld_react_prompt_utils.py official repository ran no licence file found · pointer only · 2ab8b87e8d7a5b77 · report
general_action_cleaning ai-nikolai/stateact/alfworld_runs/alfworld_run.py official repository ran fingerprinted no licence file found · pointer only · 6077500f2a5fe7bb · report
get_env_type ai-nikolai/stateact/alfworld_runs/alfworld_run.py official repository ran fingerprinted no licence file found · pointer only · 615dc37d09ed8ef9 · report
parse_expression ai-nikolai/stateact/textcraft_runs/run_textcraft_adapt.py official repository ran · our draft was wrong fingerprinted no licence file found · pointer only · bee05b7b2b0ae815 · report
parse_results ai-nikolai/stateact/webshop_runs/transform.py official repository ran no licence file found · pointer only · df43aebbc0d02eb2 · report
phi ai-nikolai/stateact/textcraft_runs/run_textcraft_thread.py official repository ran fingerprinted no licence file found · pointer only · 9eae20ece0fa12fe · report
plan_to_args ai-nikolai/stateact/textcraft_runs/run_textcraft_adapt.py official repository ran fingerprinted no licence file found · pointer only · 163b27b8444b232b · report
psi ai-nikolai/stateact/textcraft_runs/run_textcraft_thread.py official repository ran fingerprinted no licence file found · pointer only · 142de1580a8559de · report
remove_keys ai-nikolai/stateact/alfworld_runs/alfworld_ablation_generator.py official repository ran no licence file found · pointer only · 2757e9521faf9ae2 · report
transform_baseprompt_into_jsonstate_string ai-nikolai/stateact/alfworld_runs/alfworld_ablation_generator.py official repository ran no licence file found · pointer only · 2a292e9393408367 · report
transform_baseprompt_into_stringstate_string ai-nikolai/stateact/alfworld_runs/alfworld_ablation_generator.py official repository ran no licence file found · pointer only · 19fd321d955bf1c7 · report
transform_put_action ai-nikolai/stateact/alfworld_runs/alfworld_run.py official repository ran no licence file found · pointer only · 5ac406ca03d4dcc5 · report
llm ai-nikolai/stateact/textcraft_runs/run_textcraft_adapt.py official repository unverified no licence file found · pointer only · 0b9398a05fe8427e · report
llm ai-nikolai/stateact/webshop_runs/run_webshop_adapted.py official repository unverified no licence file found · pointer only · fa6aecfd93116153 · report
llm_chat ai-nikolai/stateact/webshop_runs/run_webshop_adapted.py official repository unverified no licence file found · pointer only · fa828596043c1e90 · report
llm_tropic ai-nikolai/stateact/webshop_runs/run_webshop_adapted.py official repository unverified no licence file found · pointer only · 8377ace36b15d7c1 · report
load_results ai-nikolai/stateact/alfworld_runs/get_score.py official repository unverified no licence file found · pointer only · c67ce7ef9daabda8 · report
return_json_react_examples ai-nikolai/stateact/alfworld_runs/alfworld_react_prompt_utils.py official repository unverified no licence file found · pointer only · 2173d108b18e06c8 · report
return_react_examples ai-nikolai/stateact/alfworld_runs/alfworld_react_prompt_utils.py official repository unverified no licence file found · pointer only · 8515d68e79091391 · report

Tasks

In-Context Learning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections