Design: Customer Support Copilot
Building an AI assistant that handles customer support tickets by retrieving knowledge base articles and generating responses.
The Problem
Design an AI copilot that helps customer support agents respond to tickets faster and more accurately. The company receives 10,000 support tickets per day across email, chat, and phone. About 60% are routine questions answerable from the knowledge base. The remaining 40% require investigation, policy exceptions, or empathy for frustrated customers.
High-Level Architecture
Customer Ticket Arrives
│
▼
┌───────────────────────────────┐
│ STEP 1: TICKET CLASSIFICATION │ (~50ms)
│ Category, priority, sentiment │
│ Route to correct queue │
└───────────────────────────────┘
│
┌────────┴────────┐
▼ ▼
ROUTINE COMPLEX
(Auto-reply (Agent-assisted)
candidate) │
│ ▼
▼ ┌───────────────────┐
┌──────────┐ │ STEP 3: COPILOT │
│ STEP 2: │ │ DRAFT GENERATION │
│ AUTO- │ │ Retrieve docs + │
│ REPLY │ │ past tickets, │
│ Generate │ │ generate draft │
│ + Verify │ │ for agent to edit │
└──────────┘ └───────────────────┘
Step 1: Ticket Classification
When a ticket arrives, classify it immediately:
- Category: Billing, shipping, returns, product question, technical issue, account access.
- Priority: Urgent (account locked, payment failed), normal, low.
- Sentiment: Frustrated, neutral, positive. Frustrated customers get routed to experienced agents.
- Complexity: Can this be answered from the knowledge base (routine) or does it need investigation (complex)?
A fine-tuned text classifier or a prompted LLM handles this classification.
Step 2: Auto-Reply for Routine Questions
For routine questions (password reset, order tracking, return policy):
- Retrieve the most relevant help article or FAQ using hybrid search (BM25 + vector search) against the knowledge base.
- Generate a personalized response using an LLM with the retrieved article as context and the customer's specific details (order number, account status).
- Verify the response: check that it does not contain hallucinated information, confirm that order numbers and dates mentioned match the customer's actual data from the CRM.
- Send if confidence is high, or queue for quick agent review if confidence is medium.
Step 3: Agent Copilot for Complex Issues
For complex tickets that require human judgment:
- Surface Context: Pull up the customer's history (past tickets, purchases, account status, loyalty tier).
- Retrieve Similar Resolved Tickets: Find past tickets with similar issues and show how they were resolved, giving the agent a starting point.
- Draft Response: Generate a suggested response that the agent can edit, accept, or discard. The draft includes relevant policy references.
- Suggest Actions: Recommend actions like "issue refund for $X" or "escalate to billing team" based on the issue pattern.
The agent always has final control. The copilot saves time by eliminating research and drafting work.
Key Design Challenges
- Hallucination Risk: The copilot must never tell a customer something false about their order, policy, or account. Ground all responses in retrieved documents and verify facts against CRM data.
- Tone Matching: Responses should match the company's brand voice. Fine-tune or prompt the LLM with style guidelines.
- Escalation Logic: Build clear escalation paths. If the customer mentions legal action, a safety concern, or asks for a manager, route immediately to a senior human agent.
- Feedback Loop: Track which copilot drafts agents accept, edit, or reject. Use acceptance rate as a training signal to improve the model.
Say this out loud
A customer support copilot classifies incoming tickets by category, priority, and complexity. Routine questions get auto-replied using RAG retrieval from the knowledge base. Complex issues get a copilot-generated draft response for human agents to review and edit. All responses are grounded in actual company documents and verified against CRM data to prevent hallucination.
Followups to expect
- How do you measure copilot effectiveness? Track agent handle time reduction, first-contact resolution rate improvement, CSAT scores, and the percentage of copilot drafts accepted without edits.
- How do you handle multi-language support? Use multilingual embedding models for retrieval and multilingual LLMs for generation. Detect the customer's language from the ticket and respond in the same language.
Check yourself
Why is a customer support copilot designed to assist human agents rather than fully replace them?