Pick Macro or Micro F1 for Gmail Inbox Category Tabs
Last updated: November 29, 2026
Quick Overview
A model routes Gmail messages into Primary, Social, Promotions, Updates, and Forums. Explain the difference between micro and macro averaged F1 for this multi-class problem and which you would report to the product team.
0
0
0 solved
A model routes Gmail messages into Primary, Social, Promotions, Updates, and Forums. Explain the difference between micro and macro averaged F1 for this multi-class problem and which you would report to the product team.
Gmail classification tasks are heavily skewed: most mail is Promotions or Updates while Forums is small. Interviewers use this to check that you understand how averaging choices hide or expose performance on small classes, and that you tie the metric to user harm.
What the Interviewer Expects
- Defines per-class precision, recall and F1
- Explains micro averaging pools counts and equals accuracy for single-label multi-class
- Explains macro averaging gives each class equal weight
- Shows a small example where the two diverge
- Recommends reporting per-class numbers plus the confusion that matters (Primary misrouted)
Key Topics to Cover
How to Approach This
- Understand the bias-variance trade-off. High training accuracy but low test accuracy signals overfitting.
- Choose evaluation metrics carefully based on the problem. Accuracy alone is often insufficient.
- Feature engineering is often more impactful than model selection.
- Know when to use tree-based models (tabular data) vs neural networks (unstructured data).
- Handle class imbalance with SMOTE, class weights, or appropriate loss functions.
Possible Follow-up Questions
- What about weighted F1, and when is it useful?
- Which single confusion between tabs is most harmful to users and why?
- How would you set different thresholds per class?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Explore ML Interview PrepSample Answer
Clarify
Confirm it is single-label (each message goes to exactly one tab), the class distribution, and which mistakes hurt most. Missing an important personal email because it landed in Promotions is far wors...
Approach
For each class compute precision and recall from the confusion matrix, then F1 as their harmonic mean. Micro averaging sums TP, FP, and FN over all classes before computing F1. In single-label multi-c...