Prompt
How do I use AI to classify incoming requests and route them
Latest observation
You can use AI as a triage layer in front of your inbox, help desk, or CRM to:
- Classify what the request is about
- Extract key details
- Decide where it should go
- Send it to the right team/system
- Optionally draft a response
Typical workflow
1) Define your categories
Start with a small, clear set of labels, such as:
- Billing
- Technical support
- Sales inquiry
- Account access
- Cancellation / retention
- Spam / abuse
- Urgent escalation
Keep labels mutually exclusive if possible, or allow multiple labels if needed.
2) Create routing rules
Map each category to an action, for example:
- Billing → Finance queue
- Technical support → Support queue
- Sales inquiry → CRM / sales team
- Urgent escalation → High-priority on-call team
You can also route based on:
- customer tier
- sentiment
- language
- keywords
- SLA risk
- account value
3) Use AI to classify the text
Give the AI the incoming message and ask it to return structured output like:
{
"category": "technical_support",
"priority": "high",
"confidence": 0.92,
"reason": "User cannot log in and mentions account locked",
"route_to": "support_team"
}
This makes it easy to automate routing.
4) Add confidence thresholds
Use automation only when the model is confident enough.
Example:
- Confidence ≥ 0.85 → auto-route
- Confidence 0.60–0.85 → send to human review
- Confidence < 0.60 → default queue or manual triage
5) Build a fallback path
Always have a safe default route if AI is unsure:
- “General support”
- “Manual review”
- “Triage queue”
Recommended architecture
Incoming request
→ Preprocess (clean text, detect language, remove signatures)
→ AI classifier
→ Rules engine
→ Routing action
→ Queue / ticketing / CRM
Best practices
Keep the taxonomy simple
Too many categories reduce accuracy. Start with 5–15 labels, then refine.
Use examples
Few-shot prompting or training examples improve consistency:
- “I can’t reset my password” → Account access
- “I was charged twice” → Billing
Combine AI with rules
Use deterministic rules for obvious cases:
- If subject contains “unsubscribe” → spam/cancellation
- If customer is VIP → escalate priority
Log decisions
Store:
- input text
- predicted label
- confidence
- final human-corrected label
- actual route
This helps you improve the model over time.
Review errors regularly
Look for:
- misclassifications
- new request types
- ambiguous phrasing
- categories that should be merged or split
Example prompt
You can instruct the model like this:
Classify the following customer request into one of these categories: Billing, Technical Support, Sales, Account Access, Cancellation, Spam, Other.
Return valid JSON with fields: category, priority, confidence, route_to, summary.
If unsure, set category to "Other" and confidence below 0.7.
Example output
Input:
“Hi, I was charged twice for my subscription and need a refund.”
Output:
{
"category": "Billing",
"priority": "high",
"confidence": 0.97,
"route_to": "finance_support",
"summary": "Customer reports duplicate charge and requests refund."
}
Tools you can use
Depending on your stack:
- OpenAI / LLMs for classification
- Zapier / Make / n8n for workflow automation
- Zendesk / Freshdesk / Intercom for ticket routing
- LangChain / LlamaIndex if building custom pipelines
- AWS Lambda / Cloud Functions for lightweight routing logic
If you want to implement this
I can help you with any of these:
- a prompt template
- a JSON schema for classification
- a workflow diagram
- Python / JavaScript code
- a Zendesk / Gmail / Slack automation example
If you want, I can give you a ready-to-use example for your specific system.