papers / react2022
Next task →
Research Papers/Post-training and alignment/ReAct: Synergizing Reasoning and Acting in Language Models
Post-training and alignment · #7 · seminal

ReAct: Synergizing Reasoning and Acting in Language Models

Shunyu Yao, Jeffrey Zhao, Dianyu Yu, Nan Du, Izhak Shafran et al. · 2022 · ICLR (2023)
reproduction difficulty: mediumNLPAgentsTool Use

1. Research problem

Language models that only reason internally cannot interact with external environments, while agents that only act lack explicit deliberation.

2. Motivation

The authors wanted a prompting scheme that interleaves reasoning traces and actions so that each can inform the other.

3. Previous approaches

Chain-of-thought reasoning improved answer quality but had no environment interaction; earlier language-agent work used actions without explicit reasoning traces.

4. Core contribution

Introduced ReAct prompting, where the model alternates Thought, Action, and Observation steps and can call tools such as search or a calculator before answering.

5. Mathematical formulation

At each step generate a reasoning thought and an action from a allowed action space, receive an observation, and repeat until a final answer is emitted.

6. Methodology

Few-shot prompt a language model with hand-written reasoning/action trajectories and compare reasoning-only, act-only, and combined settings.

7. Architecture

Decoder-only language model with an external tool/environment loop; no weight updates.

8. Experimental setup

Knowledge-intensive QA, fact verification, and interactive decision-making tasks.

9. Datasets

HotpotQA, FEVER, ALFWorld, WebShop.

10. Results

Reasoning-plus-acting outperformed reasoning-only and acting-only baselines, with interpretable traces and better performance on interactive tasks.

11. Limitations

Hand-written trajectories are needed; long loops can drift or repeat; tool errors propagate into reasoning; high inference cost.

12. Critical analysis

A practical blueprint for tool-using agents whose success shows the value of external memory and actions, though trace faithfulness remains contested.

13. Implementation tasks

  • 1.Implement a ReAct loop with a simple search tool for multi-hop QA.
  • 2.Compare reasoning-only and ReAct accuracy on a small HotpotQA subset.
  • 3.Log and inspect traces to find failure cases where actions contradict thoughts.

14. Follow-up work

  • 1.Toolformer: Language Models Can Teach Themselves to Use Tools (Schick et al., 2023)
  • 2.Tree of Thoughts: Deliberate Problem Solving with Large Language Models (Yao et al., 2023)

15. Open research questions

  • 1.Can models learn to use tools from interaction rather than hand-written prompts?
  • 2.How should agent traces be evaluated for faithfulness and safety?
16. Reproduce it. Record the hypothesis, configuration, dataset, metrics and discrepancies in the Experiment Tracker. A reproduction is not complete until you have run the experiments, performed at least one ablation and documented the differences from the reported numbers.