Explain the ReAct (Reason + Act) loop.
ReAct interleaves reasoning and acting in a cycle: Thought (the model reasons about what to do next), Action (it calls a tool with arguments), Observation (the tool's result is fed back), and repeat until it produces a final answer. The reasoning traces help the model plan and self-correct, while the actions ground it in real, up-to-date data instead of relying on parametric memory. Concretely, each turn the model emits a thought and a tool call; the runtime executes the tool and appends the observation to the context; the loop continues. ReAct reduces hallucination versus pure chain-of-thought because claims get checked against tool outputs. Its costs are more tokens and latency per task, and the risk of unproductive loops if the model never decides it's finished, so you cap iterations.