CourseNatural Language Processing: The Complete Course · Module 10: LLMs for NLP, and Responsible NLP · part 66 of 73
Part 66 · Module 10: LLMs for NLP, and Responsible NLP

Lesson 1: Asking a language model to sort the inbox

39 min read·14 Oct 2026
Module 10 · Lesson 1 · About 55 minutes · Needs: basic Python; Module 5 Lesson 1 (macro F1, HARD_TEST) helps; a free Groq or Gemini key, or Ollama on your own computer

The situation

It is Monday 9 November 2026, project week 10. Rosa has heard that a language model can sort messages with no training at all, and she wants to know whether it beats Module 4's TF-IDF model, which scores macro F1 0.562 on the 80 hand-written HARD_TEST messages. Amara reminds you of her rule: only redacted text goes to a hosted model.

One message runs through the lesson: HT22 (simulated), "My Volt 2 motor is cutting out, and while it's in could you also do a Basic Service?" Its gold label is warranty_fault, with repair_booking as the second request.

HT22, HAND-WRITTEN, SIMULATED "My Volt 2 motor is cutting out, and while it's in could you also do a Basic Service?" gold: warranty_fault needs action first second: repair_booking recorded, not scored
HT22 holds two requests; its gold label (green: correct) is warranty_fault, the one that needs action first, and repair_booking is recorded as the second (grey: background).

The rest of this part opens with an account

Signing up is free and takes one email. Nothing to pay, and nothing renews.