Sharing Our Passion for Technology
& Continuous Learning
<   Back to Blog

Navigating Agentic AI Reasoning: ReAct vs ReWOO

a black silicone chip with silver traces entering it from all four sides on top of a blue motherboard.

Navigating Agentic AI Reasoning: ReAct vs. ReWOO

In the evolving world of generative AI, agentic AI systems are gaining prominence for their ability to perform tasks, make decisions, and interact with their environments autonomously. Two popular approaches to implementing agentic AI reasoning are ReAct (Reasoning Acting) and ReWOO (Reasoning Without Observations). Let’s dive into these methodologies and explore their differences.

What is Agentic AI?

Before we compare ReAct and ReWOO, it’s essential to understand what agentic AI is. Agentic AI refers to AI systems designed to act as autonomous agents, capable of performing tasks and making decisions without direct human intervention. These systems typically combine language models with tools, reasoning capabilities, and data retrieval methods.

ReAct: Reasoning Acting

ReAct is an approach that creates a continuous loop of Think-Act-Observe-Adapt. Here’s how it works:

  1. Think (Reasoning): The AI analyzes the problem, understanding requirements and devising a strategy.
  2. Act (Action Planning and Execution): Based on its reasoning, the AI plans and executes specific actions.
  3. Observe (Feedback Integration): The AI observes the outcome and integrates new data into its thought process.
  4. Adapt (Iterative Refinement): The AI continuously cycles through thinking, acting, and observing, refining its approach with each iteration.

ReWOO: Reasoning Without Observations

ReWOO, on the other hand, uses a Planner-Worker-Solver approach:

  1. Planner: Creates a solution blueprint using predictable reasoning of language models.
  2. Worker: Interacts with the environment through tool-calls based on the planner’s blueprint, stores the results as evidence.
  3. Solver: Examines the plan generated by the Planner and evidence generated by the Workers to develop a solution to the original problem.

Comparing ReAct and ReWoo

To illustrate the differences between these approaches, let’s consider a real-world problem:

Starting with an LLM with these tools:

  • Retrieval Augmented Generation (RAG) tool: to enable search over documents detailing ideal growing conditions for crops and regional success rates
  • GraphQL tool: to interface with a GraphQL API that exposes market forecasts and pricing predictions
  • API tool: to interface with a REST API that exposes getting long term weather forecasts.

Given the question: What crops have the highest success rates for a given region?

ReAct Approach:

  1. Think: What crops have the highest success rates in this region?
  2. Act: Make a RAG call to retrieve data on plant success rates for various crops.
  3. Observe: This gives an idea of which crops are more likely to thrive but doesn’t account for current weather conditions or market trends.
  4. Adapt: Proceed to the next step.
  5. Think: What are the ideal conditions for these crops?
  6. Act: Retrieve information on ideal growing conditions for each identified crop using a RAG tool.
  7. Observe: This provides ideal conditions but doesn’t consider current weather forecasts or market potential.
  8. Adapt: Move to the next step.
  9. Think: What is the current weather forecast for the planting location?
  10. Act: Obtain weather forecast data for the region using an API.
  11. Observe: This provides weather conditions but still needs to be integrated with crop data.
  12. Adapt: Move to the next step.
  13. Think: What are the future market trends for these crops?
  14. Act: Fetch sales data from the graph to understand future market trends and pricing for the crops.
  15. Observe: This provides market potential but needs to be integrated with success rates, ideal conditions, and weather forecasts.
  16. Adapt: Combine all data.
  17. Think: How do the plant success rates, ideal conditions, weather forecasts, and market trends interact to determine the best crop to plant?
  18. Act: Integrate all information to assess the overall potential for each crop.
  19. Observe: This final step provides a tailored recommendation on which crop has the best chance of success and profitability.

ReWOO Approach:

  1. Planner:

    • Plan: Gather data on plant success rates for various crops in the region.
    • Plan: Obtain information on ideal growing conditions for these crops.
    • Plan: Retrieve current weather forecasts for the planting location.
    • Plan: Access sales API data to understand future market trends and pricing for the crops.
  2. Worker:

    • Retrieve plant success rates for different crops using a RAG tool.
    • Retrieve ideal growing conditions for each crop using a RAG tool.
    • Retrieve current weather forecast data using an API.
    • Retrieve future market trends and pricing predictions from graphQL sales data.
  3. Solver: Answer the original question by analyzing the data retrieved by the worker to determine the crop with the best chance of success and profitability based on plant success rates, ideal conditions, weather forecasts, and market trends.

Conclusion

Both ReAct and ReWOO are viable solutions for implementing agentic AI reasoning. However, ReWOO has some advantages:

  1. Lower token usage, which can lead to cost savings and improved efficiency
  2. Clearer expectations of tool usage
  3. More structured approach to problem-solving

For these reasons, implementing ReWOO first will be the better choice for many projects, but it’s important to note that the field of Agentic AI is constantly evolving, and new implementations or ideas may emerge.

At Source Allies, we’re committed to guiding you through these advancements, ensuring that your AI solutions are not only cutting-edge but also aligned with your specific business goals. As we continue to refine our approaches, ReWOO and other emerging methodologies will play a pivotal role in optimizing the autonomy and efficiency of AI systems.