Skip to content
Quantoros

What is ReAct (Reasoning + Acting) prompting?

LLM & AILevel: IntermediateAdvanced Prompting

What is ReAct (Reasoning + Acting) prompting?

Hints
  • Identify the stage: pretraining, adaptation, generation or evaluation.
  • Name the inputs, constraints and a case where the approach fails.

Answer

ReAct interleaves reasoning traces and action calls:

Thought: I need to find the current AAPL stock price.
Action: search("AAPL stock price today")
Observation: AAPL is trading at $212.50 as of 2:15pm EST.
Thought: Now I have the data I need to answer.
Answer: AAPL is currently trading at $212.50.

Forcing the model to externalize its reasoning before each action:

  • Improves tool selection accuracy
  • Makes debugging straightforward (full trace is visible)
  • Reduces circular loops (model can recognize it's not making progress)

ReAct is the foundation pattern for most production AI agents.

Source and licence: JustInCache & contributors — Awesome AI Interviews · Apache-2.0

Related questions