Workplace assistants · Research feature

ShopEase AI Framework Evaluates Policy Retrieval in Enterprise Customer Support

A study assesses a multi-agent AI system's ability to retrieve and classify customer support queries across six policy categories using different retrieval methods.

Adapted from research by Aakash Kumar Tiwari, Somesh Kumar.

arXiv preprint revision · 2026-09-12 · Attribution & reuse
In this article
Editorial illustration of linked workflow.

Editor’s introduction

It compares six retrieval configurations: BM25-only, FAISS-only, Fair RRF, Weighted RRF, RRF with Cross-Encoder, and Top-10 Hybrid with Cross-Encoder. FAISS-only achieved the highest accuracy at 85.37%, followed by Weighted RRF at 85.07%, while BM25-only scored 55.74%. The results indicate dense retrieval outperforms sparse retrieval on this dataset, with no significant difference between FAISS-only and Weighted RRF. Performance is strongest in Shipping, Cancellation, and Return categories, with Unknown queries remaining a major source of errors.

Introduction

Enterprise customer support systems need to answer customer questions correctly and use relevant customer information during the interaction. Traditional chatbot systems can handle common questions, but they may have difficulty when a query requires policy information, customer history, previous conversation context, or human support. A recent review of customer-support chatbots also shows that chatbot systems are widely studied for improving customer service and satisfaction. However, a complete enterprise support system needs more than response generation. Retrieval-Augmented Generation (RAG) is widely used to provide external information to language models during response generation. Dense retrieval methods such as DPR use vector representations to find semantically related documents, while BM25 uses lexical matching between the query and documents. These methods have different strengths. Dense retrieval can handle different wording, while lexical retrieval can work well when important terms directly match the policy text. RAG research has also explored methods such as Self-RAG and Corrective RAG to improve the quality of retrieved information. However, these approaches mainly focus on the retrieval and generation process rather than the complete enterprise customer-support workflow. Multi-agent systems provide another way to divide a complex task into smaller components. Recent work has studied the use of multiple agents for query resolution and other AI tasks. Frameworks such as AutoGen have also shown how multiple language-model agents can work together to solve tasks. However, a customer-support system may also need access to customer records, previous conversations, policy documents, and human intervention. These requirements are not always handled together in a single workflow. Human involvement is also important for customer-support systems when a query cannot be safely or correctly handled automatically. Human-in-the-loop AI allows human decisions to be included in an AI system. Similarly, agent-based systems have been studied for handling complex tasks through cooperation between multiple agents. These studies motivate the use of multiple specialized components instead of relying on a single language model.

Research Gap

Existing studies generally focus on one or two parts of the customer-support problem, such as chatbot response generation, RAG, multi-agent systems, or human-in-the-loop processing. There is a need for a system that combines these components with customer information and conversation memory while also evaluating different retrieval strategies under the same experimental setting. Another important issue is policy classification. A customer query may use words that are different from the wording in the corresponding policy document.At the same time, some policies may contain similar terms. Therefore, relying only on lexical matching or a fixed mapping between intent and policy may produce incorrect results. A comparison of lexical, dense, hybrid, and reranking-based retrieval methods can provide a clearer view of their performance for enterprise policy retrieval.

Motivation

The main motivation of this work is to build a customer-support system that can use different sources of information before generating a response. Customer information can be obtained from a CRM database, previous messages can provide conversation context, and policy documents can provide the required enterprise information.These inputs can then be used by a Generative AI model to produce the final response. Based on this motivation, we developed ShopEase, a multi-agent customer-support framework that combines customer context, conversation memory, policy retrieval, response generation, and human escalation. The system uses FAISS and BM25 for retrieval and evaluates different combinations of these methods.The study also examines whether additional RRF and Cross-Encoder stages improve the final policy classification accuracy.

Enterprise Customer Support Systems

Customer-support chatbots have been widely studied for improving service quality and reducing the workload of support staff.Rahman et al. provide a systematic review of chatbot applications in customer service and discuss their use for customer interaction and satisfaction. These systems can handle common customer questions, but enterprise support often requires access to customer records, order information, company policies, and previous conversations. Large language models have improved the ability of chatbots to understand and generate natural language. GPT-3 showed the ability of large language models to perform different language tasks using in-context learning. LLaMA 3 further provides open models that can be used for local language-model applications. However, a language model alone may not have access to current enterprise information. This creates a need for external knowledge retrieval.

Retrieval-Augmented Generation

Retrieval-Augmented Generation combines information retrieval with language generation. Lewis et al. introduced RAG as a method that retrieves external documents and uses them during generation. This approach helps language models use information that is not contained in their model parameters. Dense retrieval represents queries and documents as vectors and retrieves documents based on semantic similarity. Dense Passage Retrieval (DPR) is an important example of this approach. FAISS provides an efficient method for similarity search over dense vectors. Lexical retrieval uses the words in the query and documents directly.BM25 is a widely used lexical retrieval method based on term frequency and inverse document frequency. Information retrieval methods such as these remain useful when important terms in the query directly match the document text. Recent RAG methods have added additional steps to improve retrieval quality. Self-RAG uses retrieval and self-reflection during generation, while Corrective RAG adds a correction step when the retrieved information is not sufficient. Gao et al. provide a broader survey of RAG methods and their main design choices. These works show the importance of retrieval quality, but they do not directly address the complete customer-support workflow used in ShopEase.

Multi-Agent Systems

Multi-agent systems divide a complex task among multiple agents or components. Earlier work on multi-agent systems studied how different agents can cooperate to solve problems. Recent research has extended this idea to large language models. Wang et al. studied multi-agent methods for query resolution, while He et al. reviewed the use of LLMs in multi-agent systems. Frameworks such as AutoGen provide mechanisms for coordinating multiple language-model agents. ReAct combines reasoning and action to allow language models to interact with external tools. Toolformer also explored the use of external tools by language models. These approaches show that separating tasks and using external tools can improve the ability of language-model systems to handle complex tasks. For enterprise customer support, different tasks can be separated into specialized components. For example, one component can identify the customer request, another can retrieve customer information, and another can retrieve the required policy information. ShopEase follows this idea by using specialized agents for intent, CRM, memory, retrieval, escalation, and workflow control.

Human-in-the-Loop Systems

Fully automatic customer support is not suitable for every situation. Some queries may require human review because of their complexity, uncertainty, or customer-specific requirements. Human-in-the-loop AI includes human decisions as part of the AI workflow. This idea is also relevant to agentic AI systems,where agents may perform several actions before a final decision is made. In ShopEase, the Escalation Agent provides a human-in-the-loop path when automatic resolution is not suitable. This allows the system to support both automatic handling and human intervention.

Customer Information and Conversation Memory

Customer support often requires information beyond the current query. Customer profile, order history, customer tier, and previous complaints can affect how a query should be handled. Similarly, previous messages can provide useful context for the current interaction. Memory is therefore important for maintaining information across a conversation. In a multi-agent system, customer information and conversation history can be provided to the relevant agents before the final response is generated. ShopEase includes separate CRM and Memory components for these two sources of context.

Comparison of Existing Approaches

Here, “–” indicates that the corresponding capability was not reported or addressed in the cited work. The comparison is based on the capabilities discussed in the cited studies. The comparison shows that the existing studies mainly address individual parts of the problem. Customer-support studies focus on support interaction, RAG studies focus on external knowledge retrieval, multi-agent studies focus on task coordination, and human-in-the-loop work focuses on human involvement. ShopEase combines these components with customer information and conversation memory in one customer-support workflow. In addition to combining these components, ShopEase evaluates six retrieval configurations on the same held-out dataset. This provides a direct comparison of BM25, FAISS, RRF, and Cross-Encoder-based retrieval within the same enterprise customer-support setting.

Proposed Methodology

ShopEase is designed as a multi-agent customer-support system that combines customer information, conversation history, policy retrieval, and human escalation. The workflow takes a customer query as input and processes it through different components before generating the final response. Each component has a specific role, while the Supervisor coordinates the complete workflow.

System Workflow

The workflow starts when a customer submits a query. A Guardrail component first checks and preprocesses the input. The Intent Agent then identifies the main intent of the query. Customer information and previous conversation details are obtained from the CRM and Memory components. These details are provided as context for policy retrieval. The Hybrid RAG component retrieves relevant policy documents using dense and sparse retrieval. FAISS is used for semantic retrieval, while BM25 is used for keyword-based retrieval. The retrieved documents are combined using Reciprocal Rank Fusion (RRF). Different retrieval configurations are evaluated in the experiments. After retrieval, the system determines the relevant policy category from the retrieved documents and prepares the information required for response generation. If the query requires human support, the Escalation Agent handles the human-in-the-loop step. Otherwise, the Supervisor coordinates the response generation and returns the final answer to the customer. A Reflection component is also used to review the generated response before the workflow is completed.

Customer Context

ShopEase uses both customer information and conversation history to provide context for query handling. The CRM Agent accesses the SQLite-based CRM database and retrieves available customer information. The Memory Agent provides relevant information from previous interactions. These two sources help the system use information about the current customer instead of treating every query as an isolated request. The retrieved context is passed to the later stages of the workflow along with the customer query.

Response and Human Escalation

After policy retrieval, the system uses the retrieved information and available customer context to prepare the response. LLaMA 3.2 is used locally through Ollama for language generation. When a query cannot be handled reliably by the automated workflow or requires human support, the Escalation Agent transfers the case to the human-review stage. This allows the system to combine automated response generation with human intervention.

Hybrid RAG Component

The Hybrid RAG component retrieves relevant policy information using both dense and sparse retrieval. FAISS is used for dense retrieval with nomic-embed-text embeddings, while BM25 is used for keyword-based retrieval. The retrieved documents can be combined using Reciprocal Rank Fusion (RRF).The system also supports weighted RRF and cross-encoder reranking. The cross-encoder used in the experiments is cross-encoder/ms-marco-MiniLM-L-6-v2. The policy category is determined from the retrieved policy documents. Thus, the retrieval stage provides the policy evidence used for the final response rather than relying on a fixed intent-to-policy mapping.

Escalation and Supervisor

The Escalation Agent handles cases that require human support. When escalation is required, the case can be passed to the human-review stage. The Supervisor Agent coordinates the complete workflow. It manages the shared state and controls the flow of information between the different components. This allows the query, intent, customer context, memory, retrieved policies, and escalation information to be used during response generation.

Response Generation and Reflection

LLaMA 3.2 is used locally through Ollama for response generation. The response is generated using the retrieved policy information and available customer context. The Reflection component provides a final review step for the generated response before the workflow is completed. The final output is then returned through the Streamlit interface.

Implementation Environment

ShopEase was implemented in Python 3.11 on a Windows-based workstation.The application interface was developed using Streamlit. The CRM information is stored in a SQLite database. LLaMA 3.2 is used for response generation through Ollama. Dense retrieval uses the nomic-embed-text embedding model with FAISS, while BM25 is used for sparse retrieval.The cross-encoder experiments use cross-encoder/ms-marco-MiniLM-L-6-v2.

Overall Retrieval Performance

FAISS-only achieves the highest accuracy of 85.37%, with 2247 correct predictions out of 2,632 queries. Weighted RRF gives a very close accuracy of 85.07%, with 2239 correct predictions. The difference between the two configurations is only 0.30 percentage points. BM25-only achieves 55.74% accuracy, which is 29.63 percentage points lower than FAISS-only. This indicates that semantic retrieval is more effective than lexical matching for the queries in the evaluated dataset. Fair RRF achieves 82.29%, which is lower than both FAISS-only and Weighted RRF. The two cross-encoder configurations also perform below FAISS-only. RRF + Cross-Encoder achieves 83.24%, while Top-10 Hybrid + Cross-Encoder achieves 81.88%. Therefore, adding reranking does not improve policy classification accuracy in the current experiment.

Retrieval Latency

The latency results show a clear cost for the additional reranking stage. BM25-only has the lowest mean latency at 0.000494 seconds, while FAISS-only has a mean latency of 0.046205 seconds. Weighted RRF has a similar mean latency of 0.041632 seconds. Adding the cross-encoder increases the mean latency to 0.142449 seconds for RRF + Cross-Encoder and 0.248934 seconds for Top-10 Hybrid + Cross-Encoder. These configurations also achieve lower accuracy than FAISS-only. Thus, in the current evaluation, the additional reranking time does not result in better policy classification performance. The latency of Fair RRF was not recorded and is therefore not included in the numerical latency comparison.

Category-wise Performance

The category-wise results show that FAISS performs strongly on most known policy categories. Shipping achieves the highest recall at 99.17%, followed by Cancellation at 96.89% and Return at 94.42%. Cancellation also gives the highest F1-score among the evaluated categories. Refund has a lower recall of 82.95%, which is mainly related to confusion with the Return category. The Unknown category remains the most difficult category, with zero recall and zero F1-score. This shows that the current retrieval system tends to assign unclear queries to one of the known policy categories.

Confusion Matrix Analysis

The confusion matrix provides a more detailed view of the FAISS results. Shipping has 477 correct predictions out of 481 queries, while Return has 474 correct predictions out of 502 queries. Cancellation also shows strong performance with 467 correct predictions out of 482 queries. The main confusion is between Refund and Return, where 79 Refund queries are classified as Return. Another important pattern is the Unknown category. None of its 205 queries are correctly classified as Unknown. Instead, 125 are classified as Shipping, 37 as Damaged Product, 20 as Return, 15 as Refund, and 8 as Cancellation. These results suggest that the system handles queries with clear policy-related information well, while queries without a clear policy match remain more difficult.

Error Analysis

The error analysis shows two main patterns. First, Refund and Return queries have overlapping terms, which causes some Refund queries to be classified as Return. Second, Unknown queries are often assigned to one of the known policy categories. These errors indicate that queries without a clear policy match remain difficult for the retrieval system.

Conclusion

This paper presented ShopEase, a Generative AI-based multi-agent framework for enterprise customer support. The system combines intent detection, CRM information, conversation memory, hybrid policy retrieval, human escalation, and response generation in a single workflow. The system was evaluated on 2632 held-out customer queries using six retrieval configurations. FAISS-only achieved the highest accuracy of 85.37%, followed closely by Weighted RRF with 85.07%. BM25-only achieved 55.74% accuracy. The results show that dense retrieval performed better than sparse retrieval for the evaluation dataset. The experiments also showed that cross-encoder reranking increased retrieval latency without improving accuracy. The error analysis identified Unknown queries and confusion between Refund and Return as the main sources of errors. These results show that retrieval quality has a direct effect on the policy classification performance of the system. Overall, ShopEase provides a single workflow that combines policy retrieval with customer context, conversation memory, and human escalation. The experimental results show that the system can support enterprise policy-based customer queries while keeping the different support functions within one coordinated framework.

Future Work

Several improvements can be explored in future work. First, the handling of Unknown queries can be improved by adding better out-of-scope detection and stronger rejection criteria for queries that do not match the available policies. Second, the policy knowledge base can be expanded with more enterprise policies and a larger range of customer queries. This can help evaluate the system on more diverse support scenarios. Third, retrieval can be further improved by studying better query processing, document chunking, and reranking methods. The effect of these changes can be evaluated using the same held-out evaluation framework. Finally, the human-in-the-loop component can be extended to support more detailed escalation workflows and feedback collection. Such feedback can be used to improve both retrieval and response generation over time.

Limitations

The current evaluation is based on a fixed dataset of 2,632 customer queries and a limited set of enterprise policy categories. Therefore, the results may not represent all types of real-world customer-support queries. The system also depends on the quality and coverage of the policy knowledge base. Queries with unclear or out-of-scope information, especially those in the Unknown category, remain challenging. In addition, cross-encoder reranking increases latency without improving accuracy in the current experiments.The current system is evaluated in a controlled experimental setting and does not include long-term deployment data from real customers. The response quality also depends on the retrieved policy information and the local language model. Further evaluation with larger and more diverse datasets would be required to assess the system under broader real-world conditions.