Intent & Classification
Understanding What Customers Need
Why Classification Matters
Every support interaction starts with three questions:
Get these wrong, and you route a security incident to the billing team. Get them right, and you resolve 80% of tickets without human intervention.
Classification is what separates a chatbot from a support agent. Without it, the AI gives generic responses. With it, the AI knows exactly which KB article to retrieve and whether to escalate.
Key Concepts
Intent Detection
The primary classifier. Maps a customer query to one of 10+ intent categories:
| Intent | Example Query | Automation Potential |
|---|---|---|
| `password_reset` | "Can't log in after changing password" | High — well-defined steps |
| `billing_inquiry` | "Unexpected charge on my card" | Medium — may need account lookup |
| `bug_report` | "App crashes when I open settings" | Low — needs investigation |
| `feature_request` | "Please add dark mode" | High — acknowledge and log |
| `security_concern` | "Unauthorized access to my account" | None — always escalate |
| `account_management` | "How to upgrade my plan" | High — self-service flow |
The baseline classifier uses keyword pattern matching with confidence scoring. Keywords like "password", "login", "locked out" trigger the password_reset intent. Multiple matching keywords increase confidence.
The Confidence Problem
Confidence is the most important output of classification. It's not just "how sure are we?" — it's a routing signal:
Low confidence isn't a failure — it's a safety mechanism. The worst outcome in support is a confident wrong answer. A confused escalation is always better.
Priority Scoring
Priority combines three signal types:
The score (0-10) maps to priority levels: urgent (8+), high (6-7), medium (4-5), low (1-3).
Entity Extraction
Structured data embedded in natural language:
ACC-4521 → account_id — enables automatic account lookupTKT-00015 → ticket_id — links to previous interactionssarah@techcorp.com → email — identifies the customer429 → error_code — narrows the technical issueEntity extraction makes responses feel personalized: "I can see your account ACC-4521..." instead of "Please provide your account ID."
Topic Classification
Maps queries to product areas (authentication, billing, API, mobile, workspace, data, infrastructure). Topics drive two things:
Architecture Pattern
Customer Query
│
├──→ Intent Detector ──→ { primary, confidence, secondary }
│
├──→ Priority Scorer ──→ { priority, score, reasons }
│
├──→ Topic Classifier ──→ { topic, confidence }
│
└──→ Entity Extractor ──→ { type, value, start, end }[]All four classifiers run in parallel on the same query. Together they produce a complete classification profile in <5ms.
What You'll Build
Glossary
| Term | Meaning |
|---|---|
| Intent | What the customer wants (password_reset, billing_inquiry, etc.) |
| Confidence | How sure the classifier is (0.0 to 1.0) |
| Priority | System assessment of urgency (low/medium/high/urgent) |
| Topic | Product area affected (authentication, billing, api, etc.) |
| Entity | Structured data extracted from text (account IDs, emails, etc.) |
This is chapter 2 of AI Customer Support Agent.
Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.
View course details