0Pricing
AI Engineering Academy · Lesson

The ReAct Framework: Think, Act, Observe

Understand the ReAct loop where the model generates a Thought, chooses an Action, receives an Observation, and repeats until it reaches a Final Answer.

What Is the ReAct Framework?

ReAct (Reasoning + Acting) is a prompting framework that interleaves the model's internal reasoning with external actions. Instead of producing a final answer immediately, the model generates a Thought, chooses an Action, receives an Observation from executing that action, and repeats the cycle until it can give a Final Answer.

The Think-Act-Observe Loop

Each iteration of the ReAct loop has three phases:

  • Thought: The model reasons about what it knows and what it needs to find out next.
  • Action: The model calls a tool — such as a web search, a calculator, or a database lookup.
  • Observation: The result of the tool call is returned and appended to the model's context.

The loop continues until the model emits Final Answer: with its conclusion.

All lessons in this course

  1. The ReAct Framework: Think, Act, Observe
  2. Defining Tools for Your Agent
  3. Building a ReAct Agent with LangChain
  4. Handling Agent Failures and Loops
← Back to AI Engineering Academy