0Pricing
Prompt Engineering & LLM Optimization for Developers · Lesson

ReAct: Reasoning and Acting with Tools

Learn the ReAct pattern, where the model interleaves reasoning steps with tool actions to solve tasks it cannot answer from memory alone.

When Thinking Is Not Enough

Chain-of-thought helps a model reason, but reasoning alone cannot fetch live data or run code. The ReAct pattern combines Reasoning with Acting so the model can use tools mid-task.

The ReAct Loop

ReAct alternates three roles in a loop:

  • Thought: reason about what to do next.
  • Action: call a tool with an input.
  • Observation: read the tool's result.

Repeat until the answer is ready.

All lessons in this course

  1. Chain-of-Thought Prompting
  2. Self-Consistency & Generated Knowledge
  3. Tree-of-Thought & Graph Prompts
  4. ReAct: Reasoning and Acting with Tools
← Back to Prompt Engineering & LLM Optimization for Developers