[Intelligent agents] Why are they the next big thing? AI and technologies that help computers understand human language (NLP) will likely speed up this change even more. However, customers usually prefer talking to real people instead of chatbots, who often seem cold and not very human-like. Even though there's a push to make chatbots seem more human, we don't know much about how giving them human-like ways of speaking affects how personalized products feel or if people are willing to pay more for products in situations where they talk to chatbots [1].
In our project, we created a chatbot using a Large Language Model and a Learning Agent. We discovered that this chatbot can interact with customers on a retail shopping website to recommend products they might like, browse items they like, and add them to a shopping cart interactively without the human user going to the shopping site. This novelty project lays the groundwork for future Agentic AI-powered bots designed to offer customized and data-informed product suggestions and seamless shopping.
The future plan is to enhance the project by incorporating a knowledge graph and using databases for product data storage. Additionally, we aim to give the chatbot a human-like voice for voice-based customer interactions.
Agentic AI, bots, Conversational e-commerce chatbot, Learning Agent, Reinforcement Learning, LLM, vector embedding.
In the modern digital marketplace, customer engagement is paramount. Despite the dominance of major retailers like Amazon, Alibaba, and Best Buy, there is no chatbot that effectively delivers customized, data-driven product recommendations and seamless shopping experiences beyond the standard product recommendations on shopping platforms. As a result, most chat features function as traditional chatbots, often lacking personalization and intelligence, leading to a significant gap in consumer satisfaction.
Our work proposes an innovative solution: a chatbot integrated with advanced natural language processing (NLP), large language models (LLM), and intelligent agent capabilities (learning elements). This hybrid system is designed to provide a personalized shopping experience, mimicking human-like interactions while ensuring efficient and accurate customer support and shopping assistance.
Consumers consistently prefer human interaction, often perceiving traditional chatbots as impersonal and detached, negatively impacting the overall customer experience. To address this limitation, we introduce a chatbot enhanced with natural language processing and intelligent agent technology, engineered to emulate human-like communication.
This advanced chatbot functions as a personal shopping assistant, offering:
By bridging the gap between automation and personalized customer service, this chatbot significantly improves digital shopping experiences, making interactions more intelligent, interactive, and human-centric.
Figure 1: System architecture of the bot
This entity is at the forefront of adaptability within the architecture. It evolves by learning from interactions and feedback. It consists of the following components:
Critic: The critic's role is akin to a rigorous peer-review process. It evaluates the actions taken by the performance element against a set of criteria or performance standards, providing essential feedback for improvement.
Learning Element: Utilizing the feedback from the critic, the learning element updates the agent's knowledge base.
Problem Generator: This proactive component suggests challenges to solve, encouraging the exploration of new strategies or knowledge. It's like a researcher who devises new experiments to probe the unknowns of the universe.
Performance Element: The 'executor' of the agent, it uses the knowledge to decide on actions, commanding the actuators to interact with the environment. You can compare this to the autopilot of an aircraft, making real-time decisions based on sensor data.
Large Language Model (LLM): Here, the LLM is part of the Learning Agent, where it serves as an advanced component capable of understanding and generating human-like text. It uses vast amounts of data and complex algorithms to interpret input, generate responses, solve problems, and even simulate conversation. In this architecture, the LLM could be delegated certain tasks by the learning element, such as processing natural language data or generating hypotheses.
Sensors and Actuators: These are the physical or virtual apparatus that the agent uses to perceive its environment (sensors) and to take action within it (actuators). In the realm of AI, sensors could be data inputs, and actuators could be any kind of output the system is capable of, including generating text or making changes to a database.
Environment: This is the domain in which the agent operates. For a Large Language Model, the environment could be the datasets it was trained on, the input it receives during interactions, or the broader context it's applied to, such as a dialogue system or a content creation platform.
The information and control flows indicated by the arrows show that the sensors inform the performance element about the state of the environment. The learning element adjusts the knowledge base, potentially influencing future actions of the performance element. The critic assesses the suitability of these actions in achieving the agent's goals, and the problem generator introduces new challenges to foster learning.
In essence, this architecture with an LLM at its core describes a sophisticated, learning-oriented AI system capable of interacting with and adapting to its environment through a continuous feedback loop.
Figure 2 & Figure 3: Deductive Reasoning (JSON response) and LLM Model (Inductive Reasoning)
The intelligent agent utilizes predefined rules to parse user input and determine the appropriate actions for its actuators. As illustrated in Figure 2, these actions include searching for a product, adding items to a shopping cart, or removing them. The rules are designed to interpret user intent, ensuring appropriate responses and actions. This mechanism is a fundamental component of how the chatbot simulates understanding and delivers interactive responses.
Furthermore, Figure 3 presents a Python script designed to implement an LLM (Large Language Model) using Google’s PaLM for answering questions. The script employs prompt engineering to guide the LLM in generating responses that are contextually relevant while remaining constrained to the information it has been trained on or has access to.
To process the retail information from a KB (Knowledge-Based document), we extract the text and divide it into smaller sections. This step is essential due to the token limit imposed by a Large Language Model (LLM), restricting the amount of text it can handle at once. By segmenting the text, we ensure that the LLM processes all information without exceeding its limits.
Next, we convert these text sections into a format that the LLM can understand more effectively, known as embeddings. These embeddings are stored in Faiss (Figure 3), a vector database designed for efficient similarity searches.
When a user submits a query, we transform their question into embeddings using the LLM. We then search for text sections that are most semantically similar to the query by comparing their embeddings. The most relevant sections are retrieved and presented to the LLM along with the question, enabling it to generate an accurate response.
This approach ensures that related information is not overlooked, as topics may be distributed across multiple sections. By retrieving and analyzing all relevant sections, we enhance the LLM’s ability to provide comprehensive and contextually accurate answers [2].
Figure 4: Architecture diagram showing the flow of the solution [1].
Finally, the fully developed question-answering system is deployed, ready to cater to a wide array of user queries and needs.
Study 1: In this study, we ask the chatbot to show us what is available in the store. For example, the chatbot provides recommendations about apples and displays apple items within the chat.
Figure 5 & Figure 6: GUI of chatbot with 4 use cases and chatbot answering the customer query.
Figure 5 presents the interface of the e-commerce chatbot, while Figure 6 showcases a conversation where a customer inquires about apples.
The chatbot successfully understood and interpreted the query and provided two different product options indeed, the first product is labeled "Apple", specifically "Fresh Envy Apples, New Zealand." It is priced at 1.18 USD, categorized under "Fruit," with the brand "New Zealand Fruit," and there is a stock quantity of 100 available for purchase. The second product is "Apple USA," also "Fresh Envy Apples," but sourced from the USA. This option is priced higher at 2.33 USD:
Fresh Envy Apples (New Zealand)
Fresh Envy Apples (USA)
Each product listing includes an image, helping customers visually identify the item. The chatbot’s response, "Hey, please check out these things," reflects a casual, friendly, and engaging tone, encouraging the customer to explore the options.
Overall, this interaction demonstrates how the chatbot efficiently processed the customer's request and retrieved relevant product details from the e-commerce platform’s database, illustrating a ** simple yet practical application of AI** in retail to assist customers effectively.
Study 2: This study evaluates whether the chatbot can learn from user feedback as part of a deductive learning process.
Figure 7: The demo of Chatbot removing items.
Figure 7 illustrates a conversation where the chatbot confirms that items have been added to the shopping cart, displaying the quantities and prices for bananas, apples, and oranges, along with the total cost.
In a subsequent interaction, the chatbot acknowledges the removal of an item after the user commands: "remove 2 bananas from cart." The chatbot then updates the shopping cart accordingly.
To the left, under the header "Learn from feedback," the value "FEEDBACK_GENERATION_RATE=80" appears, indicating a parameter in the chatbot’s reinforcement learning algorithm. A higher feedback generation rate suggests that the chatbot receives and processes more frequent feedback, potentially influencing how often it updates its responses or actions based on user interactions. This iterative learning approach helps improve the chatbot’s overall performance over time.
Additionally, the chatbot displays a thumbs-up reaction in response to a query asking whether the provided answer was relevant, likely indicating positive feedback from the user.
Finally, the chatbot updates and displays the revised shopping cart with adjusted item quantities and a new total cost.
This simulated chat flow exemplifies how a chatbot can interact within an online shopping environment, executing commands to add or remove items from the cart while leveraging user feedback for potential learning and enhancing the overall user experience through a process of reinforcement learning.
In this study, we presented an intelligent chatbot designed for e-commerce platforms, capable of responding to human queries both automatically and with a level of intelligence that mimics human reasoning. By leveraging a combination of deductive reasoning and inductive learning, the chatbot continuously adapts through customer feedback, generating responses informed by a Large Language Model (LLM). Inspired by Reinforcement Learning principles, the chatbot accumulates rewards to refine its decision-making process.
While promising, this project has certain limitations. Time constraints during development may have affected the depth of learning and the range of available features. Looking ahead, we plan to enhance the chatbot by incorporating a knowledge graph to improve query understanding.
Additionally, with sufficient support and funding, we aim to develop voice command capabilities to provide a more accessible and seamless user experience. As we refine its functionalities, we will explore the integration of multimodal feedback processing, allowing the chatbot to interpret non-textual customer inputs, such as emotions or images, to further personalize and humanize the shopping experience.
Ultimately, our goal is to build a chatbot that not only understands but anticipates customer needs, paving the way for a new era of digital shopping and customer service.
[1] S. Heyer, "Generative AI - Document Retrieval and Question Answering with LLMs," 4 June 2023. [Online]. Available: https://medium.com/google-cloud/generative-ai-document-retrieval-andquestion-answering-with-llms-2b0fb80ae76d.
[2] Chen, Huajun, et al., "Neural symbolic reasoning with knowledge graphs: Knowledge extraction, relational reasoning, and inconsistency checking," Fundamental Research, 2021.
[3] Mohammad Monirujjaman Khan, Shahnoor Chowdhury Eshan, "Development of An e-commerce Sales Chatbot," 2021.
There are no models linked
There are no datasets linked
There are no models linked
There are no datasets linked