This guide walks through how to harness Claude’s advanced natural language understanding capabilities to classify customer support tickets at scale based on customer intent, urgency, prioritization, customer profile, and more.
You have limited labeled training data available
Your classification categories are likely to change or evolve over time
You need to handle complex, unstructured text inputs
Your classification rules are based on semantic understanding
You require interpretable reasoning for classification decisions
You want to handle edge cases and ambiguous tickets more effectively
You need multilingual support without maintaining separate models
Technical issue
Account management
Product information
User guidance
Feedback
Order-related
Service request
Security concerns
Compliance and legal
Emergency support
Training and education
Integration and API
Classification consistency
Adaptation speed
Multilingual handling
Edge case handling
Bias mitigation
Prompt efficiency
Explainability score
Routing accuracy
Time-to-assignment
Rerouting rate
First-contact resolution rate
Average handling time
Customer satisfaction scores
Escalation rate
Agent productivity
Self-service deflection rate
Cost per ticket
claude-3-5-haiku-20241022
an ideal model for ticket routing, as it is the fastest and most cost-effective model in the Claude 3 family while still delivering excellent results. If your classification problem requires deep subject matter expertise or a large volume of intent categories complex reasoning, you may opt for the larger Sonnet model.
ticket_contents
to be inserted into the <request>
tags.<reasoning>
tags, followed by the appropriate classification label inside <intent>
tags.ticket_contents
as input, and now return a tuple of reasoning
and intent
as output. If you have an existing automation using traditional ML, you’ll want to follow that method signature instead.
classify_support_request
function that takes a ticket_contents
string.ticket_contents
to Claude for classification using the classification_prompt
reasoning
and intent
extracted from the response.stream=False
(the default).
actual_intent
from our test cases into the classify_support_request
method and set up a comparison to assess whether Claude’s intent classification matches our golden intent classification.Customers make implicit requests
Claude prioritizes emotion over intent
Multiple issues cause issue prioritization confusion