Dataford
Interview QuestionsInterview GuidesExperiencesMock InterviewsPricing
Get started

Route E-commerce Support Tickets

Medium
NLPText ClassificationTF-IDFTokenization

Problem

Business Context

ShopFlow, an e-commerce platform, receives thousands of customer support tickets per day across email and chat. The operations team wants an NLP system that can automatically classify each ticket into the correct queue so agents can respond faster and with fewer manual triage errors.

Data

You have 420,000 historical tickets collected over 18 months. Each ticket contains a subject line and message body. Text is primarily English (96%), with small amounts of Spanish and French. Ticket length ranges from 5 to 900 tokens with a median of 78 tokens. Labels are moderately imbalanced across 6 classes: Order Status (28%), Refund/Return (22%), Payment Issue (14%), Account Access (12%), Shipping Damage (9%), and Other (15%). Historical labels were assigned by agents and contain some noise, especially between Refund/Return and Shipping Damage.

Success Criteria

A good solution should achieve macro-F1 ≥ 0.84, weighted-F1 ≥ 0.88, and recall ≥ 0.90 for Payment Issue and Account Access because those tickets are time-sensitive. Inference should support near-real-time routing with p95 latency under 150 ms per ticket.

Constraints

  • Must run in Python using modern NLP tooling
  • Single GPU available for training; CPU inference is preferred in production
  • Solution should be explainable enough for support operations review
  • Must handle noisy text such as typos, order IDs, URLs, and copied email threads

Requirements

  1. Define an end-to-end NLP approach for this ticket classification problem.
  2. Describe preprocessing for raw support text, including language filtering and thread cleanup.
  3. Implement a strong baseline and a transformer-based model in Python.
  4. Explain how you would address class imbalance, label noise, and thresholding for sensitive classes.
  5. Propose an evaluation plan, error analysis workflow, and deployment recommendation.

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
Next questions
Reliance IndustriesClassify Support Tickets with TF-IDFMediumClassify Support Tickets with Hugging FaceEasyCharlotte StaffingClassify Support Tickets by IntentMedium
0 / ~200 words