LLMs can't do reliable math, fetch live data, or run code. ReAct lets them use tools by interleaving reasoning with actions.
Thought → reason about what to do next
Action → call a tool (search, calculator, API)
Observation → tool result is fed back in
Thought → reason about the observation
... repeat until ...
Answer → final response
1Question: What is the population of France divided by 2?
2
3Thought: I need the current population of France. I'll search.
4Action: search("population of France 2024")
5Observation: ~68 million
6Thought: Now divide by 2 using the calculator.
7Action: calculator("68000000 / 2")
8Observation: 34000000
9Thought: I have the answer.
10Answer: About 34 million.The model reasons about which tool to use, the system actually executes the tool, and the result is injected back as an observation. The LLM never does the math itself — it orchestrates.
This pattern is the backbone of modern agents.
You rarely hand-parse "Action:" strings today. Provider APIs expose tool/function calling: you declare tools with JSON schemas; the model returns a structured request to call one; you execute it and return the result; it continues. Same ReAct loop, robust transport. (Hands-on in Module 4.)
| Principle | Why |
|---|---|
| Few, well-named tools | The model picks correctly more often |
| Clear descriptions + when to use | The description is the prompt for tool selection |
| Validate tool inputs | The model can produce malformed args |
| Return concise observations | Huge tool outputs blow the context window |
Mental model: The LLM is the brain that plans; tools are the hands that act. ReAct is how they coordinate.