Answerability: A custom metric for evaluating chatbot performance (2022)

Abstract: Most commercial conversational AI products in domains spanning e-commerce, health care, finance, and education involve a hierarchy of NLP models that perform a variety of tasks such as classification, entity recognition, question-answering, sentiment detection, semantic text similarity, and so on. Despite our understanding of each of the constituent models, we do not have a clear view as to how these models affect the overall platform metrics. To bridge this gap, we define a metric known as answerability, which penalizes not only irrelevant or incorrect chatbot responses but also unhelpful responses that do not serve the chatbot’s purpose despite being correct or relevant. Additionally, we describe a formula-based mathematical framework to relate individual model metrics to the answerability metric. We also describe a modeling approach for predicting a chatbot’s answerability to a user question and its corresponding chatbot response.

## introduction conversational ai has been making great strides in the past few years. several commercial chatbots powered by nlp have been deployed for diverse sectors, ranging from banking to health care @xcite . while end-to-end chatbots based on a single neural network architecture have been proposed @xcite , most commercial organizations still deploy a hierarchy of machine learning models working together in unison to come up with an answer to a user's question, rather than relying on the output of a single end-to-end neural network, for instance, the popular rasa nlu framework used by several industrial organizations @xcite . in such a case, it is important to have a single unified metric that defines the effectiveness of a conversational ai product, such as a chatbot. moreover, one needs to have a framework that links individual model metrics to the overall chatbot effectiveness metric. this way, we can understand the "weak links" in the entire chatbot workflow, i.e., models whose relative improvement can have the maximum effect on the global chatbot effectiveness metric. this is crucial for a commercial organization, where business impact needs to be routinely demonstrated, requiring teams to prioritize which models they are going to focus on improving. moreover, by incorporating other businessmotivated factors such as helpfulness into the overall chatbot effectiveness metric, we are ensuring that we are optimizing not just for peak performance from each of the constituent machine learning models inside a chatbot, but also for the ability of the chatbot to serve the organization's business goals. for example, if an e-commerce website does not sell women's reebok shoes of size 10, its chatbot might answer "correctly" to a user who asked if those shoes are available, by responding "no we do not have women's reebok shoes of size 10." however, this answer is not "helpful," that is, a user shown this answer will not be tempted to search for other products on the website. a helpful answer could not only acknowledge the lack of reebok shoes of the required size, but could also suggest other similar shoes of size 10 from a similar brand, say skechers or nike, so that an originally unhelpful answer could potentially become helpful. in this case, the answer is not only correct but also helpful, just like how a salesperson in a brick-and-mortar store would be when they are asked about the availability of a certain product. similar examples apply to other use-cases of conversational ai such as banking, governance, and health care. by emphasizing such business-relevant expectations from a task-oriented chatbot, we are encouraging it to provide a more relatable experience to the user, just like a human agent or salesperson. this paper seeks to make 2 contributions: the first is to define a stringent global effectiveness metric for a task-oriented chatbot called "answerability," which penalizes not only incorrect or irrelevant responses but also unhelpful responses. our metric is quite general in its definition and can be utilized in any chatbot application. our second contribution is to describe a framework to relate the answerability metric to individual model metrics, along with a modeling approach for predicting the answerability for an individual user query-chatbot response pair. we shall focus on the concrete example of a pre-purchase e-commerce chatbot that answers user questions about products sold on an ecommerce marketplace to illustrate our ideas where necessary. this example is ideal and instructive for the concepts explained in this paper, given the variety of nlp models it encompasses, such as multi-class text classification, span detection-based question answering, and semantic text similaritybased retrieval of user-generated content such as user-generated frequently asked questions (faqs) and user reviews for the product. ## related work we review the existing literature for chatbot evaluation metrics below. ## data for the modeling described in this paper, we sampled actual user-chatbot conversations from the production logs of the pre-purchase chatbot and asked an in-house team of labelers, based in india and familiar with the english-hindi code-mixed vocabulary used by the users of the pre-purchase chatbot, to label each chatbot response with one of the 7 labels described in examples from labelled dataset are listed below: label: poor relevance, unhelpful answer in the first example, the chatbot returned a relevant user faq, whereas in the next example, the chatbot responded with information that was not relevant to the question asked by the user. ## per-query predictive model for the chatbot answerability a apart from helping us understand the relative importance of each constituent model used in a chatbot, the answerability labels described in ## conclusion in this paper, we introduce answerability as a global chatbot effectiveness metric and show how it can be used to guide model development decisions for a conversational ai product such as the pre-purchase chatbot, by relating answerability to all the metrics of all the models that are a part of the chatbot. our framework is general and can be easily extended to chatbot metrics other than answerability depending on the domain of application, be it in finance, governance, or health care, as long as there is a concept of helpfulness associated with the chatbot's responses. for example, a health care chatbot helping patients understand their medical symptoms and pointing them to an appropriate health care provider needs to not only provide accurate information but also guide patients in the correct direction when such information is not available. the answerability metric will directly apply to such a case, and help guide the development of individual models within the chatbot's architecture in a way that maximizes patient satisfaction. future work could involve the joint training of all the models within a chatbot with a differentiable version of the answerability objective. further iterations of the formula-based modeling approach described in section 5 could involve the inclusion of other upstream models such as spell checking, automated speech recognition, and machine translation, which are used to interpret voice/multilingual user input before the input is sent to the intent classification model in the chatbot. we hope that the answerability metric and the modeling methods described in this paper will help guide product development and model prioritization in conversational ai products in the academic, government and industrial domains.