“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).
The thought-action-observation loop changes what a model's mistake even means. When facts come from the environment, the error is no longer just in the generated text, but in the moment of choosing a tool or reading its result. This makes debugging concrete: you can inspect each triplet and ask where the chain broke. For example, an agent that books a table at the wrong time can be traced step by step: it reasoned fine, but read the hour from an ambiguous tool response. The bug becomes a locatable point, not a nebula of text. One question remains: what happens when the observation itself is misleading or incomplete?
Observation is the loop's weak gate. The model cannot know whether a tool's result is true; it treats it as fact, just like its own thoughts. If a tool returns stale, partial, or model-generated data, hallucination doesn't vanish — it moves into the environment. For example, an agent checking product availability gets an outdated API response and confidently says the item is in stock. That's why observations deserve the same scrutiny as generated text: source, timestamp, provenance. But if observations can be suspect, a question arises: should the model double-check its own conclusions between rounds?
Why it matters Every agent you debug has the same loop; once you know it, you know where to look in the log.