Key Contribution
ReAct introduces a simple but powerful paradigm: interleaving reasoning (thinking) with acting (using tools). This synergy enables language models to both reason about tasks AND take grounded actions, with each informing the other.
The ReAct Paradigm
Traditional Approaches
ReAct Approach
Alternate between:
Example Trace
Question: What is the elevation of the birthplace of the inventor of the telephone?
Thought 1: I need to find who invented the telephone.
Action 1: Search[inventor of telephone]
Observation 1: Alexander Graham Bell invented the telephone...
Thought 2: Alexander Graham Bell invented the telephone. Now I need his birthplace.
Action 2: Search[Alexander Graham Bell birthplace]
Observation 2: Bell was born in Edinburgh, Scotland...
Thought 3: Bell was born in Edinburgh. Now I need Edinburgh's elevation.
Action 3: Search[Edinburgh elevation]
Observation 3: Edinburgh has an elevation of 47 meters...
Thought 4: The elevation of Edinburgh is 47 meters.
Action 4: Finish[47 meters]
Why It Works
Reasoning Helps Acting
Acting Helps Reasoning
Evaluation
Tasks
Results
Relevance to Agent Memory
Memory in ReAct
The observation history serves as working memory:
Extensions for Long-term Memory
ReAct can be extended with:
Implementation Patterns
Prompt Structure
Solve a question answering task with interleaving Thought, Action, Observation steps.
Thought: [reasoning about current state]
Action: [Search/Lookup/Finish][input]
Observation: [result of action]
(repeat)
Action Space
Define available actions:
Limitations
Impact
ReAct has become foundational for:
Citation
@inproceedings{yao2023react,
title={ReAct: Synergizing Reasoning and Acting in Language Models},
author={Yao, Shunyu and Zhao, Jeffrey and Yu, Dian and Du, Nan and Shafran, Izhak and Narasimhan, Karthik and Cao, Yuan},
booktitle={International Conference on Learning Representations},
year={2023}
}