Q&A-1Compare supervised and unsupervised learning using a product example.
Answer
Short answer. Supervised learning needs labelled outcomes and predicts one; unsupervised learning has no target and finds structure. Choose by what you have and what consumes the output: a routing decision needs a label, a theme report for humans does not.
Assumptions. A support org with ~120k tickets/month, 40 existing routing queues, a model that assigns each ticket to one queue, and a product team asking what customers are complaining about. Numbers below are illustrative, not measured.
Supervised: ticket routing. Train logistic regression or gradient-boosted trees on TF-IDF or 768-dim sentence embeddings of historical tickets, labelled with the queue that resolved them. Hold out 10% stratified. Report macro-F1 and per-class recall, not accuracy: queues are imbalanced and a security-incident queue matters more than a password reset.
Unsupervised: theme discovery. No queue labels. Embed tickets, run k-means (k=40) or HDBSCAN, read the top terms per cluster. This answers "what are people talking about", not "where does this ticket go".
| Supervised routing | Unsupervised themes | |
|---|---|---|
| Target | Queue label from history | None |
| Algorithm | Logistic regression / GBM on embeddings | k-means (k=40), HDBSCAN |
| Metric | macro-F1, per-class recall on held-out 12k | silhouette, cross-seed ARI, human audit |
| Failure | label drift, rare-class collapse | seed instability, cluster drift, no ground truth |
| Ships when | per-class recall floor met on a fresh holdout | most clusters stable across seeds and interpretable |
What the routing model costs when it is wrong. At 71% top-1 accuracy, 120k × 0.29 = 34,800 misroutes/month. If 30% of those cost an extra 4 minutes of agent time at $60/hr loaded: 34,800 × 0.3 × 4 / 60 ≈ 696 agent-hours ≈ $41,800/month. That is the number that justifies or kills the project, and it is why per-class recall on the expensive queues is the metric to gate on.
Failure modes, with detection.
- Label drift. A new intent ("billing dispute: crypto") appears; the classifier forces it into the nearest old queue with high confidence. Detect with weekly macro-F1 on 2k freshly labelled tickets, plus PSI on the predicted-label distribution against the training prior: alert at 0.2.
- Rare-class collapse. Security incidents are 0.4% of tickets and get 0.3 recall while macro-F1 looks fine. Detect with a per-class recall floor (e.g. security ≥ 0.85), reported per queue, not aggregated.
- Seed instability. Run k-means five times with different seeds and compute ARI between partitions. If mean pairwise ARI < 0.6, the clusters are an artefact of initialization. In a plausible run, 22 of 40 clusters matched across seeds; the other 18 are noise and should not reach product.
- Cluster drift. Centroids move as the product changes. Track cosine distance between this month's and last month's centroids; re-read any cluster above 0.15 before republishing.
- No ground truth. A cluster can be coherent and useless ("tickets containing 'the'"). Audit 50 sampled tickets per cluster, and only keep a cluster if routing to it measurably changes handling time.
When not to use each. Don't ship unsupervised clusters as a router: with no ground truth there is no way to catch a confidently wrong assignment. Don't ship supervised routing when you have under ~200 labelled examples per class: bootstrap with active learning or weak supervision (label functions over regex and keywords) first, then train. If you have a decision but no labels, that middle path is the answer, not either extreme.
Curated: · Written: · Reviewed:
Log in free to save your progress and keep bookmarks and notes for a quick revision before your interview.