Self Consistency & ReAct Prompting

📌 What is ReAct Prompting?

ReAct (Reason + Act) is a prompting framework where the AI doesn't just think; it can take actions in the real world (like searching the web, running code, or querying a database).

In standard Chain-of-Thought (CoT), the AI reasons internally but is limited to its training data. With ReAct, the AI enters a loop of Reasoning, taking an Action, and reading the Observation from that action.

Comic illustration comparing CoT (internal reasoning only) vs ReAct (reasoning + taking action + observing)
Comic illustration comparing CoT (internal reasoning only) vs ReAct (reasoning + taking action + observing)

📌 The Reason-Act-Observe Loop

The core of ReAct is an infinite loop that stops once the AI decides it has the final answer.

  • Reason: The AI decides what it needs to do ("I need to find the current weather in Paris").
  • Act: The AI outputs a command to use a tool ("Search: weather in Paris today").
  • Observe: The system runs the tool and feeds the result back to the AI ("Observation: 22 degrees and sunny").
Comic illustration showing the ReAct cycle: Reason, Act, Observe
Comic illustration showing the ReAct cycle: Reason, Act, Observe

📌 Why ReAct is the foundation of AI Agents

When you hear people talk about "AI Agents," they are almost always talking about a ReAct loop. An agent is simply an LLM equipped with tools (calculators, web browsers, API access) and a ReAct prompt that tells it how to use them to achieve a goal autonomously.