A support agent built on a language model can answer some incoming questions, and a dashboard may soon show a deflection number. That number counts conversations that never reached a person. It cannot tell you whether the customer got what they needed or gave up. This article covers more useful measurements, the knowledge base work that affects answer quality, guardrails around refunds and legal topics, escalation rules, and a sampling plan for quality review.
It is written for a support, operations or product lead deciding how far to trust an AI agent with customer conversations and what to build around it before expanding its role.
1. Deflection looks healthy while customers stay stuck
Deflection is the share of conversations that ended without a human. A customer who got a correct answer is counted. So is a customer who read three irrelevant paragraphs, closed the window and emailed support the next morning. The metric rewards an agent that makes the human channel hard to reach, which is the opposite of what the support team wants.
Two measurements help address this. The first is true resolution: the share of AI-started conversations that ended without escalation or a repeat contact from the same customer about the same problem within a defined window, such as 7 days. The second is a cost figure divided by cases meeting that resolution definition, so a cheap failed conversation does not look like a bargain. Both need ticket data that links a customer's contacts across channels and identifies the problem discussed.
2. Measure what happened: definitions and a worked example
| Metric | Definition | Watch out for |
|---|---|---|
| Containment | AI-started conversations not escalated ÷ AI-started conversations | Counts abandonment as success |
| Re-contact rate (7 days) | Contained conversations followed by another contact from the same customer about the same issue within 7 days ÷ contained conversations | Needs identity and issue linkage across channels |
| True resolution | (Contained − re-contacted) ÷ AI-started conversations | Window length changes the number; fix it and publish it |
| CSAT on contained cases | Mean survey score of contained conversations | Low response rate, and unhappy customers often skip the survey |
| Escalation rate | Escalated ÷ AI-started | Too low can mean a hidden exit; too high means the agent adds little |
| Cost per case with no re-contact (proxy) | Total AI plus human cost ÷ cases with no repeat contact in the window | A lack of re-contact does not prove resolution; include escalated tickets in cost |
| Wrong-answer rate | Wrong or ungrounded answers ÷ sampled answers | Only as good as your reviewers and your rubric |
The snippet computes the first five from a list of tickets and then defines an escalation rule engine, which section 4 covers. The ticket data and the per-ticket costs are hypothetical.
# Illustrative: ticket rows and costs are hypothetical.
from collections import defaultdict
# (id, customer, issue, day, started_by_ai, escalated, csat or None)
TICKETS = [
("t1", "c1", "billing", 1, True, False, 5), ("t2", "c2", "invoice", 1, True, False, 4),
("t3", "c1", "billing", 3, True, False, None), ("t4", "c3", "delivery", 2, True, True, None),
("t5", "c4", "billing", 2, True, False, 2), ("t6", "c5", "account", 4, True, False, None),
("t7", "c5", "account", 20, True, False, 5), ("t8", "c6", "invoice", 5, False, False, 4),
("t9", "c7", "refund", 6, True, True, 3), ("t10", "c2", "invoice", 9, True, False, 4),
]
AI_COST, HUMAN_COST = 0.50, 6.00 # per ticket handled; hypothetical
def metrics(tickets, window=7):
by_customer_issue = defaultdict(list)
for t in tickets:
by_customer_issue[(t[1], t[2])].append(t[3])
def recontact(t):
return any(0 < d - t[3] <= window for d in by_customer_issue[(t[1], t[2])])
ai = [t for t in tickets if t[4]]
contained = [t for t in ai if not t[5]]
stuck = [t for t in contained if recontact(t)]
no_recontact = [t for t in tickets if not recontact(t)]
cost = sum(AI_COST for t in ai) + sum(HUMAN_COST for t in tickets if t[5] or not t[4])
scores = [t[6] for t in contained if t[6] is not None]
ratio = lambda numerator, denominator: numerator / denominator if denominator else None
return {
"containment": ratio(len(contained), len(ai)),
"contained_then_recontacted": ratio(len(stuck), len(contained)),
"true_resolution": ratio(len(contained) - len(stuck), len(ai)),
"csat_contained": ratio(sum(scores), len(scores)),
"cost_per_no_recontact_case": round(ratio(cost, len(no_recontact)), 2) if no_recontact else None,
}
RULES = [ # first match wins; order is priority
("legal_terms", lambda c: any(w in c["text"].lower() for w in ("lawyer", "sue", "regulator", "chargeback")), "legal-queue"),
("refund_over_limit", lambda c: c.get("refund", 0) > 50, "refund-approval"),
("repeat_contact", lambda c: c.get("contacts_7d", 0) >= 2, "senior-agent"),
("negative_sentiment", lambda c: c.get("sentiment", 0) <= -0.5, "senior-agent"),
("ungrounded_answer", lambda c: not c.get("sources"), "human-review"),
("low_confidence", lambda c: c.get("confidence", 1) < 0.6, "human-review"),
]
def escalate(ctx):
for name, test, queue in RULES:
if test(ctx):
return name, queue
return None, "ai-continues"
for m, v in metrics(TICKETS).items():
print(m, round(v, 2) if isinstance(v, float) else v)
print(escalate({"text": "I will contact my lawyer", "sources": ["kb-12"]}))
print(escalate({"text": "Refund please", "refund": 80, "sources": ["kb-3"]}))
print(escalate({"text": "Where is my invoice?", "sources": ["kb-7"], "confidence": 0.9}))
# Output:
# containment 0.78
# contained_then_recontacted 0.14
# true_resolution 0.67
# csat_contained 4.0
# cost_per_no_recontact_case 2.5
# ('legal_terms', 'legal-queue')
# ('refund_over_limit', 'refund-approval')
# (None, 'ai-continues')
Illustrative numbers — replace with your own. In this small sample 9 of 10 tickets were started by the AI and 7 of those were not escalated, so containment is 7 ÷ 9 = 78%. One contained customer came back about the same issue within 7 days, so the re-contact rate is 1 ÷ 7 = 14% and true resolution is (7 − 1) ÷ 9 = 67%. On cost, 9 AI conversations at 0.50 make 4.50, and the 3 tickets a human handled (two escalations and one human-only ticket) at 6.00 make 18.00. Total cost is 22.50, divided by 9 tickets with no re-contact, giving 2.50 per no-recontact case. This is only a proxy for resolution; the gap between 78% containment and 67% true resolution shows why deflection alone is incomplete.
To evaluate these dynamics at operational scale, consider a second worked example examining two distinct deployment strategies across 10,000 monthly tickets. Illustrative numbers — replace with your own.
- Strategy A: Aggressive Containment. The organization configures the AI agent to resist escalation, requiring three explicit customer requests before transferring to a human. The agent achieves an 80% containment rate (8,000 tickets marked contained, 2,000 escalated). However, because many frustrated users abandon the session without resolution, 35% of contained users re-contact support within 7 days (2,800 repeat tickets). True resolution is (8,000 − 2,800) ÷ 10,000 = 52.0%. Total costs equal 10,000 AI interactions at $0.50 ($5,000) plus 4,800 human handlings (2,000 escalated + 2,800 repeat contacts) at $6.00 ($28,800), totaling $33,800. The cost per truly resolved case is $33,800 ÷ 5,200 = $6.50.
- Strategy B: Quality-Gated Selective Escalation. The organization configures proactive routing rules that instantly transfer cases with negative sentiment, low confidence, or repeat inquiries. Containment drops on the dashboard to 60% (6,000 tickets contained, 4,000 escalated immediately). Because customers receive either an accurate automated answer or immediate human help, the 7-day re-contact rate drops to 8% (480 repeat tickets). True resolution rises to (6,000 − 480) ÷ 10,000 = 55.2%. Total costs equal 10,000 AI interactions at $0.50 ($5,000) plus 4,480 human handlings (4,000 escalated + 480 repeat contacts) at $6.00 ($26,880), totaling $31,880. The cost per truly resolved case drops to $31,880 ÷ 5,520 = $5.78.
Strategy B achieves 320 more resolved tickets while saving $1,920 every month, despite reporting a containment rate that is 20 percentage points lower on executive dashboards. In this hypothetical, the re-contacts under Strategy A cost more than the escalations it avoided. Following the definition above, a ticket that a human resolves after escalation does not count as resolved, so read cost per resolved case as a proxy.
The table below compares three service designs qualitatively. The ratings are starting assumptions; replace them with your own data.
| Service design | Containment potential | Customer experience risk | Cost per contact | Maintenance burden |
|---|---|---|---|---|
| Autonomous AI first line | Highest of the three | High if ungrounded; lower with guardrails | Lowest | High: weekly knowledge base curation and rule audits |
| AI copilot (human in the loop) | None: a person sends every reply | Low: a person checks each response | Moderate: human time on every contact, though shorter per contact | Moderate: prompt tuning and agent feedback |
| Rules-based flow | Limited to narrow, predictable intents | Moderate: rigid trees fail on unusual phrasing | Low | High: decision trees need engineering when policies change |
3. Knowledge base hygiene and guardrails
A support agent usually answers by retrieving articles from your knowledge base and writing a reply grounded in them, a pattern known as retrieval-augmented generation. The agent is then only as correct as the articles it retrieves. Three problems recur: an article that is out of date after a policy change, two articles that contradict each other, and a question that no article covers, where the model fills the gap with a plausible guess.
- Give every article an owner and a review date, and send the owner a weekly list of the articles that agent answers cited the most. Heavily used articles deserve the most careful review.
- Retire or merge duplicates. When two articles disagree, the retrieval step picks one at random from the agent's point of view.
- Log every question where retrieval returned nothing relevant. That list is the backlog for new articles, ranked by volume.
- Require a cited source for any factual answer about policy, price or eligibility. No source, no answer; escalate instead.
Guardrails belong in the tool layer, not only in the prompt. A prompt that says "never approve large refunds" is a request, and a model can be argued out of a request. A refund tool that refuses any amount above a set limit without a human approval token enforces the rule. Apply the same design to refunds, account changes, identity checks, goodwill credits and anything that touches a contract. Legal topics (threats of action, regulator mentions, privacy requests, safety incidents) go to a person, and the agent should say so plainly without giving a legal opinion. The rules and deadlines for privacy requests and consumer protection vary by place and change over time, so have counsel confirm your own list.
4. Escalation design
Escalation is a set of triggers, a destination for each, and a handoff that carries context. The triggers worth starting with are legal terms, a refund above the limit, a second contact within a week, strongly negative sentiment, an answer with no cited source and low model confidence. Order them by risk, so the first match decides the queue. The rule engine in the code above does this and returns both the rule name and the queue, which makes every escalation explainable afterward.
Three design points matter beyond the rules. First, make a human easy to reach: a customer who asks for a person twice should get one, because hiding the exit inflates containment and drives re-contacts. Second, hand over the whole conversation, the retrieved sources and the customer's account context, so that the person does not start with "How can I help?" after the customer already explained twice. Third, treat model confidence scores with care. They are a useful signal for routing but they are not calibrated probabilities until you have checked them against labelled cases from your own tickets.
Three starting points for setting thresholds, to be tuned on your own tickets:
- Intent reversibility: Informational questions such as shipping policy or opening hours carry little risk and can tolerate a lower confidence cutoff. Hard-to-reverse actions such as account deletion or refunds must be capped by the tool or escalated to a person.
- Confidence calibration: The code above uses 0.6 as a placeholder cutoff. Measure answer accuracy per confidence bucket (for example 0.6–0.7, 0.7–0.8, 0.8–0.9) on labelled historical tickets, and raise the cutoff for any bucket whose accuracy falls below your own target.
- Account tier: For strategic accounts or customers with high lifetime value, lower the tolerance for negative sentiment, for example by routing to a senior agent at the first sign of frustration instead of waiting for a second contact.
5. Quality sampling, failure modes and the first 30 days
Review a random sample of contained conversations every week, and add a second sample drawn from the highest-risk topics. Sampling math is simple: if the true error rate is p, the chance that a sample of n conversations contains at least one error is 1 − (1 − p)^n. Illustrative: at p = 2%, a sample of 100 catches at least one error about 87% of the time, and a sample of 150 about 95% of the time. Sampling finds an error class; it does not estimate a small rate precisely, so use it to find problems and fix the cause.
Four failure modes to watch for:
- Endless clarification loop: Given an ambiguous question, the agent keeps asking follow-ups instead of admitting it cannot answer. Detection: flag sessions with, for example, 3 or more consecutive clarifying questions and no tool call or retrieved source. Fix: after 2 clarification turns, escalate to a person with a summary of the intent.
- Invented entitlements: Under pressure from a persistent customer, the agent promises a refund, credit or SLA exception in prose. Detection: scan drafted replies for amounts, discounts and commitment language before sending. Fix: keep text generation apart from transactional tools, so a credit cannot be issued without a human approval token.
- Stale knowledge after a release: Pricing or cancellation policy changes but the old article stays indexed, and retrieval returns it. Detection: conflicting passages retrieved for the same question, or found in weekly sampling. Fix: give every article a review date and archive superseded versions when a new policy ships.
- Context lost at handoff: The customer explains the problem, the agent escalates, and the person opens with "How can I help you today?". Detection: escalated tickets show lower CSAT and a slower first human response than comparable human-only tickets. Fix: a structured handoff with intent, sentiment, 7-day contact history, retrieved snippets and a three-bullet summary.
Three objections come up often:
- "Doesn't escalating early defeat the cost-saving purpose of the AI?" In the 10,000-ticket hypothetical, early containment did not remove cost; it moved it into repeat contacts. Escalating low-confidence cases lowered total cost per resolved case there, though your numbers will differ.
- "Can't we just prompt the model never to promise refunds?" A prompt is guidance, and a model can be argued out of it, especially under emotionally charged or adversarial messages. Limits belong in the tool layer, through strict API schemas and approval tokens.
- "Is a 7-day re-contact window right for us?" It is a common starting point, not a rule. Fast-moving issues such as delivery problems may justify 3 days; complex billing or integrations may need 14. Pick one window per issue type and publish it.
A plan for the first 30 days:
- Days 1–7 (measurement): Link a customer's contacts across email, chat and voice. Fix the 7-day re-contact window, build the true resolution dashboard and share the baseline.
- Days 8–14 (knowledge base): Name an owner for every article the agent cites. Run the weekly report of the 20 most-cited articles, retire conflicting duplicates and log every query where retrieval found nothing.
- Days 15–21 (tool-layer guardrails): Put refund limits, identity checks and legal routing in the tools. Ship the escalation rules with logging of rule name and queue, and a structured handoff.
- Days 22–30 (sampling): Start weekly sampling with a written rubric covering accuracy, tone and grounding. Compare containment with true resolution and cost per resolution, and expand the agent's scope only where both meet targets you set in advance.
Decisions for Monday: stop reporting deflection alone, name a knowledge base owner for every article the agent cites, and move every money or legal rule out of the prompt and into the tools.