Nearby lessons

21 of 49

Prompt Engineering - ReAct (Reason + Act)

ReAct — Reason + Act

ReAct means Reason + Act. Thinking alone is not enough — AI should think what is needed, take an action, re-evaluate, and repeat until the goal is complete.

  • AI becomes an assistant that completes tasks, not just an advisor that gives ideas.
  • The loop repeats: think → act → re-evaluate → repeat until done.
In simple words: AI should think and act, not just answer. Ideas are good, execution is powerful.
Normal AIReAct AI
Only answersThinks + acts
Gives ideasCompletes tasks
PassiveActive
LimitedPowerful
Example01
Prompt PreviewChatGPT-style
Think: "I will cook biryani" Act: - Buy rice - Add spices - Cook Thinking + Doing = Result. AI also needs both.
Copy the prompt and paste it into ChatGPT, Gemini, or Claude to try it.

ReAct Prompt — Reason / Act Steps

Notice the pattern: every step alternates between thinking (Reason) and doing (Act). This loop is the foundation of AI agents.

Example02
Prompt PreviewChatGPT-style
You are a workshop planner. Goal: Plan a 1-day workshop. Step 1 (Reason): What info is needed? Step 2 (Act): Ask questions Step 3 (Reason): Decide the structure Step 4 (Act): Create the schedule Step 5 (Reason): Improve the plan Step 6 (Act): Final output Output: - Schedule - Materials - Promo message
Copy the prompt and paste it into ChatGPT, Gemini, or Claude to try it.

Real-World Use Cases

  • AI agents — think, act, and stop correctly.
  • Automation workflows — repeat steps with safe limits.
  • API retry systems — retry a limited number of times.
  • Pricing and analysis — calculate with tools, not guesses.
  • Report generation — produce and validate output.
📝 Key Takeaways
  • ReAct = Reason + Act, repeated until the goal is done.
  • Thinking alone is not enough — AI should think and act.
  • Every step alternates: Reason (think) then Act (do).
  • AI becomes an assistant that completes tasks, not just an advisor.
  • The Reason → Act loop is the foundation of AI agents.
  • The workshop-planner prompt: ask, decide, create, improve, then output.

🧠 Test Your Knowledge

2 Questions
Progress: 0 / 2