Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Imbalanced Support Ticket Routing

Medium
Machine LearningCross-ValidationFeature EngineeringSupervised LearningAsked 1 times

Problem

Business Context

HelpHive, a SaaS customer support platform handling roughly 1.8 million tickets per year, wants to automatically classify incoming support tickets into issue categories such as billing, login, bug report, feature request, cancellation, and account security. The current rule-based system performs poorly on rare but high-priority classes, especially account security and cancellation.

Dataset

You are given a historical ticket dataset built from the first message in each support conversation.

Feature GroupCountExamples
Text features1 raw fieldsubject + first_message
Numerical metadata11customer_tenure_days, prior_ticket_count_90d, sentiment_score, message_length
Categorical metadata7plan_tier, language, channel, region, device_type
Temporal features4hour_of_day, day_of_week, days_since_last_ticket, month
  • Size: 420K labeled tickets, 23 engineered non-text features plus raw text
  • Target: Multiclass ticket category (8 classes)
  • Class balance: Highly skewed — top 2 classes account for 74% of tickets; smallest class is 1.6%
  • Missing data: 12% missing sentiment scores, 7% missing device_type, 3% missing tenure for migrated customers

Success Criteria

A good solution should improve minority-class detection without causing a large drop in overall precision. Target at least 0.72 macro F1, 0.88 weighted F1, and recall above 0.70 for the two rare operationally critical classes: account_security and cancellation.

Constraints

  • Inference must complete in <100 ms per ticket in an online API
  • Support operations need class-level explanations and feature importance
  • Retraining should be feasible on a weekly cadence with moderate cloud cost
  • The solution must avoid leakage from future ticket outcomes or agent actions

Deliverables

  1. Build a multiclass classification pipeline for skewed support ticket data.
  2. Explain how you handle class imbalance in both training and evaluation.
  3. Design preprocessing for text, categorical, and numerical features with missing values.
  4. Choose a validation strategy and justify it.
  5. Recommend a deployment-ready thresholding or calibration approach for rare classes.
  6. Report final metrics, confusion patterns, and the main tradeoffs of your design.

You are practicing as a guest. Sign up free to get your answer graded with AI feedback. Your draft stays right here.

Sign up freeI have an account
Sign up to unlock solutions
Asapp Machine Learning Engineer Interview Questions
Next questions
Classify Support Tickets with Hugging FaceEasyCompare NLP Algorithms for Ticket RoutingEasyReliance IndustriesClassify Support Tickets with TF-IDFMedium
0 / ~200 words