Home/
Part XII — Building Real Products (End-to-End Projects)/35. Project 4: Customer Support Triage Assistant/35.1 Intent classification and routing
35.1 Intent classification and routing
Overview and links for this section of the guide.
Defining the Taxonomy
You need a fixed list of categories. Do not let the model invent new ones.
- `BILLING_REFUND`
- `BILLING_INVOICE_REQUEST`
- `SHIPPING_STATUS`
- `TECHNICAL_LOGIN`
- `TECHNICAL_BUG`
- `OTHER`
The Classification Prompt
You are a triage assistant. Classify the following email into exactly ONE category from the list below.
Categories:
- BILLING_REFUND: User wants money back.
- SHIPPING_STATUS: User asks where package is.
...
Output JSON:
{"category": "CATEGORY_NAME", "confidence": 0.0-1.0, "reasoning": "string"}
Email:
"Hi, I can't log in to my account."
The "Other" Bucket
Always have an `OTHER` bucket. If the model is unsure, it should dump it there for a human. Never force a square peg into a round hole.