WTF is ReAct? (Reasoning + Acting)
A pattern where the model alternates between thinking out loud and taking an action, then observes the result.
Also called: reason and act
TL;DR
ReAct is the original recipe for an LLM agent: think about what to do, do it (search, call a tool), look at what came back, and repeat until done. Almost every modern agent loop descends from this idea.
How it works
The prompt interleaves Thought / Action / Observation steps. The model writes a reasoning trace, then an action in a parseable format; the harness executes it and appends the observation; the model continues. Grounding reasoning in real observations reduced hallucination compared with reasoning-only chain-of-thought. Today the explicit text format is mostly replaced by native tool-call APIs, but the loop is the same.
Example
Thought: I need today's weather in Pune.
Action: get_weather(city="Pune")
Observation: {"temp_c": 29, "sky": "clear"}
Thought: I have what I need.
Answer: It's 29°C and clear in Pune right now.Origin
- Coined / introduced by
- Yao et al. (Princeton & Google)
- When
- 6 Oct 2022
- Story
- Introduced in 'ReAct: Synergizing Reasoning and Acting in Language Models'.