From books

The thought–action–observation loop is the basic shape of every modern agent: the model reasons, calls a tool, reads the result, then reasons again.

Shunyu Yao et al. · ReAct: Synergizing Reasoning and Acting in Language Models · 2022 · ReAct: Synergizing Reasoning and Acting in Language Models (arXiv 2210.03629, octombrie 2022) — rezumat1 minute read
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.Shunyu Yao et al. · ReAct: Synergizing Reasoning and Acting in Language Models · 2022 · ReAct: Synergizing Reasoning and Acting in Language Models (arXiv 2210.03629, octombrie 2022) — rezumat

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).

Why it mattersEvery agent you debug has the same loop; once you know it, you know where to look in the log.

ThoughtAction (atool)Observation
One turn; an iteration cap and a log entry on each.
Open on YouTube

Shelves

Back to the feed