AT&T AutoClassify: Unified Multi-Head Binary Classification From Unlabeled Text
Summary
- Cost-efficient approach: AT&T AutoClassify demonstrates how to reduce LLM classification costs by 1,000x using knowledge distillation and open-source LLMs instead of expensive proprietary models for multi-head binary text classification.
- End-to-end automation: This video shows an automated system that starts with unlabeled text and desired labels, then mines relevant examples, fine-tunes embedding models, and trains individual classifier heads on the Databricks Data and AI platform.
- Real-world impact: This video includes a practical use case with call transcripts, demonstrating how organizations can extract key insights from natural language data while maintaining cost efficiency and performance parity with proprietary solutions.
AT&T AutoClassify: Unified Multi-Head Binary Classification From Unlabeled Text

Talk by Colton Peltier, Staff Data Scientist, Databricks ; Hien Lam, Senior Data Scientist, AT&T
We present AT&T AutoClassify, built jointly between AT&T's Chief Data Office (CDO) and Databricks professional services, a novel end-to-end system for automatic multi-head binary classifications from unlabeled text data. Our approach automates the challenge of creating labeled datasets and training multi-head binary classifiers with minimal human intervention. Starting only from a corpus of unlabeled text and a list of desired labels, AT&T AutoClassify leverages advanced natural language processing techniques to automatically mine relevant examples from raw text, fine-tune embedding models and train individual classifier heads for multiple true/false labels. This solution can reduce LLM classification costs by 1,000x, making it an efficient solution in operational costs. The end result is a highly optimized and low-cost model servable in Databricks capable of taking raw text and producing multiple binary classifications. An example use case using call transcripts will be examined.
Databricks Named a Leader in the 2025 Gartner® Magic Quadrant™ for Data Science and Machine Learning Platforms: https://www.databricks.com/blog/databricks-named-leader-2025-gartner-magic-quadrant-data-science-and-machine-learning
Build and deploy quality AI agent systems: https://www.databricks.com/product/artificial-intelligence
See all the product announcements from Data + AI Summit: https://www.databricks.com/events/dataaisummit-2025-announcements
Chapters
0:00Introduction and agenda2:00Problem and solution overview5:34System architecture8:04Data mining and curation14:52Embedding model training16:10Classifier training17:50Label auditing19:56Results and conclusion
FAQs
How does AT&T AutoClassify reduce LLM costs?
By using knowledge distillation with open-source LLMs instead of expensive proprietary models, AT&T AutoClassify achieves the same classification performance at a fraction of the cost, reducing expenses by up to 1,000x.
What is the complete workflow for this system?
The system starts with unlabeled text and a list of desired classification labels. It automatically mines relevant examples, fine-tunes embedding models, and trains individual binary classifier heads, all manageable on the Databricks Data and AI platform.
What makes multi-head binary classification useful?
Multi-head binary classification enables simultaneous true/false decisions across multiple dimensions. For call transcripts, this might detect sentiment, product issues, customer churn indicators, and other key insights in a single pass.
Can this approach handle domain-specific language?
Yes, the system is designed to work with domain-specific unlabeled text like call transcripts. By fine-tuning on your specific data, it learns the nuances of your industry while maintaining cost efficiency.
Full transcript
0:00 Introduction and agenda
Hello everyone. Uh alongside Colton Peltier. Uh welcome to our talk AT&T autocl classify unified multi-head binary classification from unlabelled text. That's a lot of words but uh essentially we want to um extract key information from natural language unstructured text. Um I think how some companies are doing it nowadays is they use um an a closed source LLM um such as UBC4 from OpenAI or Cloud from Enthropic to do the classification.
Um we're all aware of how impressive these uh proprietary LLM are uh with their ability to understand and generate text. Um but that performance comes at uh comes with limitations notably high cost and um very long processing time. And so um today Colton and I will demonstrate how we can leverage an open- source LLM to do knowledge distillation to build and train um small economical ML models um with the same performance but um much cheaper costs.
So on the agenda for today uh we'll do brief um team introduction. We'll go into our problem statement. um we'll in we'll introduce our use case um our methodology results and conclude with key takeaways um and real world impact. So I guess I'll start. I'm I'm a senior data scientist at&T in the chief data office. I've been here for about three years and um the bulk of my work recently has been in the geni space namely how can we reproduce um our work using proprietary models with open source models um without a performance hit.
Hey everyone. I'm a staff data scientist at Data Bricks. I work in professional services. So, I partner with our customers and work hands-on to help build some cutting edge ML stuff. So, in this case, partnered up with AT&T to build the systems you'll see here today. Um, okay. So, again, we'll introduce our potential use cases, dive into our um practical use case that we're working on um completing to uh production. We'll go over our previous solution um that was in production about a year and a half ago and then how our solution is better.
2:00 Problem and solution overview
So AT&T has accumulated an extensive amount of uh natural language unstructured uh data. So that could span from product documentation uh sales customer transcripts, customer care, call transcripts. Um, if we were to build a performant a IML system, we can tap into that data to extract and act on key insights systematically such as uh reducing churn, boosting sales, uh identifying customer uh sentiments or identifying um product pain points.
So we have an example here uh sales call transcripts. So um was there a product that the sales agent um suggests to the customer? Are there certain products that the customers are excited about? what is their sentiment around those products? Um an example in customer care um call transcripts is did the customer ask about a certain product? Um are there certain issues that the c uh customers are complaining about? Um that way we can retroactively um work on those problems before they become a big deal.
Um and other uh text data that we have of course includes product documentation, user manuals, um what have you. So in this um particular use case is um we're working on customer care call transcripts. So AT&T receives over 70 million calls annually to our call centers. Those calls are um recorded, transcribed and summarized. Essentially we want to um conduct multilabel classification task with over 80 distinct binary categories on those transcripts and those categories will span customer service and support issues.
So some examples here is customers moving and need assistance, customer mentions a competitor, customer experiences Wi-Fi issues. So we have three examples here, but if you can imagine um there'll be 80 of those categories that we want to label yes, no, true, false for every single given transcript. Uh these labels are important because um we store them uh downstream and teams that are working on uh churn propensity models use our outputs as features for their um churn models.
In this particular use case, we're able to save over 50,000 uh customers annually. So in our previous solution um like I mentioned in the beginning, we just use u GBD4. we use a proprietary LLM to classify each uh text um for every desired label. So if you can imagine um you know we have GPT4 we have the system prompt where we give it um the personality we have the user prompt of uh the instructions we want the along to um to do we have the summary of the transcript and we have the descriptions of all 80 of those labels.
That's a lot of tokens um to be processed and we're expecting a lot of tokens coming out. um success factors for this use case is that um it was performant enough. It met a baseline F2 score um and it was relatively easy to set up. It's just you know one API call for every single summary of the transcript and we save 50,000 customers annually but the limitations is very great um such that the cost is uh very very expensive and it takes a very long time to inference.
Um again we talk about the tokens coming in um and coming out. So for our optimized solution we want you to distill a strong large language model um and its ability to classify into a uh and build training data and uh train that into our small classifier. So um essentially we want to have just a full transcript. So here we're not it's a full transcript and not a summary like in the previous solution. We want to send that full transcript into the classifier and have it output yes, no, true, false predictions um for every single uh label success factors.
5:34 System architecture
Here we expect a higher F2 score um because we have all the information in the full transcript. Whereas with the summaries, it is a bit lossy. Uh we do expect some information um gets lost from the transcript to the summary. Uh because these classifiers are very very small, we do expect a much uh lower cost and uh faster uh processing speed. Some considerations uh the setup is extremely complex and Colton will go over that.
And we also start with zero label data. So we just have full transcripts and we want to go um we want to retrieve uh yes, no, true, false outputs. So in our architecture, we have two um I guess uh stars. We start off with a fine-tune embedding model and that's going to generate embeddings for every single transcript and then we also have uh individually trained classifier heads. So basically one specialized head um for every label that it's um it was trained on.
So looking at the architecture on the right hand side we have um the full transcripts coming in. It's going to be processed by our prime student embedding model which is going to generate um dense vector representations um for every single transcript and then those transcripts go into our multi-head classifier where each um head is going to predict yes no true false for um for every given vector and we expect the output to be a binary classification vector.
Um looking at the snippet of code, we have a uh sentence bird model. It's going to encode the uh text. So here is a full um full transcript. We want the tensors to come back. We want to normalize the embeddings. We want the tensors to um to move to GPU. On the second line, we are turning off um gradient calculation. And on line three, we have the conglomerate model, which is a multi head classifier. is going to input um it's going to take the embeddings as input and uh output the uh yes no true false um predictions for every given label and then I'll pass it off to uh to Colton.
Cool. So we'll talk a bit about like how do we get the data. So you know mentioned that we're starting with a completely unlabelled data set. So we'll talk about how do we get the data. We'll talk about how we fine-tune the embedding model. How do we claim train the classifiers? And then how do we audit the labels and make sure that what we're getting is correct. You know, mentioned that the setup was complex for this.
8:04 Data mining and curation
And that's true. And so the goal was to build a pipeline that automates that complex setup so that we can run this again and again for different corpuses of text. The really only inputs that are coming into this pipeline are your unlabeled text data and which binary labels you want to classify and it does the rest of the work for you. So we'll start by talking about the data mining portion here. So we have a couple options here to generate the labels for this data.
If we want to train an embedding model and if we want to train classifiers, we do need labels. So one option is to do the same sort of setup that we were doing for GPD before, right? So maybe we take every single transcript that comes in. We we grab a sample of them, a few million. We grab all of our binary labels we want and then we run through every single transcript and we classify all of them, right? Like this is totally possible.
You're going to have the same constraints you had on the previous inference solution and that it's going to take a long time. It's going to be very expensive, but it's totally doable. And Llama 3. 2 and 3. 3 have very permissive licenses. You're allowed to reuse the data that comes out of them to train other models. So Llama's a great candidate to use here for training our smaller classifiers. But we didn't want to spend all that money.
So we wanted to come up with an optimized solution. So what we did instead was we took all our transcripts and that's what you see up there that says in documents that is our transcripts coming in and we embedded them into data bricks vector search. So we computed embeddings for every transcript. We put them into a vector store and then we took all of our binary labels. These can be things like you know the customer complained about Wi-Fi quality or customer wants to upgrade their iPhone. and we use those to look up the best matches of transcripts for those labels from vector search.
So essentially what we're doing here is we're passing a label in like user wants to upgrade iPhone and it's returning to us the transcripts of calls that are close in embedding skate in embedding space to that label. So we call these candidates. These are candidates for us to then go label with llama. You can see a bit at the bottom down here how much we saved in terms of labeling. um if we would have ran you know three million transcripts across 50 labels um just every single one getting labeled it would have been 150 million labeling prompts for us it's kind of covered up by the text there we ended up with about 500,000 so a big savings there um and the goal here is that we found a lot of data we can now go and label and use to train our classifiers so let's talk a bit about what data we're actually getting with this right because we're getting data that's close in embedding space to our labels So we really want to make sure our data is representative of all the calls that are coming in.
And so we've separated into four quadrants here. There is hard, there's positive and negative, and that's whether a label is true about a particular transcript. And then there's easy and hard. Easy means that the embedding space already has that uh transcript very close to the proper label. So, if you look up um user wants to upgrade their iPhone and a transcript comes back that immediately that's someone talking about upgrading their iPhone, that's an easy positive.
That's great. Um but the other quadrants are important as well. We also get hard negatives. So, if you look up user wants to upgrade the iPhone and a transcript comes back that's close but it's not talking about upgrading their iPhone, that's what we're calling a hard negative. But we don't get hard positives. So, these are positives that are far away in embedding space. These would be great for fine-tuning, great for training our classifiers.
We also don't get hard negatives or I'm sorry, easy negatives. Easy negatives are examples where it's it's very untrue what you're trying to look up the label about the transcript and it's very far in embedding space. These are not coming back to us from vector search because we're just looking in the immediate area of our label. So let's talk about how we fix those two quadrants to sort of balance our data set here.
So what I've done here is I've compressed um you know our our 768 dimension embedding vector down to two two dimensions and the white vector here represents a label something like user wants to upgrade their iPhone and then each of those dots is a transcript. So a green dot is a transcript where that label is true and a red dot is a transcript where that label is false. So there's probably some negatives up there. Those are the hard negatives.
There's some positives up there which are easy positives. And actually to get easy negatives, it's pretty easy easy to do. You can uh just multiply that white vector by negative one and just look in the other direction. Right? So you should find lots of examples out here of just completely uh transcripts talking about something totally different than what your label was. There could be some hard positives there, but it seems unlikely.
So how do we find the hard positives? So what we do is we actually look at all of our labels that we've gone through. So we get the candidates, we pass them through llama, we get labels out at the end, and we look for the um the true examples we could find that are the furthest away from our vector of our label. Then what we do is we perform miniature searches in those areas. So we'll search a little bit further in that area where we found a hard positive and we'll find more examples of hard positives.
And then we'll do the same. We sort of iterate around in the embedding space looking for more examples of hard positives. Great. So, we've sort of balanced it here. We've gotten data from all four quadrants and we're ready to move into fine-tuning. This is just a screenshot here of our for loop that loops through each of the labels that have been defined. Again, a label is something like user complains about some specific issue.
And you can see what we have here is we go through vector search for the easy positives and hard negatives. This is a piece I haven't mentioned yet. Uh and this is regx search. So we do allow the config file to specify regular expressions. And this allows you to do some sort of keyword search to find candidates. So you can imagine if someone says user wants to upgrade the iPhone, you might want to find all the transcripts that talk about iPhones and just go ahead and label them.
So this allows you just to specify a keyword like iPhone and it'll pull those for you. One piece you don't see here is the hard positives and that's because we actually have to finish this step, compute all the labels and then find the hardest positives to do those many searches. So that actually comes later on. Cool. So we have labeled data. Let's talk about how we fine-tune the models. So we're using an espert model sentence transformer and we're preparing our data to use cosine similarity loss.
14:52 Embedding model training
Now cosine similarity loss is treating each label and transcript as a vector. And what we're trying to do is minimize the angular distance between those vectors if that label is true and maximize that angular distance if that label is false. So cosine uh similarity is a value of one if the vectors are aligned. Um and so that's what we're trying to do is move those those uh vectors closer together for true true true examples.
And so you can see sort of here like what our data looks like. uh we have each row will have a transcript in one column, a label in another column, and then a one or a zero depending whether or not we found that label to be true in our labeling process. This is an example of what the code actually looks like that's doing the training. Um we'd use torch distributor to distributed across multiGPUs. So we're using four A100s here to do the training.
Uh but you can see we we load our sentence transformer, our loss function, our training arguments, and then we call train uh which is wrapped by torch distributor. So we've got our sentence transformer trained which is hopefully better at segmenting the space now and embedding space for making labels be close to transcripts that are true and far away for those that are false. And now we're ready to train the classifier heads themselves.
16:10 Classifier training
So if you think about these labels we've talked about, you're going to have very different positive rates of labels, right? So a lot of users probably call in asking to upgrade iPhones. Probably not a lot call in asking about port forwarding on their modem or router, right? So those might be very low incidence of positives. You may not have as many examples. Uh whereas iPhone examples, you might have tons. So one of the benefits of training these classifiers independently is we're able to use as much data as we want for individual classifiers.
So if you have lots of examples, that's awesome. If you don't have as many, that's okay. Um, it helps us balance the data set because each classifier is completely independent. So we we we grab all the data, we uh we grab the label data, and we do a hyperparameter sweep across our classifier heads as we train. And I'll show you some of the parameters we look at for that. So this is a code snippet of our uh hyperparameter sweep.
So you can see sort of the things we're looking at. We tune for batch size, learning rate, um, and inside the classifiers. These are just torch classifiers. We can vary the number of layers, the dropout rate, and so on. This is all logged into MLflow as nested runs for each classifier. So you'll have in ML flow, you'll have one run that says user wants to upgrade iPhone. You can click the expander next to it and you'll have all of the hyperparameter tuning runs underneath.
And it's easy for us to select the best one. So let's talk about this step called label auditing. So this actually this this idea is to approach something we noticed from the previous solution with GPD4 which was there was some labels that GPD4 got systematically wrong. Right? So there's some labels where you know it does a great job and there's others where it's just like ba maybe based on the wording we use for our label um or maybe the wording used in the transcript it doesn't get the label quite correct.
17:50 Label auditing
So we want to catch those and improve on that. And so what we're actually doing here is we're grabbing all of our data we used for training and we're running it through the classifiers that we've trained and we're looking for any place where our fine-tuned embedding model and classifier combined can still not get the right label. Right? So that's what we call a discrepancy. Um and what we do then is we go and we do a more complex chain of thought prompting with DSPI to resolve those discrepancies.
So we we our prompt is something like you're a senior AT&T um analyst and you're you know resolving a dispute between two junior analysts who disagree on this label of this transcript and we have DSPI uh dictate a concise chain of thought and then a final verdict for the label. And so this allows us to sort of iterate on the labels over time and improve them. And so here's a screenshot of what that actual inference looks like.
We're using AI query which is a built-in data bricks function which performs batch inference on LLM. So we've created a column called formatted prompt that has that whole AT&T analyst thing in it. Um and then we use AI query to pass it to Llama and get back the uh the classifications with the reasoning. Um and we do some manual auditing of that reasoning as well. So we pull a subset of it and you can look at it and make sure you agree with the reasoning that llama's giving you and the change of the label.
And you can see as well, you can specify things like the number of tokens that you want out. Uh you can also do things like temperature here. If you're interested in AI query, I'm giving a talk tomorrow on that. So um come check that out. And I'll hand this back to for results. Thank you. Um yeah, so we had a separate uh hold out test set um to do our final final evaluation. um this test set, we use llama 370B uh with train of thought prompting um just like Colton talked about in the previous slide to get our um source of truth.
19:56 Results and conclusion
Um so with that as our source of truth, we ran the full transcripts through GPT4. Um and we saw an F2 score, an average F2 score of 0. 56 for all 80 labels. Um using the same transcript in our optimized solution, we actually got an F2 score um an average F2 score of 79. Um we also observed median improvement of 24% over GBT4 which means that um any u particular label that we had saw a 24% F2 improvement over uh the previous solution.
Um we dug into the disagreements for um the classifiers versus the source of truth and we saw that there were not um there were very marginal percentage of disagreement for uh each given label. And lastly, when uh we say comparable complex reasoning, we found that the um the classifiers produce results that are similar to what a complex reasoning um model would do. Um and lastly, key takeaways. So, in our previous solution to inference 240,000 transcripts, it took almost a whole day to do that and we can see that it cost um quite a pretty penny.
But in our optimized solution, for the same number of transcripts and um just three T4 GPUs, we were able to inference um under one hour a day at um less than $100 a month. So around 3,500 um fold of cost reduction. Um because of these results, we can optimize the GPUs uh with maybe more more T4s or an A100 to do real time uh inferencing. Um so that uh caps it for us. Thank you for attending. Um special thanks to data bricks and colton for solutioning this with us.
Uh it's quite been a a learning journey. Thank you.
Learn more about the Databricks Data and AI platform.
The information provided herein is for general informational purposes only and may not reflect the most current product capabilities or configurations.