Skip to content
Français

Text Classification and Routing: Send Each Message to the Right Place

Send every support message to the right team, with a priority, in English and French. Compare rules, classical models, embeddings, a fine-tuned encoder, zero-shot models and LLMs on one test set and one cost table, send the unsure messages to a person, and run the router as a small service.

Read every lesson as a guest, or sign in to enroll and track your progress.

Is this the right course for you?What this course covers and does not cover, and 4 courses to take for other needs.

This course teaches text classification as a business system: labels and labelling guidelines, rules, TF-IDF models, sentence embeddings, a small fine-tuned encoder, zero-shot models and LLM classifiers compared on the same messages and the same costs, decision models, cascades and distillation, rare classes and messages with two labels, confidence zones with a person in the loop, and a routing service that watches for new topics. It does not teach how transformers work inside, how to build an LLM application from the start, or how to build an evaluation platform.

Take another course if you want to:

What you'll learn

By the end of this course, you will be able to:

  • Turn a routing need into a labelling scheme (teams, topics, priority, multi-label or hierarchy) with written guidelines, and state the cost of each kind of mistake.
  • Build and compare rules, classical models, embedding models, a fine-tuned small encoder, zero-shot models and LLM classifiers on the same data, and explain why each wins or loses.
  • Choose a method or a cascade by business cost: accuracy by class, cost per 1,000 messages, speed, privacy and maintenance.
  • Handle real label problems: class imbalance, rare classes, noisy labels and few labels (active learning and LLM-assisted labelling with review).
  • Use confidence to decide automatically, ask for review or send to a person, and measure the work this saves and creates.
  • Run a classifier in production: version labels and models, find drift and new topics, and retrain or add a label safely.

About this course

A customer asked for a refund. The message went to the product team’s queue, where nobody answers refunds, and it waited three days. The customer did not wait: they left. Larkfield’s inbox gets messages by email, chat and social media, in English and French, and each one must reach the right team.

In this course, you follow Priya, Larkfield’s data scientist, as she builds the router with Grace, who runs the support teams, and Chloé, who labels the messages. You start with the labels and the cost of each mistake. Then you compare keyword rules, classical models, embeddings, a small model fine-tuned on a laptop, zero-shot models and large language models, on the same messages and the same cost table. Sometimes the old method wins, and you learn why.

Then you use confidence. The router decides when it is sure, asks for a review when it is not, and sends some messages straight to a person. You finish with a small routing service that keeps versions, writes a review queue and finds a new topic when Omar launches a new product.

The Larkfield inbox is synthetic: we made it for this course, with the problems that real messages have. Every model answer that needs an account was recorded once, so you need no key and no money. Every notebook runs on a laptop CPU or on free Colab.

Before you start

You completed Machine Learning, From Problem to Reliable Model, or you have the same skills. You can read and change Python code in a notebook, you can read JSON, and you know train, validation and test sets, precision and recall, and thresholds. The LLM API, deep learning and evaluation courses help but are not required. You need a free Google or Kaggle account for the notebooks, or Python 3.12 on your computer. You need no key and no money.

Courses to take first: Machine Learning: From Problem to Reliable Model.

Who this is for

ML and AI engineers, data scientists and backend developers who must sort incoming text, such as support messages, emails, chat messages, forms or reviews, into teams, topics, priorities or actions.

How we made this course

Experienced AI practitioners designed this course. AI helped us draft the content; people chose the teaching approach and the examples, and reviewed every lesson. The outputs that you see are the actual results of running the code. How we make our courses

Inside the course

Final module · choose at least oneCase studies

4 case studies

Four end-to-end case studies on real open data. Banking questions, requests that a bot cannot handle, requests in English and French with few labels, and research papers with many labels. Complete at least one for the certificate; each one is a portfolio piece.

Complete at least one case study for the certificate. The others are optional. What each one covers

  1. Route banking questions150 min
  2. Find what the bot cannot handle150 min
  3. Sort requests with few labels150 min
  4. Tag research papers with many labels150 min

After the case studiesFinal assignment

Use every module in one practice project. You collect evidence, and check it against the course outcomes.

  1. Final assignment180 min

Case studies

Realistic projects from start to finish, on real data, with every output explained. Each one makes a portfolio piece. Complete at least one for the certificate; the others are optional.

  1. Route banking questions2 hr 30 min

    Compare TF-IDF, embeddings, a small fine-tuned encoder and a replayed LLM on 77 fine-grained banking intents, and build a cascade with a cost target.

  2. Find what the bot cannot handle2 hr 30 min

    Detect out-of-scope requests and send them to a person, on an intent dataset with an out-of-scope set, and measure how many wrong automatic answers this prevents.

  3. Sort requests with few labels2 hr 30 min

    Start with 20 labels per intent on real open requests in English and French, add labels with active learning and LLM-assisted labelling with review, and show the learning curve and the labelling cost.

  4. Tag research papers with many labels2 hr 30 min

    Optional: give each paper abstract all the subject labels that fit, with one model and one threshold per label, and report the results per label.

Reviews

Loading the reviews…

    Took this course? Sign in to review it. Learners can write a review after they complete 25% of the lessons.

    Share this course