Zero-Shot vs Few-Shot Intent Classification: Start With Definitions, Add Examples for Measured Confusions
Zero-shot prompts give the model intent definitions, few-shot prompts add labeled examples, and few-shot fine-tuning changes the weights. Here is how to tell them apart, test them fairly and choose.
Zero-shot intent classification gives a language model the intent names, their definitions and the instructions, with no labeled examples. Few-shot intent classification adds a small set of labeled example utterances to that same prompt, and the model weights still do not change. Training a model on a few labeled examples is a third method, few-shot fine-tuning, which does change the weights. The sensible order is to build a zero-shot baseline with sharp definitions and an out-of-scope option, then add examples only for the intent pairs that the baseline confuses on held-out data.
The most closely matched study supports that order but does not settle it. A 2023 ServiceNow study found that prompting with intent descriptions was "very competitive," and that fine-tuned adapters trained on one example per intent did best. That one-example result came from fine-tuning, not from examples in a prompt. No published study has compared descriptions alone, descriptions with demonstrations, limited-data fine-tuning and a ready-made option scorer on the same intents, with cost and latency reported.
The word "few-shot" covers three methods, and only one of them updates the model.
The terms come from the 2020 GPT-3 paper, Language Models are Few-Shot Learners. Its authors define few-shot as giving the model "a few demonstrations of the task at inference time as conditioning," with "no weight updates." One-shot is the same with a single demonstration. Zero-shot allows no demonstrations, and the model receives only a natural-language instruction. The authors call zero-shot the most challenging setting and, in some cases, "unfairly hard."
Fine-tuning is a different thing in that paper. It means updating the weights of a pre-trained model on a labeled dataset, which usually holds thousands to hundreds of thousands of examples. GPT-3 itself was not fine-tuned in the study.
For intent classification, the three methods differ in where the labeled examples go:
- A zero-shot prompt contains intent IDs, definitions, exclusions and output rules, and no labeled utterances.
- A few-shot prompt contains the same text plus labeled utterances, which are read again on every request.
- A few-shot fine-tune uses labeled utterances once, during training, to update the weights or a small adapter.
The distinction matters for cost and for maintenance. Demonstrations add input tokens to every call. Fine-tuning moves that cost into a training run and a model that you must host and version.
The ServiceNow result about one example per intent came from fine-tuning, not from prompting.
Parikh, Tumbade, Vohra and Tiwari of ServiceNow presented the study at ACL 2023. They tested four methods on the public MASSIVE dataset and on private enterprise sets for IT, HR and customer service. The methods were domain adaptation, data augmentation, zero-shot prompting with intent descriptions, and parameter-efficient fine-tuning.
The fine-tuning method added small IA3 adapters to Flan-T5 models and trained them on one, three or five utterances per intent. Flan-T5-XL, a 3-billion-parameter model, "consistently outperforms all other methods with just 1 training example per intent," according to the paper.
The zero-shot method listed each intent as intent_name: description, added a none_of_the_above option and placed the user's sentence at the end. It was run on GPT-3 and on Flan-T5-XXL. The authors write that "we do not pass the training examples to the LLMs." The study therefore never placed labeled utterances inside its classification prompts. Its result supports testing fine-tuning against zero-shot prompting. It does not show that one prompt demonstration per intent beats definitions alone.
The study also found wide variation in zero-shot results, especially for out-of-scope messages. Zero-shot in-scope accuracy ranged from 60.6 to 89.3 across datasets and settings. Out-of-scope recall, which measures how many irrelevant messages the model rejected, ranged from 0.43 to 0.97. The authors also found that GPT-3 "clearly outperforms Flan-T5-XXL" on out-of-scope recall, even where in-scope accuracy was similar.
Better definitions are a separate lever, and they should be tested before examples are added.
A 2024 SIGDIAL paper from LG AI Research tested how the quality of intent descriptions affects accuracy. The team fine-tuned FLAN-T5 3B on 75 intents from the CLINC150 dataset and tested it on 75 intents that it had never seen.
The team compared descriptions written for one intent in isolation with "dependent" descriptions, which were written with all intents in view so that each one separates itself from its neighbours. For the model trained without descriptions, CLINC accuracy was 84.28% with no descriptions and 90.55% with dependent descriptions at test time. The authors found that description quality at test time mattered more than description quality during training.
The practical lesson is that rewriting definitions to name the boundary between two intents is an experiment of its own. If you rewrite definitions and add examples in the same step, you cannot tell which change helped.
The same paper found a way to keep long definition lists affordable. A ranker that passed only about 10 likely intents to the model matched the accuracy of passing all of them. On CLINC, it cut the input from about 1,200 to 1,300 tokens down to 300 to 400 tokens.
A cancel_order versus return_item pair shows where definitions stop being enough.
Cancelling and returning are easy to confuse in retail support, because both express "I don't want this," and the difference depends on whether the customer already has the item.
Stable IDs, definitions with exclusions, and two explicit escape options make the boundary testable:
cancel_order: The customer wants to stop an order that has not been delivered.
Excludes: items that the customer has already received (use return_item).
return_item: The customer has received an item and wants to send it back.
Excludes: orders that have not arrived yet (use cancel_order).
clarify: The message could be cancel_order or return_item,
and the message does not say whether the item has arrived.
out_of_scope: The message is not about stopping an order or returning an item.
Indirect utterances test the boundary, because they rarely use the words "cancel" or "return." These five utterances cover the boundary:
| Utterance | Expected intent |
|---|---|
| "It arrived yesterday and I don't want it" | return_item |
| "I clicked buy by mistake an hour ago" | cancel_order |
| "Stop the shipment, I found it cheaper" | cancel_order |
| "I don't want this anymore" | clarify |
| "Can I change my delivery address?" | out_of_scope |
The descriptions-only prompt and the demonstration prompt must share the same instructions and the same output constraint. Only the demonstration block may differ:
Classify the customer message into exactly one intent ID.
Use only the definitions below.
[definitions block from above]
Answer with JSON: {"intent_id": "<one of: cancel_order,
return_item, clarify, out_of_scope>"}
Message: {utterance}
The demonstration version inserts labeled examples between the definitions and the message:
Examples:
"Please don't send it, I ordered the wrong size" -> cancel_order
"The box came today but the lamp is broken" -> return_item
"What is your phone number?" -> out_of_scope
The demonstrations must never appear in any test set. Where the API supports it, the output should be constrained to the four IDs, for example with a JSON Schema enum.
Demonstrations change results with their selection and their order, so one run proves little.
Two studies found that few-shot prompts are unstable. Zhao and colleagues found in 2021 that the prompt format, the choice of examples and even their order can move GPT-3 accuracy from near chance to near state-of-the-art. Lu and colleagues found at ACL 2022 that the order of the same examples could decide between near state-of-the-art and near-random results. An order that worked for one model did not reliably transfer to another.
The GPT-3 paper handled this by drawing demonstrations at random for each test example. The ServiceNow study reported results across several random selections, with standard deviations of up to 4.6 points in one experiment. An intent test should do the same, with at least several selections and orders, and it should report the spread as well as the average.
A fair test keeps four utterance sets apart and changes one thing at a time.
The test needs separate pools, and each pool has one job:
- A demonstration pool supplies the examples that go into few-shot prompts.
- A tuning set trains the fine-tuned variant and is never shown to the prompted methods.
- A validation set is used to choose definitions, the number of examples and review thresholds.
- A held-out test set is scored once per method and is never used to make choices.
Near-duplicates must be removed across pools, because "cancel my order" and "cancel my order please" in different sets inflate scores. The held-out set should include rare intents, indirect phrasing, boundary cases such as "I don't want this anymore," and real out-of-scope messages. A 2019 benchmark study by Larson and colleagues found that classifiers that did well in scope struggled to identify out-of-scope queries, so this category needs its own count.
The comparison then runs as a ladder, with one change per step:
- Run the original definitions with no examples.
- Run improved definitions that name each exclusion, still with no examples.
- Add demonstrations to the improved definitions, across several selections and orders.
- Run a ready-made option scorer unchanged, with the same options and test set.
- Run a fine-tuned model as a separate experiment, trained only on the tuning set.
The scorecard needs per-intent and out-of-scope results, not one accuracy number.
Overall accuracy hides the errors that matter in support. The report for each method should include:
- Macro-F1 weights every intent equally, so rare intents count as much as common ones.
- Per-intent recall shows whether
return_itemmessages are being lost tocancel_order. - A confusion matrix shows exactly which pairs are swapped.
- Out-of-scope errors must be counted in both directions, as irrelevant messages accepted and real requests rejected.
- Calibrated review coverage is the share of traffic handled automatically at a confidence threshold that keeps errors below your limit.
- Latency should be reported at the median and the 95th percentile, with token and total cost per thousand messages.
- Variability across demonstration selections should be reported, with failures listed beside improvements.
The thresholds for review coverage should be set on the validation set. OpenAI's Decisions API guide gives the same advice: use labeled examples from your application to set thresholds, based on the cost of false positives and false negatives.
The ablation described here has not been run and published for any public intent set. Nobody has measured how much each step adds on the same data, so a team must run it on its own traffic.
A ready-made option scorer such as TOD belongs in the comparison as an unmodified baseline.
Option scorers take a fixed list of choices and return a probability for each one, which fits intent classification directly. OpenAI's Decisions API returns a choice, a probability per option and a confidence value, and it runs only on gpt-6-luna. Its guide advises a catch-all option such as "other" that can route to a review queue.
Parsec's TOD is another option scorer. Parsec describes it as a "universal decision model" that ranks the next action from a list of allowed actions and generates no free text. Its predict(state, options, question, images) function returns one probability per option, summing to 1. It costs $0.30 per 1,000 decisions, flat for up to 48,000 tokens of context, according to Parsec's TOD page. When it is not confident, a gate passes the turn unchanged to the parent model, whose cost is separate. On the public JevBench test, as reported on Parsec's page, the released model scored slightly below its untrained base model. According to the page, the next release is meant to fix that regression. The page and the repo also give latency figures that differ, on different GPUs.
TOD should be tested as released, with the Hugging Face and repo versions pinned. The release consists of LoRA adapters on google/gemma-4-12B-it plus a ModernBERT-base retriever. The adapters are listed as Apache-2.0, while the base model stays under the Gemma 4 terms, which users must accept. Parsec's separate open-jev repo uses Gemma 3 4B and should not be confused with the TOD release. Neither the TOD page nor its model card mentions demonstrations in the input. Whether adding labeled examples to TOD's state helps has not been measured, so any encoding that you test should be documented. Parsec also tunes decision models for customers at an unpublished price, and a tuned model is a separate experiment.
The choice between zero-shot and few-shot follows the confusions that you measured.
The decision works as a sequence, and most teams can stop early:
- Write stable intent IDs, definitions with exclusions, and
clarifyandout_of_scopeoptions. Run zero-shot on the held-out set. - If a pair such as
cancel_orderandreturn_itemis confused, rewrite those two definitions first and rerun. - If the confusion remains, add a few demonstrations for that pair only, and keep them if the gain holds across several selections.
- If phrasing is very local or the volume is large, test a fine-tuned small model. The ServiceNow study found that a fine-tuned 3B model beat prompted GPT-3 with one example per intent.
- If simple keyword rules already catch an intent reliably, keep the rules for that intent.
Customization of any kind, including fine-tuning and tuned decision models, is justified only by a held-out gain that is larger than the spread across runs.
Examples multiply the input bill, and prompt caching narrows the gap.
List prices make the token cost easy to estimate. Take 1 million messages a month on gpt-6-luna, at $0.10 per million input tokens and $0.50 per million output tokens. Assume 20 intents with about 40 tokens of definition each, 150 tokens of instructions, a 30-token message and a 10-token JSON answer, with reasoning turned off.
- The zero-shot prompt is about 980 input tokens. That is $98 of input and $5 of output, so about $103 a month.
- The few-shot prompt adds 3 examples per intent at about 25 tokens each, or 1,500 tokens. At 2,480 input tokens, the month costs about $253.
- If the fixed part of each prompt is billed at Luna's $0.01 cached rate, zero-shot falls to about $17.50 and few-shot to about $32.50.
At the uncached rate, TOD's flat fee of $0.30 per 1,000 decisions equals about 3,000 Luna input tokens per decision. TOD would cost about $300 for the same million messages, before parent-model costs for turns that it defers. Its flat price becomes cheaper than uncached Luna input only for prompts above about 3,000 tokens. Curating demonstrations also costs labeling time, and that cost has not been measured in any of these sources.
Intent scoring is only the first of three steps in handling a request.
A correct return_item label does not identify which order or which item the customer means. That is slot or argument resolution, and it needs its own data and its own tests. Issuing the return label or the refund is action execution, which needs permission checks and confirmation.
An evaluation of zero-shot and few-shot intent classification measures only the first step. A method that wins on intent labels still has to pass the slot and action tests before it handles real orders.
Sources
- Brown et al., Language Models are Few-Shot Learners: https://arxiv.org/abs/2005.14165
- Parikh et al., Exploring Zero and Few-shot Techniques for Intent Classification: https://aclanthology.org/2023.acl-industry.71/
- Parikh et al., full paper (PDF): https://aclanthology.org/2023.acl-industry.71.pdf
- Hong et al., Exploring the Use of Natural Language Descriptions of Intents: https://aclanthology.org/2024.sigdial-1.39/
- Zhao et al., Calibrate Before Use: https://arxiv.org/abs/2102.09690
- Lu et al., Fantastically Ordered Prompts: https://aclanthology.org/2022.acl-long.556/
- Larson et al., An Evaluation Dataset for Intent Classification and Out-of-Scope Prediction: https://aclanthology.org/D19-1131/
- OpenAI, GPT-6 Luna model page: https://developers.openai.com/api/docs/models/gpt-6-luna
- OpenAI, Decisions API guide: https://developers.openai.com/api/docs/guides/decisions
- Parsec, TOD: https://parseclab.ai/tod/
- Parsec, TOD model card: https://huggingface.co/parsecai/tod
- Parsec, TOD repository: https://github.com/daseinlabs/tod
- Parsec, open-jev repository: https://github.com/daseinlabs/open-jev
- Parsec, Decision models: https://parseclab.ai/solutions/decision-models/