Fine-Tuning for Intent Classification: When AutoTrain, Foundry CLU or Comprehend Beats a Tuned LLM
Most intent routers need a small classifier with a fixed label set, tested against an untuned baseline. Here is how the main fine-tuning services differ, and how to decide which one fits.
For fine-tuning an intent classifier on labeled utterances, start with Hugging Face AutoTrain if you want to own and host the model. Choose Microsoft Foundry conversational language understanding (CLU) if you need intents and entities from one managed service, or Amazon Comprehend custom classification if you already run on AWS. Turn to LLM fine-tuning on Together AI or Google's Gemini supervised tuning only when the right intent depends on long conversational context. OpenAI's fine-tuning platform is closed to new users. Whichever service you pick, it should beat an untuned baseline on the same held-out test set before anyone calls the tuning a success.
An intent classifier maps one utterance to one label from a fixed list
Intent classification takes a message such as "Where is my package?" and assigns it to one label, such as track_order, from a list that you define. The label then decides which flow, team or tool handles the request. That is a narrower job than generating text, and it changes what a good service looks like.
Three separate jobs often get bundled together under the name "intent recognition", and keeping them apart makes every later decision easier:
- Choosing the intent decides which branch of the application runs.
- Extracting entities, such as an order number or a city, fills in the details that the branch needs.
- Executing the action, such as issuing a refund, happens in your own code after the first two steps.
Microsoft draws the same line in its CLU documentation. It says that CLU predicts the intention of an utterance and extracts information from it, but "doesn't perform any actions." A fine-tuning service should be judged on the first job, and on the second job only if you need it. No classifier should be trusted with the third.
Four kinds of model can do the job, and an untuned option comes first
The services differ mainly in what sort of model they train. Before choosing among them, test whether you need training at all. A short list of keyword rules can handle a handful of very distinct intents. CLU also offers an LLM-powered Quick Deploy path. It uses Azure OpenAI to predict intents from written intent descriptions instead of from labeled training data.
If rules and untuned options fall short, these are the four routes:
| Route | How it works | Example services |
|---|---|---|
| Fixed-label classifier | Fine-tunes a small encoder to output one of your labels | AutoTrain, Comprehend custom classification |
| Intent-and-entity service | Trains intents and entities together, with a None intent built in | Foundry CLU |
| Candidate-scoring model | Scores a supplied list of options and returns a probability for each | openjev-sdk, TOD |
| Fine-tuned LLM | Tunes a generative model to output a short label | Together, Gemini supervised tuning |
A fixed-label classifier is the natural default for a support router with stable intents. AutoTrain accepts a CSV or JSONL file with a text column and a target column. Its example configuration fine-tunes google-bert/bert-base-uncased, and the same settings run on your own machine or on Hugging Face Spaces. Comprehend does a similar job as a managed AWS service. AWS's own example of custom classification is sorting support requests "so that you can route the request to the proper support team."
An intent-and-entity service fits when the branch needs details as well as a label. CLU trains both from one labeled set and returns a confidence score from 0.0 to 1.0 for each intent.
A candidate-scoring model treats the list of allowed intents as an input, rather than fixing it at training time. That route suits applications where the allowed actions change with the state of the conversation.
A fine-tuned LLM is the route for intents that depend on several turns of context. Google lists classification as a supervised tuning use case where "the expected response is a specific word or phrase." Together offers LoRA and full fine-tuning of open models. These options cost more to serve than a small encoder, so they need a measured reason.
The right route depends on the team's situation:
- A team with stable intents and its own hosting should try AutoTrain first.
- A team that needs entities and a managed endpoint should test CLU on Foundry.
- An AWS team that wants to avoid hosting should price Comprehend with its per-second endpoint charge in mind.
- A team whose intents depend on many turns of context should test a tuned Gemini or Together model against a small classifier. It should keep the small classifier if the gap is within its acceptance criteria.
A training dataset needs a schema that prevents leakage between splits
The quality of the labeled data matters more than the choice of service. A workable schema stores one utterance per row, with fields that let you split and audit the data:
{"conversation_id": "c-1042", "turn": 1, "text": "where is my package", "intent": "track_order", "split": "train"}
{"conversation_id": "c-1042", "turn": 3, "text": "can I change the address", "intent": "change_address", "split": "train"}
{"conversation_id": "c-2177", "turn": 1, "text": "I want to buy a book", "intent": "none", "split": "test"}
{"conversation_id": "c-2310", "turn": 2, "text": "it was charged twice", "intent": "billing_dispute", "split": "validation"}
Each field in that schema controls a specific risk:
- Assigning the split by
conversation_idkeeps every turn of one conversation in the same split, so that near-identical phrasing in a single chat cannot leak from training into testing. - Adding a
nonelabel for out-of-scope messages teaches the model to reject requests that match no intent. Microsoft suggests adding likely false positives here, such as "I want to buy a book" in a flight-booking project. - Tracking counts per intent exposes class imbalance. Microsoft's CLU guidance warns that an intent with fewer than 15 labeled training examples can lead to lower accuracy.
- Keeping entities in a separate field or file stops entity labels from changing the intent task. CLU's own utterance format stores entities as a separate list with an
offsetand alength. - Marking ambiguous utterances for review, rather than forcing a label, keeps the test set clean. Microsoft recommends merging intents that the confusion matrix shows as too close together.
The services map onto this schema with small changes. AutoTrain wants separate train and valid files with text and target columns. CLU wants a dataset value of Train or Test on each utterance. CLU can also split the data automatically, with a recommended 80/20 ratio. Microsoft warns that the automatic split chooses the test set at random, so results can change between training runs. A manual split keeps the comparison fair.
A shared held-out test decides whether tuning was worth it
Every candidate, including the untuned baseline, should be scored on the same frozen test set. Plain accuracy can hide failures on rare intents, so the plan needs several numbers:
- Measure macro-F1, which averages F1 equally across intents, so that frequent intents cannot hide weak rare ones.
- Report recall for each intent, especially for intents with a high cost of error such as cancellations.
- Read the confusion matrix to find pairs of intents that the model mixes up.
- Score out-of-scope rejection on held-out
noneexamples. - Check calibration, meaning whether a confidence of 0.8 is right about 80 percent of the time. The openjev-sdk computes a 10-bin expected calibration error for this purpose.
- Record deferral coverage, meaning the share of traffic that the model handles above your confidence threshold, and its accuracy on that share.
- Measure latency and serving cost at your expected traffic.
One CLU detail matters for step 4. Microsoft says in its documentation that the None score threshold "isn't applied" during evaluation of the test set. Out-of-scope rejection with the threshold that you will use in production therefore has to be measured separately. Training modes also calibrate scores differently, according to Microsoft, so a threshold should be set again after switching modes.
No published comparison measures these services against each other on the same intent dataset. That is why the measurement belongs in your plan, not in a vendor's marketing.
Deployment terms decide what you can take with you
The services differ most sharply in who holds the trained model. AutoTrain runs locally or on Spaces and can push the model to the Hugging Face Hub, so the files are yours to host. CLU and Comprehend keep the model inside their cloud. Comprehend bills a real-time endpoint for every second that it runs, even when it receives no requests.
List prices show how much the hosting choice changes the monthly bill. AWS charges $0.0005 per second for each inference unit on a Comprehend endpoint, so one unit running for a 30-day month costs $1,296.00. One unit handles 100 characters per second, which is about 2.59 million 100-character requests a month at a perfectly even rate. A dedicated H100 endpoint on Together costs $5.49 per hour, or $3,952.80 for the same 720 hours. Training costs far less than serving. Ten thousand examples of about 60 tokens, trained for three epochs, come to 1.8 million tokens. At Together's listed rates that costs less than a dollar, so its $4.00 minimum charge per job applies. Whether one H100 is needed for this traffic has not been measured.
Lifecycle dates also belong in procurement. Microsoft says that CLU "retires from Azure Language on March 31, 2029" and directs all new projects to Microsoft Foundry. OpenAI says that its fine-tuning platform is "no longer accessible to new users." Its eligible existing customers can create training jobs until January 6, 2027, unless the base model shuts down earlier. Both notices were current on November 24, 2026. Recheck them on the date that you sign, because they change.
For self-hosted routes, the base model's licence becomes your licence. ModernBERT-large, the default encoder in openjev-sdk, is released under Apache 2.0. TOD's adapters require you to accept Google's Gemma 4 licence before the base model downloads.
The open-source decision-model SDK offers three distinct training routes
Parsec, a small language model lab, publishes two pieces of code that are relevant to candidate scoring. The open-jev repository holds openjev-sdk, MIT-licensed, at version 0.5.0 as of a November 2, 2026 commit. It offers three different training methods that should not be confused:
- Training with
--method encoderfully fine-tunes a Hugging Face encoder, ModernBERT-large by default, on GPUs and then serves it on CPU. - Training with
--method head, the default, fits small heads on a frozen Gemma 3 4B model. - Training with
--method todfine-tunes TOD with LoRA on an NVIDIA GPU with at least 40 GB of memory.
TOD itself is a hosted decision model that ranks the next action from a supplied list and passes unsure turns to a larger model. According to Parsec's TOD page, it costs $0.30 per 1,000 decisions. On the same page, Parsec puts TOD at 84.4 percent accuracy on the public JevBench test, against 86.2 percent for its untrained base model. Parsec says that it plans to recover that regression in its next release. The SDK is code that anyone can run. Parsec publishes no price, service level or deployment options for its separate decision-model service, which tunes models on a customer's own decisions.
Who owns each part of the work should be written down before training starts
Whether you use a managed service, a consultant or your own team, an intent-classification project has the same deliverables. Agreeing on who produces each one avoids disputes about scope later:
- Writing the label guide defines each intent, the
noneboundary and the rules for ambiguous cases. - Preparing the dataset covers collection, labeling, deduplication and the conversation-level split.
- Running the untuned baseline produces the numbers that any tuned model must beat.
- Training the candidates includes at least one small classifier, even when an LLM is also tested.
- Producing the evaluation report covers every metric in the evaluation plan on the frozen test set.
- Agreeing the acceptance criteria fixes, before training, the minimum macro-F1, per-intent recall and out-of-scope rejection.
- Delivering the integration covers the endpoint or model files, the confidence threshold, the fallback path and a retraining schedule.
Sources
- Hugging Face, AutoTrain text classification: https://huggingface.co/docs/autotrain/en/tasks/text_classification
- Microsoft Learn, Conversational language understanding overview: https://learn.microsoft.com/en-us/azure/cognitive-services/language-service/conversational-language-understanding/overview
- Microsoft Learn, Build, train and deploy a CLU model: https://learn.microsoft.com/en-us/azure/ai-services/language-service/conversational-language-understanding/how-to/train-model?tabs=language-studio
- Microsoft Learn, CLU model concepts (evaluation metrics, None intent, data formats): https://learn.microsoft.com/en-us/azure/ai-services/language-service/conversational-language-understanding/concepts/evaluation-metrics
- AWS, Amazon Comprehend Custom: https://docs.aws.amazon.com/comprehend/latest/dg/concepts-custom.html
- AWS, Custom classification: https://docs.aws.amazon.com/comprehend/latest/dg/how-document-classification.html
- AWS, Amazon Comprehend pricing: https://aws.amazon.com/comprehend/pricing/
- Together AI, Pricing: https://www.together.ai/pricing
- Together AI, Fine-tuning support: https://support.together.ai/articles/9182896526-together-fine-tuning-support
- Google Cloud, About supervised fine-tuning for Gemini models: https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/tuning/supervised-tuning?hl=en
- OpenAI, Supervised fine-tuning: https://developers.openai.com/api/docs/guides/supervised-fine-tuning
- Hugging Face, ModernBERT-large: https://huggingface.co/answerdotai/ModernBERT-large
- open-jev repository: https://github.com/daseinlabs/open-jev
- open-jev pyproject.toml: https://github.com/daseinlabs/open-jev/blob/main/pyproject.toml
- TOD repository: https://github.com/daseinlabs/tod
- Parsec, TOD: https://parseclab.ai/tod/
- Parsec, Decision models: https://parseclab.ai/solutions/decision-models/