GenAI Systems Lab Open interactive version →
AI Engineering 12 min read

How I'd Build Customer Support AI: Routing, Escalation, and Hallucination Guardrails

A production customer support AI — intent routing, RAG over product docs, escalation triggers, tone compliance checking, and the guardrail architecture that catches the 3% of cases that can destroy trust.

Customer support AI has the lowest tolerance for hallucination of any LLM use case. A wrong answer about a refund policy, a billing error, or account access costs real money and real trust. The architecture reflects this: multiple gates, explicit uncertainty handling, and a human escalation path that's faster than your average hold time.

Intent Routing First

Not all support queries need an LLM. Account status, order tracking, and common FAQ answers can be resolved with structured lookups. Use a lightweight intent classifier (fine-tuned Llama 3.1 8B at <50ms) to route before any expensive inference: structured-lookup intents go to your API/database, open-ended intents go to the RAG+LLM pipeline.

Classify at the message level, not session level. A user who asks 'what's my order status?' (Tier 1) then 'I want to dispute this charge' (Tier 3) should trigger escalation mid-session. Don't commit to a tier at session start.

RAG Over Product Documentation

The retrieval layer for support needs metadata filtering that general search doesn't. Products have versions. Return policies have effective dates. A chunk from the 2023 return policy should not surface for a 2025 query. Metadata schema: product_version, effective_date, jurisdiction, document_type. Every query should include a metadata filter for current effective date.

Escalation Triggers

Escalation should be proactive, not just available. Hard triggers (always escalate): account compromise signals, legal threats, explicit escalation requests, health/safety mentions. Soft triggers (escalate if confidence below threshold): billing disputes over $X, repeated failed resolution attempts (3+ turns without resolution confirmation), any sentiment classifier score below -0.6.

The Hallucination Guardrail Architecture

Three layers of hallucination defense for support AI:

The 3% rule: in my experience, ~3% of support queries will trigger a hallucination from a grounded RAG system. This is not an acceptable production rate for support. The confidence gate catches most of these — but you need the monitoring stack to measure it and the escalation path to absorb it.

Tone Compliance

An LLM that sounds robotic, passive-aggressive, or condescending destroys the product experience even when the answer is correct. Fine-tune on your best human agent responses to internalize tone. Add an output-stage tone classifier that scores for empathy, directness, and concision — flag responses that score below threshold for human review before sending.

Metrics That Matter

Try it interactively

GenAI Systems Lab is a free platform for AI engineers — configure real failure modes, break things, and build the judgment that gets you hired.

Open GenAI Systems Lab →