Loading

Quipoin Menu

Learn • Practice • Grow

prompt-engineering / ReAct Prompting
tutorial

ReAct Prompting

Sometimes an AI needs more than just reasoning – it needs to act. ReAct (Reason + Act) prompting combines step‑by‑step reasoning with the ability to call tools or take actions (like searching the web, calculating, or querying a database). The model thinks, then acts, then thinks again based on the result.

ReAct = Thought → Action → Observation → Thought → Action → ...

How ReAct Works

The model alternates between three types of outputs:
  • Thought: What should I do next? (Reasoning)
  • Action: What tool to use and with what input?
  • Observation: The result of the action (provided by the system).
This loop continues until the model has enough information to give a final answer.

Example: Weather Query

Thought: I need to know the current weather in London.
Action: search[weather in London today]
Observation: 18°C, cloudy.
Thought: The user asked for temperature, so I can answer now.
Final Answer: The current temperature in London is 18°C and cloudy.

Why ReAct Is Powerful

  • Overcomes knowledge cutoff by fetching live data.
  • Can perform calculations or use APIs.
  • Reduces hallucinations because actions ground the model in real information.

Implementation Notes

ReAct is typically implemented in frameworks like LangChain, not by hand‑typing a single prompt. However, you can simulate simple ReAct with carefully crafted prompts that instruct the model to output structured actions.


Two Minute Drill
  • ReAct = Reason + Act (thought, action, observation loop).
  • Enables tool use (web search, calculator, database).
  • Reduces hallucinations by fetching real information.
  • Commonly used with LangChain or similar frameworks.

Need more clarification?

Drop us an email at career@quipoinfotech.com