Back to guides
2
5 min

Intent & Classification

Understanding What Customers Need

Why Classification Matters

Every support interaction starts with three questions:

  • What does the customer want? — Intent detection
  • How urgent is it? — Priority scoring
  • What product area is affected? — Topic classification
  • 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:

    IntentExample QueryAutomation 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:

  • > 0.7: Auto-respond. The system is confident.
  • 0.5 - 0.7: Respond but flag for human review.
  • < 0.5: Escalate immediately. The AI doesn't understand the question.
  • 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:

  • Intent-based: Security concerns are inherently urgent. Feature requests are not.
  • Keyword-based: "production", "outage", "ASAP" indicate urgency regardless of intent.
  • Confidence-based: Low confidence INCREASES priority — ambiguous queries need human attention.
  • 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 lookup
  • TKT-00015 → ticket_id — links to previous interactions
  • sarah@techcorp.com → email — identifies the customer
  • 429 → error_code — narrows the technical issue
  • Entity 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:

  • Search routing: Only search authentication KB articles for auth questions
  • Team routing: API issues go to engineering, billing to finance
  • 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

  • Run the classification demo on 6 sample support queries
  • Walk through intent detection patterns and confidence scoring
  • Understand priority scoring with multi-signal combination
  • Explore entity extraction with regex patterns
  • Extend with LLM fallback, compound intents, or sentiment detection
  • Glossary

    TermMeaning
    IntentWhat the customer wants (password_reset, billing_inquiry, etc.)
    ConfidenceHow sure the classifier is (0.0 to 1.0)
    PrioritySystem assessment of urgency (low/medium/high/urgent)
    TopicProduct area affected (authentication, billing, api, etc.)
    EntityStructured 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