Dataford
Interview QuestionsInterview GuidesExperiencesCoaching
New
Pricing
Get started
Dataford
Popular roles
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Browse
Browse All RolesEvery role hub, from analyst to MLBrowse All CompaniesCompany-specific interview loopsAll Interview GuidesThe full guide library
Top questions by role
Software EngineerData AnalystData ScientistData EngineerBusiness AnalystAI EngineerMachine Learning EngineerProduct Manager
Top questions by skill
SQLPythonStatisticsMachine LearningA/B TestingSystem DesignGenerative AIProduct SenseMetricsBehavioral
Browse all questions →Try a mock interview
Experiences
Practice
Mock InterviewsTimed interview simulations with feedbackCoaching1:1 coaching with people at your target companiesSuccess PathYour 6-week structured planModulesCurated lessons by topicWebinarsTalks from ex-Big Tech data leadsPlaygroundA free-form scratch editor
Learn
BlogInterview strategy and career adviceTech Job Market ReportHiring trends across data and AI rolesFor UniversitiesDataford for career centersAbout DatafordWho we are and how we build
Pricing
Build my plan
LLM Ticket Classification and Routing
00:00
5 left

LLM Ticket Classification and Routing

MediumSQL · PostgreSQL

Problem

How do you approach fine-tuning or prompt-engineering an LLM to automatically classify and route incoming user support tickets?

Using the provided ticket, prediction, and queue data, write a query to evaluate which model versions and predicted queues are reliable for automatic routing. Include only predictions with confidence of at least 0.70 and tickets with a known actual queue.

Output

  1. One row per model version and predicted queue
  2. Columns: model_version, predicted_queue, eligible_tickets, correct_tickets, accuracy_pct, and avg_confidence
  3. Sort by model_version, accuracy descending, then predicted queue alphabetically

Schema

tickets
ColumnTypeDescription
ticket_idPKINTUnique support ticket identifier
subjectTEXTShort ticket subject
actual_queue_idINTReviewed queue assignment
model_predictions
ColumnTypeDescription
prediction_idPKINTUnique prediction identifier
ticket_idINTTicket being classified
model_versionVARCHAR(30)LLM or prompt version used for prediction
predicted_queue_idINTQueue selected by the model
confidenceDECIMAL(4,3)Model confidence from 0 to 1
support_queues
ColumnTypeDescription
queue_idPKINTUnique support queue identifier
queue_nameVARCHAR(80)Human-readable queue name
Tablesticketsmodel_predictionssupport_queues
Interviewer

Your question is LLM Ticket Classification and Routing. Start with the requirements and the three tables in the Question tab.

Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.

You need to log in / sign up to run or submit.
CodePostgreSQL
Sign up free to run your codeLog inLn 1
Run your query to see results here.