Practice — Classical NLP & Text Classification (6 questions)
Intermediate
Open
Free
Design a Classifier for 40 Imbalanced Support Classes Permalink →
A support inbox receives 300,000 tickets a month, routed by agents into 40 queues. The largest queue holds 22 percent of tickets and the smallest 0.2 percent (about 600 per month). You have 18 months of history, an agent-assigned label on every ticket (agents disagree on roughly one ticket in twelve), and a product that adds or renames a feature every few weeks. Management wants "auto-route where it is safe, and send the rest to humans".
Describe the design you would build and defend:
- How you split the data, and why a random split is wrong here.
- The first model, its features, and the metric you lead with.
- What you do about the 0.2 percent queue.
- How you decide which tickets are auto-routed.
- What you would try second if the baseline is not good enough, and what evidence would tell you to try it.
Share this question
Intermediate
Open
Free
Evaluate an NER Model: Token Accuracy Versus Entity F1 Permalink →
An NER model is evaluated on one sentence in BIO tags. Tokens: Dr Maria Lopez works at North Star Bank in Madrid.
- Gold:
O B-PER I-PER O O B-ORG I-ORG I-ORG O B-LOC - Predicted:
O B-PER I-PER O O B-ORG I-ORG O O B-ORG
- Compute token accuracy.
- Compute token-level precision, recall and F1 over non-
Otags (a token counts as correct only if the predicted tag equals the gold tag). - Compute strict entity-level precision, recall and F1 (span and type must both match).
- Explain why the numbers differ, and what you would report to a stakeholder.
- Name four other pitfalls when evaluating NER, including the ones that arise with transformer subword tokenizers and PII use cases.
Share this question
Intermediate
Open
Pro
Classify 5,000-Token Documents With a 512-Token Encoder
Unlock this question →
Advanced
Open
Pro
Bootstrap Training Labels With an LLM Without Fooling Yourself
Unlock this question →
Intermediate
Open
Pro