- Type
- NLP / NLU text-classification task
What does it do?
Intent detection is a natural-language-understanding task that assigns a user utterance, such as a request to make a reservation, ask for information, or file a complaint, to one of a predefined set of intent classes.
It is a core NLU component of conversational interfaces and customer-service automation. Evaluation work by Larson et al. (2019) and Casanueva et al. (2020) provides reference points for the task.
The intuition behind the method
When someone types or speaks to a chatbot or voice assistant, the system first has to figure out what the person actually wants before it can respond. Intent detection answers that question: it reads the utterance and assigns it to one of several pre-agreed goal categories. Instead of parsing every word literally, the method learns from labelled examples which kinds of wording map to which user goal, then routes each new utterance to the matching intent so the system knows what action to take.
History
Intent detection is one of the standard tasks in natural-language understanding for conversational systems. Larson et al. (2019) introduced an evaluation dataset for intent classification that also covers out-of-scope prediction. Casanueva et al. (2020) proposed intent detectors built on pretrained dual sentence encoders and evaluated them in few-shot setups.
When to use it
Choose intent detection when your input is free-form user text, your application must route each message to one of a known set of goals, and you can supply labelled example utterances for every goal. It suits chatbots, voice assistants, and customer-service triage, where the response depends on the user's goal. Do not use it when the goals are open-ended or not yet defined, because the taxonomy must exist before modelling. It is also the wrong tool when the main need is extracting specific values such as dates or names, which is the role of slot filling. Utterances that express several goals or fit no defined intent need design decisions beyond the basic single-label classifier.
Limitations and considerations
- Performance depends on a clearly bounded intent taxonomy; overlapping or ambiguous intent classes make the boundaries between classes unreliable.
- Supervised training requires labelled examples for every intent, and classes with few examples are learned poorly. Casanueva et al. (2020) report few-shot experiments with 10 or 30 annotated examples per intent; these are experimental settings, not a required minimum.
- The classifier is restricted to the predefined classes, so an utterance that fits no intent is forced into the nearest one unless out-of-scope handling is designed in. Larson et al. (2019) evaluate out-of-scope prediction explicitly; in practice it needs a deliberate design step, such as an out-of-scope class or a confidence threshold below which the system rejects the prediction.
- The single-label output does not represent an utterance that expresses several goals at once.
- Performance can drop after deployment when live user utterances differ in wording, vocabulary or topic mix from the training examples (distribution shift). Monitoring live traffic and periodically relabelling new examples helps detect this.
Source conditions do not replace independent scientific review or validation by an analysis engine.
Strengths
- Turns free-form user utterances into a single intent label that downstream dialogue logic can act on directly.
- On three diverse intent detection datasets, Casanueva et al. (2020) found that pretrained dual sentence encoders, such as USE and ConveRT, outperformed fine-tuning the full BERT-Large model and using BERT as a fixed encoder. The gains were largest in few-shot setups with 10 or 30 annotated examples per intent, the detectors could be trained in minutes on a single CPU, and they were stable across hyperparameter settings.
- Public evaluation resources exist: Larson et al. (2019) provide a dataset for intent classification that includes out-of-scope prediction, and Casanueva et al. (2020) release a single-domain dataset of 13,083 examples over 77 intents, so results can be compared across studies.
Applications
- Routing chatbot and voice-assistant messages to the correct dialogue handler.
- Customer-service automation — classifying incoming requests as bookings, information queries, or complaints.
- Triaging support tickets and inbound messages by user goal.
- Powering the NLU layer of dialogue systems, usually together with slot filling.
How it works
How it works
A taxonomy of intent classes is defined up front: the discrete set of user goals the system can recognise, such as booking, information request, or complaint. This taxonomy is a prerequisite: every utterance the model handles must map to one of these classes, so the categories must be agreed before any modelling begins.
A corpus of example utterances is collected and labelled with the correct intent from the taxonomy. Supervised intent detection needs this labelled training data; the breadth and balance of the labelled examples determine how reliably the model can tell the classes apart.
Each utterance is converted into a numeric representation that a classifier can read. A common choice is a contextual embedding from a pretrained language model. Casanueva et al. (2020) compared pretrained dual sentence encoders with fine-tuning the full BERT-Large model and with BERT used as a fixed encoder. The representation should keep the meaning needed to separate one intent from another.
A text-classification model assigns an intent label to each new utterance from its encoded representation. A classification layer produces a score for every intent in the taxonomy, and the highest-scoring intent is assigned, so the output is a single intent class per utterance. The model is trained on labelled utterances so that its predicted labels agree with the annotations. A single-label formulation does not by itself handle utterances that express several goals at once. The predicted class is then used by downstream conversational logic to select the system's response or action.
Predictions are scored against held-out labelled utterances that were not used for training. Useful metrics are accuracy, per-class precision, recall and F1, and macro-F1, which weights every intent equally and so exposes weak performance on small classes that overall accuracy can hide. A confusion matrix shows which intents are mistaken for one another. Errors are inspected for each class, especially between confusable intents, before the model is trusted.
Common pitfalls
- Skipping a clear taxonomy: overlapping or ill-defined intent classes confuse both annotators and the model.
- Too little labelled data per class makes rare intents unreliable; check class balance, not just total size.
- Out-of-scope utterances that match no intent get force-fitted to the nearest class unless out-of-scope handling is designed in.
- Judging by overall accuracy alone hides systematic confusion between similar intents; inspect per-class errors during evaluation.
- Evaluating on the training utterances, or using the same data for model selection and final testing, gives over-optimistic results; keep a held-out test set.
Frequently asked questions
How is intent detection different from general text classification?
Intent detection is a specialised text-classification task where the classes are user goals (intents) behind an utterance, rather than topics or sentiment. It is the understanding step of a conversational system: identify what the user wants so the system can act on it.
How much labelled data do I need?
It is a supervised task, so every intent needs labelled example utterances. Casanueva et al. (2020) study few-shot settings with 10 or 30 annotated examples per intent and find that pretrained dual sentence encoders are particularly effective there; these are experimental settings rather than a required minimum. In practice, aim for enough balanced examples per class that rare intents are not starved of training data, and check per-class results during evaluation.
What happens to an utterance that fits no intent?
That is the out-of-scope problem. A standard classifier forces such an utterance into the nearest defined class unless out-of-scope handling is designed in, for example as an extra out-of-scope class or a confidence threshold for rejection. The Larson et al. (2019) dataset is built to evaluate out-of-scope prediction.
Does it work together with slot filling?
Yes, the two are usually used together in dialogue systems. Intent detection identifies what the user wants, while slot filling extracts the specific values (such as dates, locations, or names) that the intent requires.
Related methods
Sources
Larson, S. et al. (2019). An Evaluation Dataset for Intent Classification and Out-of-Scope Prediction. EMNLP.
Open DOI referenceCasanueva, I. et al. (2020). Efficient Intent Detection with Dual Sentence Encoders. ACL Workshop on NLP for Conversational AI.
Open DOI reference