Distinguish Sense from Nonsense: Out-of-Scope Detection for Virtual Assistants (2022)

Abstract: Out of Scope (OOS) detection in Conversational AI solutions enables a chatbot to handle a conversation gracefully when it is unable to make sense of the end-user query. Accurately tagging a query as out-of-domain is particularly hard in scenarios when the chatbot is not equipped to handle a topic which has semantic overlap with an existing topic it is trained on. We propose a simple yet effective OOS detection method that outperforms standard OOS detection methods in a real-world deployment of virtual assistants. We discuss the various design and deployment considerations for a cloud platform solution to train virtual assistants and deploy them at scale. Additionally, we propose a collection of datasets that replicates real-world scenarios and show comprehensive results in various settings using both offline and online evaluation metrics.

## introduction in the context of task-oriented dialog, out of scope (oos) detection is the problem of identifying enduser queries that are beyond the scope of a chatbot. while this problem is generally studied under the umbrella of "out of domain" detection in machine learning, we show that unique challenges arise in real-world applications. we study this problem in the context of our enterprise virtual assistant (va) platform which is used by 10,000+ customers to design chatbots. in this setting, the natural language understanding models comprising of in scope (is) and oos detection modules, need to determine whether an input query belongs to a set of predefined intents or if it is out of scope for the chatbot. real-world success of oos systems often involves measuring how good they are at containment, i.e., the user queries are resolved and contained by the chatbot while minimizing human interventions. since containment rate can be only observed after launching the va online, offline metrics such as is accuracy and oos accuracy are needed while designing and developing the models. the average designer using an enterprise va platform is not a machine learning expert. this leads to a variety of challenges in the provided user data, which constitutes the need for robust algorithms. firstly, end-users often provide data that is heavily imbalanced or noisy for both is and oos detection. while designing va for enterprise use-cases, is and oos examples often naturally belong to the same domain. such oos samples are called in domain oos (id-oos) as opposed to out-of-domain oos (ood-oos) which are relatively easier oos samples from a different domain @xcite ). designers expect the va to detect these relevant but unsupported topics (id-oos) even though it has high semantic overlap with is examples. finally, while entities defined by the designer play an important role for a real-world va, they are often ignored in academic oos settings. we show that entities must be modeled in conjunction with is and oos classification. in this paper, we discuss the challenges of designing a real-world oos detection system in depth and common approaches taken to design such a system. we propose a simple but effective algorithmic modification for oos detection in a real-world deployed system. this system models entities, intent and oos classification jointly and addresses the challenges around data. we propose a comprehensive benchmark based on public datasets and show that our method outperforms standard approaches while being simple to deploy and maintain. ## oos detection algorithms oos detection algorithms can be broadly classified into single-stage and multi-stage. ## conclusion the paper presents a novel out of scope (oos) detection component in a task-oriented dialog system. it allows the assistant to recognize user input that is not designed to be answered by the assistant and need to be handed off to a human agent. for business, a well designed out of scope detection system can improve customer satisfaction, user engagement, lead generation and saves cost. on one hand, business wants the assistant to hand off quickly when a user input is out of scope. on the other hand, unnecessary hand off could increase human intervention and reduce the value of va. we design an oos detection system that overcomes a multitude of real-world challenges, and deploy it in production. 4 we list out the lessons learned and both offline and online evaluation techniques for designing a robust, efficient and scalable system for enterprise va platform.