Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
dominic_r
Product and Topic Expert
Product and Topic Expert

Building on the foundations laid in our first blog post, in which we explored the transformative capabilities of Retrieval Augmented Generation (RAG), we now venture into another area of Artificial Intelligence (AI) sophistication: Reasoning and Acting (ReAct).

 

Part 1 - Predict, Personalize, Prosper: Crafting Tomorrow's Retail Experience with RAG
Part 2 - Predict, Personalize, Prosper: ReAct's Decision-Making in Retail
Part 3 - Predict, Personalize, Prosper: BTP AI Capabilities Redefining Retail Intelligence

 

Reasoning and Acting (ReAct)

In the fields of AI, Reasoning and Acting (ReAct) introduces a dynamic approach where intelligent agents perform specific tasks ranging from web searches and API calls to complex calculations. By integrating Large Language Models (LLMs), these agents are able to execute tasks autonomously, making them invaluable resources for a variety of retail applications.

An agent consists of two different units - a planner and an executor. The planner formulates potential solutions and strategies, while the executor actively implements these plans. In addition, the agent is equipped with a toolbox of capabilities, such as the ability to make API calls, and is only dependent on an API specification to create an order or update an action. This separation of planner and executor, as well as the versatile tools available to the agent, allows it to perform a range of retail tasks precisely and autonomously.

Illustration of an AI Agent

How ReAct works:

  • Agents with task-specific abilities:

ReAct work with specialized agents, each of which is equipped with unique capabilities to perform specific tasks that are important to retail operations. These tasks could include searching the web, calling APIs for real-time data, or performing complicated calculations.

  • Thought, Action, Observation Cycle:

After receiving a user request or question, the agent goes through a structured process of Thought, Action, and Observation to execute the task at hand:

  1. Thought: The agent formulates a potential solution or approach to address the user's inquiry.
  2. Action: The agent actively applies the proposed solution, such as initiating a search, making calculations, or interacting with external systems.
  3. Observation: Based on its action, the Agent receives a response that enables it to assess the success or relevance of its attempted solution.
  • Iterative Problem Solving:

In cases where the initial observation matches with the user's question, the agent completes the task. However, if further refinement is needed, the agent initiates another cycle of Thought, Action, and Observation. This iterative process continues until the Agent has found an answer that exactly matches the user's query, using the tools available to it for information gathering and task execution.

Execution chain of an ReAct application

Potential Use Cases:

  • Dynamic Promotion Creation:

Imagine a scenario where a store manager wants to explore potential promotions for expiring products. With the help of ReAct, the LLM suggests various promotional options. The store manager instructs the agent to create the promotion autonomously. Through iterative cycles of Thought, Action, and Observation, the agent refines the promotion strategy until it aligns with the store manager's goals. This demonstrates how ReAct can efficiently handle complex, multi-step tasks, allowing retail professionals to delegate and automate complicated processes with confidence.

Conclusion

ReAct, with its agents and iterative problem-solving approach, is at the cutting edge of AI applications in retail, providing a powerful tool for task execution and decision support. Its ability to adapt and refine solutions autonomously demonstrates its potential to revolutionize the management and optimization of retail operations.

In our next and final blog post, we want to explore the technical possibilities that the SAP Business Technology Platform offers for implementing RAG and ReAct to take advantage of AI for retail.