Yao et al. study a split in how language models are used. Chain-of-thought reasons inside a closed context; acting systems emit API calls or environment steps with no explicit plan. ReAct generates both on one trajectory. A Thought stays in language and does not change the world; an Action queries Wikipedia or steps through a text environment and returns an Observation that conditions later thoughts.

The paper does not claim a uniform win. On knowledge tasks, ReAct and CoT are complementary: solo ReAct beats CoT on FEVER and trails it on HotpotQA, and the best numbers come from backing off one into the other. On decision tasks, one or two in-context traces outperform imitation and reinforcement learning trained on thousands to hundreds of thousands of demonstrations. The session below is a teaching schematic, not a paper figure. The argument and the tables are in the paper; this site does not host the PDF.

teaching explainer · Yao et al. · ICLR 2023 · PaLM-540B few-shot · arXiv:2210.03629 · project | traces are schematic session logs; numbers marked paper-report come from the tables

0overview + primer — start here

core: Reasoning and acting are one generation loop: the model thinks in language, acts on the world, and lets observations revise the next thought.

interleave

Reason + Act

Alternate reasoning traces and task actions on the same trajectory, instead of thinking the answer through, or emitting actions only.

ground

query outside

Actions let the model query Wikipedia or step through a text environment, then write observations back into context.

inspect

split the trace

Internal knowledge and freshly read sentences can be checked apart; a thought can be edited to pull a bad plan back.

primer — what you need before you start

the task. ReAct targets tasks where a language model needs to look things up and act in the world — answering multi-hop questions (HotpotQA), verifying claims (FEVER), or navigating text-based environments (ALFWorld). The model writes a stream of text; sometimes that text is a thought, sometimes it's an action that hits an external API.

how it was done before. Two camps studied this separately: chain-of-thought prompting (let the model "think out loud" then answer) was strong on knowledge but hallucinated facts; pure action-emitting agents were grounded but couldn't reason across multiple steps. ReAct fuses the two — thought steers what to search, search returns observations that revise the next thought.

glossary — terms you will see.
agent — the language model that decides what to do next, one token at a time.
environment — the outside world the agent acts on (Wikipedia API, ALFWorld text game, etc.).
thought — text the model writes to itself; never reaches the environment. Used for planning, decomposition, synthesis.
action — text the model emits that triggers something in the environment: a search query, a click, a "finish" call.
observation — text the environment prints back into the context (search result snippet, ALFWorld reply, etc.).
trajectory — the whole sequence of (thought, action, observation) tuples for one task. The paper's unit of analysis.
few-shot — paper uses 1-6 worked examples in the prompt, no fine-tuning. This is "prompting", not training.
HotpotQA — multi-hop question answering benchmark (paper §3).
FEVER — fact verification: SUPPORTS / REFUTES / NOT ENOUGH INFO (paper §3).
ALFWorld — text adventure game benchmark (paper §4).

symbol table — what the letters mean.
ctc_t — the context (everything written into the prompt so far).
a^t\hat{a}_t — action the agent decides at step t.
oto_t — observation the environment returns at step t.
ct+1=(ct,a^t,ot+1)c_{t+1}=(c_t,\hat{a}_t,o_{t+1}) — the recursion: new context = old context + new action + new observation.
ct+1=(ct,a^t)c_{t+1}=(c_t,\hat{a}_t) — when the agent emits a thought (no observation comes back), context updates without oo.
A\mathcal{A} — the action space (search, lookup, finish, etc.).
L\mathcal{L} — the language space (anything the model can write).
A^=A∪L\hat{\mathcal{A}}=\mathcal{A}\cup\mathcal{L} — union of both; the agent's actual output space includes both actions and thoughts.

tone legend — what the [brackets] mean.
[obs] observation   [arch] architecture / paper claim
[thought] the agent's inner monologue   [action] external step the agent takes
[react] the ReAct interleaved step   [form] formal derivation
[take] key takeaway   [sys] system / meta   [warn] caveat

Six panes cover, in pedagogical order: the problem (CoT hallucinates, Act-only can't reason); the ReAct mechanism (thought-action-observation loop); what knowledge is required (HotpotQA, FEVER); what decision tasks look like (ALFWorld, WebShop); results (ReAct vs CoT head-to-head); and the limit (prompting-only, no thought editing here). Each pane ends with key takeaways so you can stop after any section and still know what you learned.

1problem: reasoning and acting were studied apart

point: CoT-only is a closed box — facts can hallucinate, errors propagate. Act-only can query the world but has no high-level plan, so a failed search is not rewritten. Below: one teaching multi-hop question, four prompting styles. Schematic — not a paper figure reproduction.

schematic teaching trace, not the actual case.

session · sec 1 · schematic

Q (schematic, not from the paper) · The physicist who proposed general relativity was born in a city in which country?

Standard
CoT only
Act only
ReAct

Standard CoT only Act only ReAct

2mechanism: fold language space into the action space *

point: at time the agent sees and samples the next step. ReAct enlarges the action space to : a Thought in does not change the environment and has no Observation; an environment action in returns . A thought updates context to .

session · sec 2 · schematic
Agent Environment

Thought (no env change) Action Observation context

3knowledge tasks: ground with a Wikipedia API

point: HotpotQA (multi-hop QA) and FEVER (SUPPORTS / REFUTES / NOT ENOUGH INFO) are question-only. The model gets no gold paragraphs. It can use three action types (search / lookup / finish) for many interleaved steps. HotpotQA heuristic: back off after about 7 steps without an answer. The API is weak on purpose, to force explicit language reasoning. Knowledge-task Thought-Action-Obs is dense.

retrieval sentences are schematic, not Wikipedia reprints.

session · sec 3 · schematic
search · lookup · finish

search lookup finish obs / page

4decision tasks: sparse Thought over long action chains

point: in household text games like ALFWorld, expert traces can exceed 50 steps. Thoughts appear only at forks: decompose, track progress, guess a location, handle a closed drawer. Act-only keeps taking from an empty cabinet. WebShop is a noisy real product page.

ALFWorld is a text game; the pane is a text Obs log. Structure borrowed: plan, look in the wrong place, obs empty, revise, put.

session · sec 4 · text game · schematic
ReAct
Act only

sparse Thought Act stuck ReAct revises env obs

5results and limits

point: on knowledge tasks, solo ReAct does not uniformly beat CoT: FEVER Acc 60.9 > CoT 56.3, HotpotQA EM 27.4 < CoT 29.4; CoT-SC is 33.4 / 60.4. Opposite backoffs win: ReAct→CoT-SC 35.1 on HotpotQA, CoT-SC→ReAct 64.6 on FEVER. On decision tasks, 1-2 shots beat IL/RL traces. Tables print paper-report numbers, not a digitized figure.

session · sec 5 · results
HotPotQA / ALFWorld / WebShop head-to-head

ReAct CoT / other prompting Act / IL paper-report numbers

71%

ALFWorld · ReAct best of 6

40.0 vs 30.1

WebShop SR: ReAct vs Act (~+10 abs. pp over the prior best)

56%

share of CoT failure modes that are hallucination

3k

finetune traces: small model can beat large-model prompting

The four cards are paper-report results, not computed from the printout above. Point values from the paper's scatter plot are not reproduced here; only this qualitative line is kept.

Schematic traces are teaching schematics. Numbers reported: Yao et al., ReAct: Synergizing Reasoning and Acting in Language Models, ICLR 2023, arXiv:2210.03629. This site does not host the PDF.