KatInterview

Automated Ticket Routing for Multi-Team Engineering Organizations

Machine LearningModel answer
MediumModel answerMachine Learningclassificationnlpproduction-ml

Last updated

Build an ML system that assigns incoming support tickets to the right engineering team, handling thousands of teams and high throughput.

You're building a machine learning system to automatically route incoming bug reports to the correct engineering team in a large organization. The company has grown to manage thousands of internal teams across many products, and manual routing has become a bottleneck—tickets often get assigned to the wrong team, causing delays.

Your Task

Design an end-to-end ML pipeline that predicts which team should handle each new ticket. The system should also know when it's uncertain and escalate those cases to human reviewers.

Context and Constraints

Volume: The platform receives around 500,000 tickets daily, with peak traffic reaching thousands per minute. There are over 5,000 distinct engineering teams.

Ticket Content: Each ticket includes a title, description, the person who filed it, component tags, and sometimes attached logs or stack traces.

Latency: Classification can take 1–2 seconds. Faster is better, but this budget is acceptable.

Accuracy vs. Coverage: A wrong assignment wastes hours as the ticket bounces between teams. It's better to route 70% of tickets correctly than to route 95% with frequent mistakes.

Evolving Organization: Teams are created, merged, renamed, and reorganized regularly. The system must adapt without full retraining.

What to Cover

  1. Feature Representation: How do you turn a ticket into features for the model? What metadata and signals matter most?

  2. Modeling Approach: What architecture do you use? How do you handle 5,000+ classes efficiently? When and how might you use embeddings, traditional ML, or language models?

  3. Confidence and Escalation: How do you decide when the model is confident enough to auto-assign versus when a human should decide?

  4. Continuous Learning: How does the system improve over time using feedback from resolved tickets and reassignments?

  5. Evaluation: What metrics determine whether the system is working well? How do you measure success beyond raw accuracy?

Discuss the trade-offs in your design and call out the risks or edge cases you'd monitor in production.

Hints

Hint 1

Start by defining what a correct label means—don't assume the first assignment is ground truth; look at which team ultimately resolved it.

Hint 2

With thousands of teams, a flat classifier is brittle. Consider retrieval-based methods that find candidate teams first, then rank them.

Hint 3

Misclassification cost is asymmetric: a wrong auto-assignment wastes more time than asking a human to triage. Design your confidence thresholds accordingly.