Elamur Research

Intent Detection in the Age of LLMs

Paper · 2024 · Gaurav Arora, Shreya Jain and Srujana Merugu

Summary

A shopping assistant can receive a request that sounds familiar even when it has no suitable action to offer. It may know how to recommend a product and how to check a feature of a particular product. A question about a feature could belong to either category, depending on what the shopper wants. It could also fall outside everything the assistant supports. Intent detection is the step that makes this distinction before the system chooses an action. The paper asks how well large language models can make that decision with a small collection of labeled examples, and how much response time a system needs to spend to benefit from them.

The authors compare prompted systems from the Claude and Mistral families with SetFit, a compact classifier trained on examples of each intent. The prompted systems see descriptions of the intents and examples retrieved for the current request. The authors also teach SetFit to recognize artificial out-of-scope requests made by deleting or replacing important words in valid requests. Across HINT3 and AID3, this training change raises SetFit’s average validation F1 from 0.600 to 0.658. Claude v3 Haiku reaches 0.736 with a higher reported median latency. The hybrid starts with the augmented SetFit classifier and consults a prompted system when repeated predictions indicate uncertainty. On datasets where training and evaluation requests came from the same distribution, the authors report that the hybrid comes within ∼2% of the prompted system’s F1 at ∼50% less latency. The reported gap is ∼4% when the evaluation includes requests from a different source.

The paper also asks what makes a request hard to reject. In a controlled shopping experiment, the authors vary how many intents the assistant supports and how broadly each intent is defined. Both changes make rejection harder for the prompted systems. Broadening the labels has a clearer effect on rejection than on accuracy for supported requests. That distinction matters because an assistant can do well at choosing among its supported actions while still accepting requests it cannot handle.

A separate experiment gives rejection its own decision. Mistral-7B first proposes a supported intent. The system then checks whether the request resembles training examples for that intent, using representations from inside Mistral-7B. On all HINT3 validation sets, this raises overall F1 and out-of-scope recall while lowering accuracy on supported requests. For Power Play11, out-of-scope recall rises from 0.205 to 0.950 and in-scope accuracy falls from 0.689 to 0.411. Overall F1 rises from 0.384 to 0.739. The authors report ∼300ms of additional latency for this representation check on their hardware.

Deep dive: Intent Detection in the Age of LLMs

How intent detection systems use language prompts, uncertainty routing, and a separate rejection check to balance accuracy and response time. · about 35 minutes to read

The problem and its context

An intent connects a request to an action

In a task-oriented assistant, recognizing what the user wants is part of deciding what the system should do next. An intent is a category defined for that purpose. A request can lead to a prepared answer or a workflow that has already been built. In an assistant that generates answers from retrieved information, the same decision can determine which knowledge source, tool, or application interface to use. The quality of an intent prediction therefore depends in part on the actions available downstream. An action that works for a broad range of requests can have a broad intent. An action with narrowly specified inputs may need a much more specific one. This is the setting the authors study within dialogue systems.

The paper uses scope to mean the set of utterances an intent can legitimately cover. This includes variation in how people express the same goal and, for a broad intent, variation in the goals assigned to the same action. Consider the paper’s distinction between recommending a product and evaluating one. A shopper who wants suggestions constrained by a budget is asking for a recommendation. A shopper asking whether a particular product fits that budget is asking for an evaluation. Vocabulary about price can appear in both. An assistant might support these as budget-specific intents or include them in broader intents that cover other kinds of recommendation and evaluation as well.

An out-of-scope request, abbreviated OOS, falls outside all the available intents. The boundary depends on the assistant. A request about delivery can be in scope where the service supports that operation and out of scope where its only actions concern product features. A phrase can sound pertinent to the domain and still request an unavailable action. Rejecting it requires checking what the service can support as well as interpreting the words. The paper studies this step as part of natural language understanding.

In some of the paper’s datasets, a request can have several valid labels. This makes the action inventory and the annotation scheme important to interpreting the task. A multiple-label example may have more than one acceptable intent, whereas an out-of-scope example has no supported intent. It also makes accuracy harder to interpret without knowing how the evaluation treats a prediction that matches only part of a reference. The authors use datasets with both single-label and multiple-label settings to examine intent detection across these different conditions.

Sparse examples and an open set of negatives

An assistant’s developers supply examples for the intents they want it to support. The authors describe a setting where these collections can be small and uneven. One intent may have enough examples to show several ways of asking for the same thing, while another has only a few. A common phrase in the small collection can look like a reliable signal even if it occurs in requests for several different actions. The scarcity of examples is especially consequential for an intent whose action is fixed but whose possible wordings vary widely.

The data problem is different on the rejection side. Developers can give examples of requests that fall outside the service, but the possible negatives extend beyond whatever collection they supply. There are unfamiliar topics, plausible requests for unsupported services, and utterances that overlap with a supported category in vocabulary while asking for a different action. Out-of-scope performance depends on whether a system can apply the supported categories to these new cases. A collection of negatives can probe this ability without defining the full boundary in advance.

The advantage of a general-purpose language system in this setting is its ability to use a small set of examples and draw on linguistic and factual patterns acquired before the particular assistant was built. This is the motivation for applying few-shot learning to intent detection. The examples can help establish which kinds of requests go together. The system still needs to learn which distinctions matter for the particular service. A plausible interpretation of an utterance can lead to the wrong action if its idea of what the assistant supports is too broad.

Earlier approaches and the deployment question

The authors place the work after systems based on supervised classification and systems that match utterances through similarity. A supervised classifier learns the relationship between training utterances and assigned labels. A similarity-based approach looks for examples close to a new request in a representation space. The earlier work the paper cites includes supervised BERT approaches and intent detection with dual sentence encoders. Both lines of work provide ways to map variable wording to a fixed set of categories with comparatively efficient inference.

Earlier work had also begun testing general-purpose language systems on intent benchmarks including CLINC150 and BANKING77. The authors distinguish those studies from theirs by the origin of the requests and the annotation setup. They describe those benchmarks as single-label datasets without requests collected from deployed task-oriented assistants. Their concern is that such benchmarks leave out some conditions found together in deployed services, including uneven training collections, a mixture of narrow and broad categories, and requests that can belong to several intents. HINT3 is one source they use to study requests from real services.

The paper describes another line of work that uses fine-tuning to improve out-of-scope detection in a large language system. For a platform serving many assistants, each with its own intents, this can mean training, deploying, and maintaining a separate adapted instance for each application. The authors investigate an alternative in which the large system can be shared and adapted to each service through its inputs and supporting data. This leaves a practical question about inference. A shared system can still be expensive to call on every request, particularly when a compact classifier could already handle many of them.

These concerns give the paper separate questions about prediction and deployment. The prediction question is whether a system can select the right supported intent and recognize when the intent inventory fails to cover the request. The deployment question is how often the more expensive system needs to participate. A further question concerns the inventory itself. Its design determines the decisions presented to both systems, so a benchmark result depends on the categories of the service as well as on the classifier.

The method, step by step

Train a compact classifier

SetFit learns from labeled utterances in two stages. The first stage trains a sentence encoder, a system that converts a sentence into a vector. The position of the vector conveys features useful for comparing utterances. The authors adapt this encoder by training it contrastively on pairs of sentences. The same encoder processes both members of a pair, which is what siamese means in this setup. The pairwise training gives the encoder a way to learn which representations should be similar for the intent task. This matters when different wording leads to the same action, or very similar wording leads to different actions.

The second stage uses the trained encoder to represent the examples again and trains a classification head on those representations. The head is the part that assigns scores to the intent labels. Its input is the encoded sentence, so it can learn how locations in the representation space correspond to the intent inventory. The authors use MPNet as the encoder backbone and a linear layer with a sigmoid as the head. The sigmoid turns the outputs of the linear layer into bounded scores. The paper uses the SetFit library for the implementation.

The training search covers the body and head learning rates, the number of epochs, and the batch size. A learning rate controls how far a training update moves the parameters. The encoder’s learning rate ranges from 5e-6 to 5e-5, while the head’s ranges from 1e-3 to 1e-2. The search covers 3 to 10 epochs, where an epoch is a pass through the training data, and considers batch sizes of 8, 16, 32, and 64. The authors use 10 search trials and report the best validation results. The search framework is Optuna.

Give SetFit difficult negative examples

The training procedure has an augmented variant. It starts with genuine in-scope training utterances, finds salient words with KeyBERT, and changes those words. For each identified keyword, deletion is chosen 50% of the time and replacement is chosen 50% of the time. A replacement is a random string of 5 characters. The altered utterances receive the out-of-scope label during training. The paper calls the resulting classifier SetFit with negative augmentation, or SNA.

A shopping request makes the purpose of these examples easier to see. A user asking to find a gaming laptop supplies both a recognizable request frame and the product information that gives it meaning. Removing the product words can leave the beginnings of a shopping request with its object missing. Putting arbitrary strings in their place keeps the request frame but makes the object uninformative. The authors want the classifier to treat the request frame as insufficient evidence on its own. The procedure uses a simple way to produce negatives that resemble supported requests in their surface wording.

The samples added to training follow this rule.

|U| = 0.2 × |D|

Here U is the set of randomly sampled augmented examples selected for addition. D is the original training set. The bars denote the number of elements in each set, and 0.2 is the multiplier applied to the original training-set size. The equals sign states the relationship between those counts, and × indicates multiplication.

The change is made before training. The classifier encounters the fabricated negatives alongside the original examples and can use them when learning where to draw the boundary. A real request never needs to pass through keyword deletion or replacement at inference. The approach depends on a training assumption about the altered sentences. They are treated as out of scope because of how they were constructed, with the effect of that choice judged on validation requests.

Retrieve examples for the current request

The direct prompting approach prepares a different representation of the training data. The authors use a BGE sentence encoder to embed each training utterance and save its vector in a database. They also prepare a description of each intent from its training examples. Claude v3 Sonnet generates those descriptions, and the same descriptions are used for all the prompted systems in the comparison. A description gives a compact account of the label, while the associated training utterances show how actual requests were assigned to it.

When a request arrives, BGE embeds it using the same procedure as for the saved examples. Retrieval then takes place within each intent. The system can select up to k of that intent’s most similar examples, subject to the score clearing the retrieval cutoff.

similarity > t

Here similarity is the retriever’s score for the incoming utterance and a training utterance. The greater-than sign requires that the score exceed t, the retrieval threshold. The count k caps how many qualifying examples the system keeps per intent. Where fewer examples clear the cutoff, the prompt contains fewer examples for that intent.

The authors vary k and t through a grid search. The candidate values of k are 0, 1, 5, 10, and 20. The candidate thresholds are 0.00001, 0.3, 0.5, and 0.7. The k setting includes 0, which allows a configuration using the task directions and descriptions without retrieved demonstrations. A larger k gives a class more room to contribute examples. A higher threshold asks each example to offer stronger similarity evidence before it can take up space in the prompt. The comparison reports the best validation settings found through the search.

The prompt includes the descriptions, retrieved examples, and fixed task instructions. The label order stays fixed across experiments. For each label, the retrieved examples appear from most to least similar to the incoming request. The authors replace the original intent names with identifiers of the form Label-xx, in which xx is a randomly assigned integer. Masking the names reduces the opportunity for a system to exploit wording in the original labels. The descriptions and examples still explain the categories the identifiers stand for.

The authors call this adaptive in-context learning because the demonstrations change with the request. The trained parameters can stay fixed while the prompt supplies the information particular to the assistant and the current utterance. The approach also uses chain-of-thought prompting, which here means that the prompt calls for reasoning as part of reaching a label decision. The paper describes this together with adaptive example selection and the fixed task directions. Its main comparison evaluates that complete configuration.

A useful distinction is that the retriever selects demonstrations, while the prompted system decides the intent. An example can be close enough to help illustrate a category without settling the final choice. A request about the price of a particular product may retrieve similar examples under a category for recommendations by budget and under a category for evaluating affordability. The descriptions and the language of the request supply evidence about the distinction. Retrieval is thus part of constructing the decision, alongside the descriptions and instructions.

How the hybrid handles an incoming request

The steps in order.

How the hybrid handles an incoming requestStep 1: Train SetFit on original examples and augmented negatives1. Train SetFit on original examples and augmented negativesStep 2: Store training embeddings and generate intent descriptions2. Store training embeddings and generate intent descriptionsStep 3: Run SetFit repeatedly with dropout enabled3. Run SetFit repeatedly with dropout enabledStep 4: Check agreement among the predicted labels4. Check agreement among the predicted labelsStep 5: Use SetFit when its prediction is confident5. Use SetFit when its prediction is confidentStep 6: Retrieve examples and prompt on uncertain requests6. Retrieve examples and prompt on uncertain requests

Route requests according to uncertainty

The hybrid puts the compact classifier first. Its purpose is to keep the response time of SetFit for requests the classifier handles confidently while allowing the prompted system to take over on uncertain requests. The method uses Monte Carlo dropout to obtain several predictions from SetFit for the same input. Dropout makes different parts of the encoder inactive on different passes. The authors apply dropout of 0.1 to the backbone’s hidden and attention layers. As these passes perturb the computation, stable choices give different evidence from choices that readily change.

The paper describes the routing signal as variance across predictions. The implementation description specifies that it examines the highest-scoring label from each sample. The notation for those sampled labels is as follows.

pᵢ ∈ P for all i ∈ [1, M]

Here pᵢ is the top-scoring label on sample i, and P is the label set to which those predicted labels belong. The symbol ∈ indicates membership. The index i runs over the sample positions from 1 through M, inclusively, as indicated by the brackets. M is the maximum number of samples.

The appendix describes the condition on the count of distinct labels using the wording greater than 1 or less than M/2. M is the same maximum sample count, and M/2 is half of that count. The paper then calls M/2 an upper bound added for stability. This creates an ambiguity in the rule as written. A literal reading of “or” accepts a count of 1 through the second clause when M is among the tested settings, even though that count means all sampled labels agree. The stated purpose of the stability bound suggests a bounded disagreement test. The exact Boolean condition remains unclear from the appendix.

The architectural separation is clear even where that condition is ambiguous. The router uses the behavior of the compact classifier on repeated passes to decide whether to call the prompted system. A request routed to the larger system receives the example retrieval and prompt construction already described. One that stays on the compact path is handled by SetFit. Repeated passes have a cost even for requests that stay on that path. The latency evaluation includes the time to make those passes sequentially, keeping memory demand constant during the sampling.

The authors test M settings of 5, 10, and 20. A larger sample allowance gives the router more observations of the compact classifier, but it also adds computation to the initial decision. The hybrid results therefore compare whole routing configurations, including the cost of assessing uncertainty. The experiment can show whether the extra sampling is worthwhile at these settings even though the appendix leaves a detail of the rule unresolved.

Separate intent choice from rejection

The representation-based method addresses a different problem from the hybrid. It aims to improve rejection in a prompted intent detector. The first decision produces a candidate from the supported intents. The second decides whether the utterance fits that candidate closely enough to accept it. Each decision has a different job. Choosing an intent asks which supported category is the most plausible. Accepting it asks whether the evidence is strong enough to treat the utterance as an instance of that category.

Before inference, the authors represent each training utterance using a Mistral decoder layer. The vector comes from the position of the final token of the prompt. That position gives them a representation from the forward computation on the input. They save these vectors with their intent labels. This use of a decoder representation is separate from the BGE vectors used to retrieve examples for the prompt. The stored decoder vectors serve as references for the rejection check.

At inference, the authors take out-of-scope off the list of labels offered to the prompted system. It must choose a supported intent. They then represent the incoming request in the same way that they represented the training examples, taking the decoder vector for the last prompt token. For the check, they compare that vector with the saved vectors associated with the predicted intent. The set of examples examined at this point is determined by the first decision. Evidence for rejecting a request is collected against the proposed category.

The comparison uses cosine similarity, a measure of how closely two vectors point in the same direction. The method computes a score against each training sentence of the predicted intent and takes the mean of those scores. The threshold in the second step determines whether the request is accepted under the selected intent. Averaging makes the decision depend on the examples for the class as a group. A request close to a single example can still have a low mean if the other examples are distant, a property that matters for classes with several kinds of valid requests.

Encoding takes a forward pass through Mistral-7B. The rejection check needs the internal vector, so it can stop after that pass. This avoids the repeated generation steps involved in producing additional output text. The authors demonstrate the procedure on the instruction-tuned version of Mistral-7B with accessible weights and without task-specific fine-tuning. They argue that the same separation could be used with a task-fine-tuned system as long as the relevant internal representations can be obtained. Their reported comparison uses the instruction-tuned setup.

The hybrid and the rejection method should be read as separate experiments. The hybrid examines whether uncertainty can limit calls to an expensive prompted detector. The representation experiment examines whether checking the proposed class separately can improve out-of-scope decisions. They both stage the work, but the first uses its extra stage to get a different classifier’s judgment and the second uses it to test support for a candidate that has already been chosen.

Experiments and results

Where the requests come from

The evaluation combines 3 public datasets from HINT3 and 3 internal datasets in AID3. The public datasets are SOFMattress, Curekart, and Power Play11. Across the two collections, the number of supported intents ranges from 8 to 59. The collections give the authors services with different label inventories and different balances of in-scope and out-of-scope requests. The 3 AID3 datasets are the multiple-label ones. Their splits were prepared specifically for the study.

AID3 contains shopping requests with personally identifying information redacted. ALC and ADP come from a deployed shopping assistant. ALC focuses on earlier shopping activity, where users are still exploring products, and covers 1 High Consideration Technical Products category. ADP covers later shopping activity across 6 categories of that kind. ALC has 8 intents and ADP has 13. The different coverage gives the evaluation two deployed-assistant settings with quite different mixtures of requests and categories.

OADP has 13 intents and comes from a forum of single-turn questions and answers. Like ADP, it covers later shopping activity, with requests across >10 High Consideration Technical Products categories. The authors use ADP’s training set when evaluating OADP. Consequently, the comparison between ADP and OADP tests transfer from the assistant to a different source of shopping requests. The label inventory remains available. The way users express queries, and the mix of queries they pose, can differ when the source changes. OADP is therefore distinguished from the other cases in the hybrid averages.

The authors describe HINT3 and AID3 as evidence about conditions that arise with real services, including uneven and small training sets. The forum origin of OADP matters to that description. Its purpose is to introduce a source change, whereas ALC and ADP supply requests from the deployed shopping assistant itself. The internal results apply to these experimental splits. The paper says that it intends to make the internal data available after approval.

What the measurements capture

The primary comparison uses F1, which balances precision and recall. Precision asks how frequently predictions are correct among the cases they identify, and recall asks how much of the relevant set they recover. F1 depends on both, so a setting can lose performance by making too many erroneous decisions or by missing too many correct ones. The paper reports validation F1 at the settings it selects for the main comparisons. Its F1 tables describe the combined intent detection task, while separate columns and analyses isolate behavior on supported and unsupported requests.

Out-of-scope recall asks what share of genuinely unsupported requests the system identifies as such. For an assistant, this is the part of the evaluation that captures when a request would otherwise be sent to an action despite falling outside the inventory. In-scope accuracy focuses on correct classification among requests that do have supported intents. A change can raise rejection recall by declining more often and still lower in-scope accuracy if some of the additional refusals concern requests the service could handle. Reporting the pair lets a reader see the trade even when overall F1 rises.

The controlled study also uses area under the receiver operating characteristic curve, given as AUCROC. This assesses how well a score separates supported from unsupported requests as the decision boundary varies over its possible values. SetFit supplies a score from the highest prediction among its labels. For a black-box prompted system, the authors assign 1 if it selects a supported label and 0 if it predicts out of scope. That score has only the information carried by the hard decision, so the AUCROC comparison uses signals of different granularity for the two kinds of system. The study also reports in-scope accuracy and out-of-scope recall for the controlled setups.

For inference time, the main comparison reports average p50 latency, with p50 denoting the median. The hybrid comparison has its own average latency row and a latency fraction relative to the direct prompted system. The measurements answer different questions. The main comparison describes typical latency across the classifiers as reported there. The hybrid measurements include the routing calculation and compare it with the corresponding direct-call configuration. Their absolute figures should be read within their own tables.

Direct prompting and negative augmentation

The prompted comparison includes Claude v1 Instant, Claude v2, Claude v3 Haiku, and Claude v3 Sonnet. The other family contributes Mistral 7B, Mixtral 8x7B, and Mistral Large. The authors compare these systems with unaugmented SetFit and with SNA. All the prompted systems receive descriptions generated by the same system, and all use the adaptive retrieval procedure. The comparison therefore measures these particular prompting configurations against SetFit trained with and without artificial negatives.

Across validation datasets, Claude v2 has average F1 of 0.737, Claude v3 Haiku has 0.736, and Mistral Large has 0.735. The proximity of these scores makes the latency column relevant to the choice of a system for routing. On the paper’s average p50 latency scale, Haiku records 1.697, Mistral Large 3.565, and Claude v2 11.795. Both SetFit variants have reported average p50 latency of 0.030. The paper describes SetFit as about 56 times faster than Haiku in this comparison. The authors take Haiku and Mistral Large into the hybrid experiment.

The validation results vary by dataset. Haiku reaches 0.815 F1 on SOFMattress, compared with 0.632 for plain SetFit and 0.672 for SNA. On Curekart, Mistral Large reaches 0.779, Haiku reaches 0.775, and SNA reaches 0.709. The differences are smaller on Power Play11, where Mistral Large has 0.668, Haiku 0.646, and SNA 0.639. Negative augmentation gives the compact classifier a different starting point for the cascade in each case. On Curekart, for example, the unaugmented classifier starts at 0.511 validation F1.

The internal datasets add other patterns. Mistral Large reaches 0.907 validation F1 on ALC, while SNA reaches 0.848 after plain SetFit scores 0.769. Claude v3 Sonnet reaches 0.765 on ADP, where Haiku reaches 0.715 and SNA reaches 0.625. On OADP, Sonnet reaches 0.653 and Haiku 0.619, while SNA records 0.459. The best system among these examples depends on the request source. The close aggregate scores of the leading prompted systems leave room for much different results on an individual service.

Across HINT3 and AID3, the validation F1 average moves from 0.600 with plain SetFit to 0.658 with negative augmentation. The paper summarizes the increase as >5%. The gain is mainly an improvement on the studied settings with training and evaluation from the same distribution. The forum transfer case is an exception in the F1 table. Its plain SetFit score is 0.462, compared with 0.459 after augmentation. The aggregate benefit therefore gives a useful description of the full comparison, while the OADP result sets a limit on transfer to that source.

Rejection at the settings chosen for F1

The next chart uses validation out-of-scope recall at the setting selected for F1. It shows how much of the unsupported set each system catches while performing its ordinary classification task at that operating point.

Average validation out-of-scope recall across HINT3 and AID3 at the best F1 settings

Mistral Large leads the reported averages and negative augmentation improves SetFit’s recall.

Average validation out-of-scope recall across HINT3 and AID3 at the best F1 settingsClaude v1 Instant: 0.246Claude v1 Instant0.246Claude v2: 0.579Claude v20.579Claude v3 Haiku: 0.601Claude v3 Haiku0.601Claude v3 Sonnet: 0.458Claude v3 Sonnet0.458Mistral 7B: 0.333Mistral 7B0.333Mixtral 8x7B: 0.407Mixtral 8x7B0.407Mistral Large (this paper): 0.641Mistral Large (this paper)0.641SetFit: 0.378SetFit0.378SetFit with negative augmentation: 0.489SetFit with negative augmentation0.489
The numbers
System or settingOOS recall
Claude v1 Instant0.246
Claude v20.579
Claude v3 Haiku0.601
Claude v3 Sonnet0.458
Mistral 7B0.333
Mixtral 8x7B0.407
Mistral Large (this paper)0.641
SetFit0.378
SetFit with negative augmentation0.489

Averages obscure some important changes in rank. On ALC, Haiku’s validation out-of-scope recall is 0.961 and SNA’s is 0.844. On Power Play11, plain SetFit reaches 0.798 on the same metric, compared with 0.665 for SNA, 0.602 for Mistral Large, and 0.561 for Haiku. Power Play11 illustrates why the authors keep the rejection metric alongside F1. SNA improves validation F1 over plain SetFit there even though it catches fewer unsupported requests at its selected F1 setting. Different combinations of intent errors and rejection errors can yield those two results.

The source change in OADP makes rejection particularly difficult. The SetFit variants both record 0.000 validation out-of-scope recall. Haiku reaches 0.036 and Mistral Large reaches 0.268. Claude v3 Sonnet, which leads the OADP F1 table, also records 0.036 on OADP out-of-scope recall. These figures concern settings selected for F1. They show how difficult it was for the tested systems to balance the overall classification task with rejection in the transfer condition. They leave open the recall that could be obtained by selecting a setting specifically for that metric.

How much of the direct system’s F1 the hybrid keeps

The hybrid uses SNA as the initial classifier and tests both Haiku and Mistral Large downstream of the router. The chart focuses on average validation F1 with OADP excluded. That restriction matches the paper’s comparison of requests from the same training and evaluation distribution. SNA alone and both direct prompted systems are included so that the routed results can be read against their starting point and their direct-call counterparts.

Average validation F1 for direct and routed systems across HINT3 and AID3 excluding OADP

Routing recovers part of the gap between the compact classifier and direct prompting on requests from the same distribution.

Average validation F1 for direct and routed systems across HINT3 and AID3 excluding OADPSetFit with negative augmentation: 0.698SetFit with negative augmentation0.698Direct Claude v3 Haiku: 0.760Direct Claude v3 Haiku0.760Routed Claude v3 Haiku with M = 5: 0.722Routed Claude v3 Haiku with M = 50.722Routed Claude v3 Haiku with M = 10: 0.737Routed Claude v3 Haiku with M = 100.737Routed Claude v3 Haiku with M = 20: 0.740Routed Claude v3 Haiku with M = 200.740Direct Mistral Large: 0.762Direct Mistral Large0.762Routed Mistral Large with M = 5: 0.724Routed Mistral Large with M = 50.724Routed Mistral Large with M = 10: 0.736Routed Mistral Large with M = 100.736Routed Mistral Large with M = 20 (this paper): 0.742Routed Mistral Large with M = 20 (thispaper)0.742
The numbers
System or settingF1
SetFit with negative augmentation0.698
Direct Claude v3 Haiku0.760
Routed Claude v3 Haiku with M = 50.722
Routed Claude v3 Haiku with M = 100.737
Routed Claude v3 Haiku with M = 200.740
Direct Mistral Large0.762
Routed Mistral Large with M = 50.724
Routed Mistral Large with M = 100.736
Routed Mistral Large with M = 20 (this paper)0.742

The paper reports the ∼2% gap in this matched-distribution comparison at the higher sample setting, together with the reduction in latency. With M = 20, the reported latency fraction is 0.549 for routed Haiku and 0.428 for routed Mistral Large. These fractions are relative to each system’s direct latency in the hybrid evaluation. The corresponding reported average latency figures are 1.287 for routed Haiku and 1.657 for routed Mistral Large, with direct-call figures of 2.345 and 3.867 respectively. The two hybrids reach close average F1 while retaining the latency differences associated with their downstream systems.

The all-dataset average tells a different story about how much performance is recovered. At M = 20, routed Haiku has average validation F1 of 0.697 against 0.736 for direct Haiku. Routed Mistral Large has 0.701 against 0.735 for direct Mistral Large. The authors summarize the gap including the forum case as ∼4%. On OADP itself, the M = 20 hybrid scores are 0.485 with Haiku and 0.498 with Mistral Large. Their direct-call counterparts are 0.619 and 0.601. This is the case where a reader should be most cautious about applying the matched-distribution headline.

The aggregate gap also leaves room for individual routed scores to exceed the corresponding direct scores. At M = 20 on Power Play11, routed Haiku reaches 0.690 validation F1 and routed Mistral Large reaches 0.692. Direct Haiku records 0.646 and direct Mistral Large 0.668 there. On SOFMattress, by comparison, the M = 20 hybrids record 0.730 and 0.719 against direct scores of 0.815 and 0.767. The cascade changes which classifier decides each request. Its effect on F1 depends on which decisions it moves to the larger system and which decisions it retains.

Rejection using internal representations

The representation experiment compares prompted Mistral-7B with the same approach followed by a separate verification decision, with supported labels alone offered at the first step. The comparison is on HINT3. On SOFMattress, validation F1 rises from 0.699 to 0.751 and overall accuracy rises from 0.705 to 0.748. Out-of-scope recall goes from 0.465 to 0.715, alongside a decline in in-scope accuracy from 0.842 to 0.767. On Curekart, validation F1 rises from 0.615 to 0.766 and overall accuracy rises from 0.601 to 0.761. Out-of-scope recall changes from 0.376 to 0.782, while in-scope accuracy changes from 0.863 to 0.736.

Prompted Mistral-7B and representation-based rejection on Power Play11 validation F1

Checking fit to the proposed intent raises F1 over direct prompting.

Prompted Mistral-7B and representation-based rejection on Power Play11 validation F1Prompted Mistral-7B: 0.384Prompted Mistral-7B0.384Mistral-7B with representation-based rejection (this paper): 0.739Mistral-7B with representation-basedrejection (this paper)0.739
The numbers
System or settingF1
Prompted Mistral-7B0.384
Mistral-7B with representation-based rejection (this paper)0.739

Power Play11 has the sharpest change in the reported metrics. Overall validation accuracy goes from 0.357 to 0.780. The rejection stage raises out-of-scope recall from 0.205 to 0.950 and lowers in-scope accuracy from 0.689 to 0.411. This is a case where the intervention yields a substantially better aggregate result while changing which requests the system handles well. The gain in overall accuracy and F1 accompanies a considerable cost to correct handling of supported requests.

The authors describe the representation method as producing a >5% improvement across the tested datasets. The reported extra latency is ∼300ms on 1 32GB V100 GPU. The result applies to the forward-pass check used in this comparison, with representations for the training data already available. Since the extra computation serves rejection after a candidate has been selected, its latency is separate from the savings measured in the routing experiment. The paper provides evidence for each procedure in its own comparison.

What the ablations show

Broader categories and more categories affect different decisions

The main controlled study builds a small intent hierarchy around shopping. Its two parent intents are product recommendation and product evaluation. Each parent includes narrower intents concerning properties such as compatibility, delivery, budget, and warranty or returns. The same property can matter to either parent. Asking for products that satisfy a condition and checking whether a named product satisfies it can lead to different actions. This makes it possible to vary how labels group utterances while keeping the subject matter related.

The hierarchy contains 20 leaf intents. A leaf is a specific category at the bottom of the hierarchy. To construct a label of the desired breadth, the authors randomly combine S distinct leaves under the same parent. Sampling without replacement keeps a leaf from being assigned repeatedly in the construction. Larger values of S therefore produce classes that cover more specific use cases. The authors then draw L different intents of the chosen breadth for the system’s label inventory.

S ∈ [1, 5]

S is the number of leaf intents combined to form one category. The membership sign ∈ means that S takes values in the inclusive range shown by the brackets, with 1 and 5 as its endpoints. The counts in this range are integers. A category formed with a larger S covers more of the underlying leaf intents.

L ∈ [1, 5]

L is the number of categories offered to the classifier. The membership sign and brackets again indicate an inclusive range of integer counts, running from 1 to 5. S concerns the breadth of an individual category. L concerns the number of categories presented together. The feasible combinations depend on how many non-overlapping groups can be made from the leaves. In the reported plots, curves are truncated for labels with scope > 2 because the sampling scheme runs out of disjoint combinations.

The authors hand-curate 10 utterances for each leaf. For each run, 5 randomly chosen utterances go into training and the remaining 5 go into evaluation. The evaluation also includes three prewritten paraphrases of each test utterance, giving the system several formulations of the held-out request. The authors run each experimental condition on 10 randomly created datasets. They fix SetFit’s batch size at 16 and train it for 5 epochs. The prompt retriever uses a maximum of 5 demonstrations per intent with a cutoff of 1e-5. Keeping these settings constant lets them compare label configurations under the same retrieval and training procedure.

Out-of-scope AUCROC declines as the authors broaden the categories and as they add categories. The prompted systems show more degradation than SNA under these changes. The result connects out-of-scope detection with the label inventory itself. A category that groups several kinds of requests gives the system a wider range of grounds for accepting a new utterance. Several available categories likewise give it several plausible places to put the utterance. The experiment establishes that the tested systems become worse at separating supported and unsupported requests as these properties change. Those explanations describe ways the decisions could become harder given the construction.

In-scope accuracy behaves differently. The prompted systems are comparatively insensitive to the breadth of a category when the request is supported. Their in-scope accuracy does fall as the number of categories increases, though the reduction in out-of-scope AUCROC is more pronounced. SNA shows degradation in in-scope accuracy as both breadth and inventory size increase. This is why the paired measurements matter. If the experiment considered only supported requests, it would give a much weaker indication of how broad classes affect a prompted system’s ability to reject.

The size result agrees with earlier work discussed by the authors. They present the investigation of category scope as the added contribution of this study. A broad category and a large inventory are distinct design choices. A service can offer a small number of wide categories or a larger number of specific ones, and the experiment provides separate evidence about increasing each factor within the shopping hierarchy. It leaves the joint choice for any particular service dependent on the available actions and the trade between classification and rejection.

What changes when the training negatives change

The comparison between plain SetFit and SNA tests the contribution of the proposed augmentation within the compact approach. The altered utterances retain some language from supported requests and receive a negative label. The comparison shows the effect of introducing these examples as a package. Across the validation datasets, F1 and average out-of-scope recall improve. Curekart and ALC show improvements on both measures, whereas Power Play11 combines improved F1 with reduced rejection recall. OADP shows a small decline in F1 and the same rejection recall for both variants. The evidence supports an average benefit and indicates where that benefit has limits.

The authors motivate the procedure as a way to weaken accidental associations between common wording and a supported label. The validation comparison is consistent with that explanation, particularly when rejection improves. It does not isolate the contribution of keyword deletion from the contribution of random replacement. It also leaves open how much improvement would come from adding another collection of equally sized negatives. The experiment supports using the complete augmentation as tested. It gives less evidence about which component of that training change produced the gain.

What extra dropout samples buy

The study of M varies how many dropout samples the compact classifier can use to inform routing. For Mistral Large, average validation F1 excluding OADP is 0.724 with M = 5, 0.736 with M = 10, and 0.742 with M = 20. The corresponding latency fractions relative to direct Mistral Large are 0.275, 0.376, and 0.428. Haiku follows the same direction in these averages, with the increases in F1 getting smaller for the larger sample setting and the latency fraction continuing to rise. The paper concludes that additional samples deliver limited improvement over the settings already tested.

The per-dataset results reveal why a single average cannot describe the effect of sampling on every service. With Haiku on SOFMattress, the routed validation F1 is 0.740 at M = 10 and 0.730 at M = 20. On Power Play11 it is 0.671 and 0.690 at those same settings. Increasing M changes the routing decisions, and the test samples available to support those decisions differ by dataset. More dropout passes offer evidence about stability, with no guarantee that disagreements identify exactly the requests the direct system would classify better.

What the separate rejection check establishes

The Mistral-7B comparison changes the label choice and verification procedure together. Its direct configuration can choose out of scope in the prompt. The new configuration proposes a supported intent and tests whether the query fits its training examples. The experiment therefore establishes the performance of the complete two-stage decision against the direct prompt. The results do not allocate the gains separately to forcing an in-scope candidate, using the last prompt token, comparing with the selected class, or averaging its similarities.

The decline in in-scope accuracy across HINT3 gives a direct view of the cost of this operating point. The authors explain that the cutoff in the verification stage can be chosen to limit the decline. A cutoff that accepts more borderline requests would preserve more in-scope decisions while yielding less improvement on rejection. The reported figures show a particular balance, most sharply on Power Play11. They support taking both types of error into account when interpreting the overall result.

Limitations

Limits the authors identify

The authors assume a fixed set of intents supplied by human experts through examples. Their experiments use that inventory once it is defined. They identify interactive design as future work, in which a domain expert could use a large language system to help define and refine categories. Such a process could change which requests share an action or which requests count as outside scope. The experiments show sensitivity to class design under a controlled construction. The effectiveness of an interactive design process remains a separate question.

The evaluation concentrates on English. The authors note that the systems they examine already support multiple languages, and they identify testing across languages and dialogue datasets as future work. The results supply no basis for assuming the same retrieval quality, coverage of paraphrases, or rejection boundary in a different language. Those are empirical questions for multilingual intent detection, even when the underlying systems can process the inputs.

The authors also limit the hybrid study to a cascade driven by SetFit uncertainty. They propose studying other ways to decide when the additional call is worthwhile, including a utility based on information gain. They also name distillation as an alternative to investigate, with the larger system generating synthetic training data for the smaller classifier. The reported latency and F1 comparison concerns the cascade they implemented. Other ways of distributing computation or adding training data have different mechanisms and require their own comparisons.

The paper distinguishes the AID3 experimental splits from the performance of the production systems that helped supply the data. It says the internal collection is intended for release following approval. It also identifies possible bias in data and pretrained systems, potential misuse, and difficulty assigning accountability as concerns. Redaction addresses personally identifying information in the internal requests. The evaluation measures classification and latency, while those wider concerns remain outside its measurements.

Limits apparent from the experimental setup

The controlled experiment gives a precise meaning to broader scope by pooling related leaf intents. Real services can create broad categories in other ways, including by grouping requests whose wording and purposes are less closely related. The controlled data come from a single shopping hierarchy and use prewritten utterances and paraphrases. The study separates changes in scope and label count within that construction. Its ranges and the truncated curves limit how far the observed trends can be extended to other taxonomies or to much larger inventories.

The AUCROC results compare a continuous classifier score with a binary outcome from the black-box prompted detectors. A binary decision provides less information about the ranking of cases near the boundary. The controlled comparisons of a given system across different settings remain informative about how its decisions change. Cross-system differences in AUCROC also reflect how the available outputs are converted to scores. A comparison based on continuous confidence values from both kinds of system would answer a different measurement question.

The best settings for the main comparisons are reported on validation data. Those scores establish what the search found under the paper’s evaluation procedure. They provide limited evidence about stability on a new split after hyper-parameter selection, and the paper’s tables give point estimates. Similarly, the main results describe multiple-label datasets while providing limited detail about how different patterns of partial agreement affect the aggregate metrics. This matters when translating a benchmark F1 result into an expectation about whether a downstream action will be usable.

The OADP experiment shows what happened when training on assistant requests and evaluating on forum questions. This is evidence of a distribution shift tied to a particular pair of data sources. Those sources differ in the breadth of shopping categories as well as in how questions are collected. Their comparison cannot isolate which difference accounts for which errors, or establish what would happen under other source changes. The lower hybrid scores on OADP demonstrate the importance of reporting that case separately from the matched-distribution average.

The latency measurements describe the tested implementations. For the hybrid, the authors count sequential SetFit passes and note that batching could lower latency. The measured fractions apply to the hardware, inference arrangement, and mix of requests in the study. In a service with a different mix, a different fraction of requests could take the expensive path. The paper’s median and average latency figures give a comparison of typical costs. Tail latency and performance under production load remain unmeasured.

For the representation method, the direct evidence is limited to Mistral-7B on HINT3. It relies on access to internal decoder representations. The paper’s statement that the technique could be applied to a fine-tuned system describes the method’s potential portability. The evaluation leaves performance with a different backbone, a different layer, or on the AID3 transfer setting open. Its measured latency likewise concerns the specific forward-pass setup reported for Mistral-7B.

Finally, the two-stage check can only examine the class proposed in the first step. If a supported request is assigned to the wrong class, its comparison might lead to rejection or to acceptance under that wrong class. The procedure provides no later search over alternative classes. The mean similarity can also penalize a valid utterance that closely matches a specialized part of a broad category while differing from most of its other examples. These are consequences of the decision rule. The paper reports the aggregate trade between rejection and in-scope accuracy, without attributing observed errors to these particular mechanisms.

What came after

Clarifying the evidence for an intent

One subsequent citing work brings disambiguation into data augmentation. Its title identifies the problem at the training-data level. In Arora and colleagues’ study, a fabricated negative preserves some familiar wording while losing or replacing words that identify what the user wants. That is a way to test whether recognizable phrasing can support a label on its own. Disambiguated augmentation addresses a related question about how the examples supplied for recognition express which intent is meant. The distinction is between the information an utterance gives for a category and the sheer presence of more training utterances. The title establishes the later work’s focus on disambiguated augmentation. It leaves the construction and its measured effects unspecified. How DDAIR you? Disambiguated Data Augmentation for Intent Recognition

A second citing work locates the ambiguity in the conversation being interpreted for an agent’s plan. Rewriting a conversation gives the system a different form of input on which to base intent understanding. Arora and colleagues pose the classification decision around an incoming utterance and adapt the examples seen alongside it. In the later work’s framing, the material being changed is the conversation itself. This is a natural extension of the question about what evidence the intent detector receives. A request whose meaning depends on the broader conversation presents a different input problem from an isolated utterance whose category can be explained with examples. The later work’s title identifies rewriting and agentic planning as its setting. RECAP: REwriting Conversations for Intent Understanding in Agentic Planning

Structuring the categories and the labels

A third citing work frames intent inference as hierarchical and grounded in a knowledge graph. In the controlled experiment here, a hierarchy lets the authors create categories with different breadth and measure how a classifier responds to them. The later title makes hierarchy part of the inference problem itself, with a knowledge graph providing the grounding. This connects the paper’s questions about class design to an approach in which relationships among intentions and the knowledge used to interpret them are part of the task definition. The title identifies that setting, while the inference procedure and its evaluation remain unspecified. Hierarchical User Intent Inference with Knowledge Graph Grounding

The fourth citing work addresses the construction of a multi-turn classifier through language-model-based labeling. The annotation stage is significant because the supervised portion of Arora and colleagues’ study starts from utterances already assigned to intents. Its prompted portion also derives descriptions and demonstrations from those assignments. A multi-turn labeling task moves the decision about what counts as an example of an intent into the construction of training data for conversations. Alongside the work on rewriting, it shows two different points at which later research has put conversation context into the problem. One concerns the representation on which intent is inferred for planning. The other concerns the labels used to build a classifier. The title of the labeling work supplies its focus, without establishing how annotations were checked or how the final classifier performed. Building Multi-turn Intent Classification with LLM-based Labeling

Cite

Cite as Gaurav Arora, Shreya Jain and Srujana Merugu. 2024. Intent Detection in the Age of LLMs. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2024.emnlp-industry.114

@inproceedings{arora2024intent,
  title = {{Intent Detection in the Age of LLMs}},
  author = {Gaurav Arora, Shreya Jain and Srujana Merugu},
  booktitle = {Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing: Industry Track},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-industry.114},
  url = {https://doi.org/10.18653/v1/2024.emnlp-industry.114}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/arora-2024-intent-detection-age-llms/