Interleave thinking with tool calls and agents stop inventing facts
+34points of success on ALFWorld
ReAct: Synergizing Reasoning and Acting in Language Models
Yao et al., Princeton & GoogleICLR 20236 slides, 2 min
Before and after2/6
Reasoning and acting were studied apart
Reason only, or act only
Chain-of-thought reasons in a closed loop and hallucinates facts. Action-only agents call tools but cannot plan, track progress or recover from errors.
ReAct
The model alternates free-form thoughts with actions and reads each observation. Thoughts plan and update; actions fetch real evidence from Wikipedia or the environment.
Decompose the goal, note what is known, and decide what to look up next.
2
Action
Emit a tool call such as search[entity] or lookup[keyword], or an environment command.
3
Observation
The result is appended to the context, and the loop repeats until finish[answer].
Results4/6
Gains are largest on interactive tasks
MethodALFWorld success↑WebShop success↑
Imitation / RL3728.7
Act only4530.1
ReAct+34 pts7140.0
Success rate (%). ALFWorld is best of six prompts against BUTLER; WebShop compares with IL+RL.
The catch5/6
Where ReAct still stumbles
Reasoning loops
On HotpotQA the model sometimes repeats the same thought and action and cannot escape.
Bad search, bad answer
Uninformative search results derail the reasoning; recovery depends on reformulating the query.
Prompt length limits
Few-shot prompts hold only a few demonstrations; fine-tuning smaller models on ReAct traces helped.
Takeaways6/6
Why it matters
Interleaving reasoning traces with actions beats either one alone on knowledge and decision tasks.
Visible thoughts make agent trajectories interpretable and easy to correct by editing a thought.
The thought, action, observation loop became the template for most LLM agents.
1/6
38 upvotes on Hugging Face 6 slides, 2 min
PrincetonPrompts a language model to alternate reasoning traces with tool actions and observations. Grounding thoughts in retrieved facts cuts hallucination, and on ALFWorld and WebShop it beats imitation and RL agents by 34 and 10 points.