Book
ReAct: Synergizing Reasoning and Acting in Language Models
by Shunyu Yao et al. · 2022 · 1 reading card
1 card
ReAct: Synergizing Reasoning and Acting in Language Models · 2022
Thought, action, observation: every turn of the loop is a place to check and a place to attack.
ReAct interleaves Thought / Action / Observation. Today it is the native tool loop of every API: the model emits a tool call, the runtime executes it, appends the result, the model continues. What the paper measured: fewer hallucinations than chain-of-thought alone, because the facts come from the environment rather than from memory. Engineering consequences: the observation is where untrusted content enters (lesson 17); cap the number of iterations; make every tool idempotent or confirmable; log every triple so it can be replayed. Variants: Reflexion (self-critique between episodes), plan-and-execute (plan once, then act).
“In this paper, we explore the use of LLMs to generate both reasoning traces and task-specific actions in an interleaved manner, allowing for greater synergy between the two: reasoning traces help the model induce, track, and update action plans as well as handle exceptions, while actions allow it to interface with external sources, such as knowledge bases or environments, to gather additional information.”