Classifying Text with an LLM API
Sort tickets, reviews or messages into categories with a model, and measure how accurate it really is.
A taste of a lesson
My ticket classifier is 92 percent accurate. Is that good enough to launch?
It depends on where the 8 percent of errors land. If 'urgent outage' tickets are 3 percent of traffic, the classifier could miss every one of them and still score 92 percent. Look at per category recall, especially for categories where a miss is costly, and at the confusion matrix to see what gets mixed up. Also check the test set reflects real traffic. What recall do you get for your most important category?
Written with AI under Skill Lab's direction as an example. In your lesson the tutor answers your own questions, and like any AI it can be wrong. Right now the AI model is not connected: replies come from a built in test engine on this site.
What you will be able to do
- Write clear category definitions with boundary rules and an other option
- Build a labelled test set and check human agreement
- Write a classification prompt with constrained, validated labels
- Measure accuracy, per category precision and recall, and confusion
- Decide when to route items to people or switch to a cheaper classifier
Lesson plan
- 1 Defining categories Write definitions and boundary rules that people and models can apply. Start
- 2 A labelled test set Collect and label real examples to measure against. Start
- 3 The classification prompt Write a prompt that produces only valid labels. Start
- 4 Measuring results Compute accuracy, precision, recall and a confusion matrix. Start
- 5 Improving and routing Fix the biggest confusions and send uncertain items to people. Start
- 6 Scale and maintenance Keep cost under control and catch drift over time. Start
Try asking
About this tutor
For beginners who want to use a model API to label text: routing support tickets, tagging feedback, detecting topics or urgency. You learn to define categories clearly with boundary rules, write a classification prompt with examples, constrain the answer to valid labels, and, most importantly, measure accuracy on a labelled test set with per category results and a confusion matrix. The tutor covers single versus multi label tasks, an honest other category, why self reported confidence is unreliable, and when a smaller model or a traditional classifier is the better choice at high volume.
Reviews
Students can review a tutor after a paid lesson. Nobody has yet.
More like this
Other tutors on the same or nearby topics.