CHAPTER 02 · ReAct, Reasoning and Acting Together · 3 / 5
A worked example
Suppose you ask: "Which is taller, the Eiffel Tower or the Statue of Liberty, and by how much?" A ReAct trace might look like this:
Thought: I need the heights of both. I will look up the Eiffel Tower first. Action: search "height of Eiffel Tower" Observation: About 330 meters. Thought: Now the Statue of Liberty. Action: search "height of Statue of Liberty" Observation: About 93 meters including the base. Thought: 330 minus 93 is 237. The Eiffel Tower is taller. Answer: The Eiffel Tower is taller, by roughly 237 meters.
Notice the interplay. Each thought decides the next action; each observation grounds the next thought in a real fact rather than a guess. This grounding, anchoring reasoning to information retrieved from the world, is exactly what prevents the hallucination problem from Chapter 1. (See grounding.)