Out-of-Domain Detection
Description
Out-of-domain detection checks whether a user's query falls inside the topics and tasks a conversational AI system is meant to handle. Scope is defined by examples, such as an assistant's supported intents (the actions it can recognise), and a detector then scores how closely each new query resembles them. Typical detectors set a minimum confidence on an intent classifier, add an explicit out-of-scope class trained on examples of unsupported queries, or measure how far a query's embedding, a numerical summary of its meaning, lies from the in-scope examples. A query judged out of scope can be declined, handed to a person or another service, or answered with a request to rephrase, instead of receiving an unreliable or invented answer. The detector tests resemblance to the defined scope, not what the system actually knows, so it needs evaluating on realistic out-of-scope queries.
Example Use Cases
Safety
Enabling a medical chatbot specialised in diabetes management to recognise and deflect questions about unrelated conditions, avoiding potentially dangerous medical advice outside its training domain.
Reliability
Ensuring an educational AI tutor for high school mathematics reliably identifies advanced university-level questions and redirects students to appropriate resources rather than attempting explanations beyond its scope.
An insurer's claims-intake assistant is built for routine motor and household claims. Messages about unfamiliar claim types, such as large flood events or commercial losses, are detected and routed to a specialist adjuster instead of being handled with irrelevant questions.
Transparency
A council's resident-services chatbot covers bin collections, parking permits and council tax. When a resident asks about something it does not cover, such as a planning dispute, it says so, names the service that can help and logs the query, and the log shows the council which topics residents ask about that the chatbot cannot answer.
Limitations
- Scope has to be defined before it can be detected, and general-purpose assistants or fuzzy domains have no clean edge. A narrow definition refuses legitimate queries, and a loose one lets unsupported queries through.
- Detection is weakest on queries that resemble in-scope ones. In the 2019 benchmark that introduced the task, no intent classifier caught more than about two-thirds of out-of-scope queries even when trained on examples of them, so recall should be measured on realistic out-of-scope queries before the detector is relied on.
- The threshold trades wrongly refusing valid queries against wrongly answering unsupported ones. The two errors rarely cost the same, and queries near the boundary will still land on both sides.
- Users can rephrase or disguise an unsupported request so that it resembles in-scope wording. A detector tested only on plain phrasings overstates how well it holds up against paraphrase.
- Scope changes as capabilities are added or retired, so the detector and its out-of-scope test set need refreshing, or it will refuse newly supported queries and accept newly unsupported ones. Building realistic out-of-scope examples is costly because annotators need expert knowledge of the in-scope intents.
Resources
Research Papers
An Evaluation Dataset for Intent Classification and Out-of-Scope Prediction
Task-oriented dialog systems need to know when a query falls outside their range of supported intents, but current text classification corpora only define label sets that cover every example. We introduce a new dataset that includes queries that are out-of-scope—i.e., queries that do not fall into any of the system’s supported intents. This poses a new challenge because models cannot assume that every query at inference time belongs to a system-supported intent class. Our dataset also covers 150 intent classes over 10 domains, capturing the breadth that a production task-oriented agent must handle. We evaluate a range of benchmark classifiers on our dataset along with several different out-of-scope identification schemes. We find that while the classifiers perform well on in-scope intent classification, they struggle to identify out-of-scope queries. Our dataset and evaluation fill an important gap in the field, offering a way of more rigorously and realistically benchmarking text classification in task-driven dialog systems.