Escalation Paths and Override Metrics
Escalate to a person when a policy check or a calibrated confidence check fails, hand off with the right context and deadline, and track how often approvals are requested and overridden, tool by tool.
Contentsand lesson path
On this page
Lessons of Human-in-the-Loop Control
- Which Actions Need a Human? Concept · 15 min
- Interrupting Before a Risky Tool Call Worked example · 20 min
- Lab: Approve, Edit or Reject, Then Resume Lab · 25 min
- Approval Design and Approval Fatigue Concept · 15 min
- Escalation Paths and Override Metrics Worked example · 15 min
- Check: Human Oversight Scenarios Knowledge check · 8 questions
What you will learn
- Escalate to a human when confidence or policy checks fail, and track how often approvals are requested and overridden.
Prerequisites: Agent Loops & ReAct
01. Why It Matters
An approval gate handles the risks you predicted: refunds above $50 always go to a reviewer. Escalation handles the cases where the agent should not decide at all, because a check failed or the agent cannot tell. Without a clear escalation path, an unsure agent either guesses or stops with an unhelpful error, and both reach the customer.
Every review and every escalation also produces data. If you count how often you ask for approval and how often reviewers change the answer, you learn whether the gate is too wide, too narrow, or protecting little. This lesson works through both halves on a refund agent.
02. The Problem
A support agent proposes refunds. Before anything runs, two checks look at each proposal:
- A policy check: deterministic rules in code (order exists, item is in the refund window, account is not closed). It returns ALLOW, DENY or UNKNOWN. UNKNOWN means the rules could not decide, for example because the order record is missing.
- A confidence score: a number from a verifier model or classifier that says how likely the proposal is to be right. It is only useful if it is calibrated: you have checked it against labelled past cases, so that "0.8" really means about 80% of such proposals were correct. A model rating its own answer is often poorly calibrated, so do not use that as the score.
Your job: decide for each case whether it runs on its own (AUTO), waits for a normal approval (APPROVAL), or escalates to a specialist queue (ESCALATE). Then measure how the gate behaves.
03. Worked Solution
Step 1: choose the triggers. Escalate when:
- the policy check returns anything other than ALLOW. UNKNOWN is the common case: missing evidence is a reason to ask a person, not a reason to guess. Some teams send a clear DENY straight to a refusal message instead; the code below escalates both to keep the example short;
- the calibrated score is below a threshold you chose from labelled data;
- two checks disagree, such as a high score on a proposal the rules cannot confirm;
- reviewers have rejected the same case repeatedly, which shows the agent is stuck.
Step 2: decide what the handoff carries. An escalation names a target (here the refunds-tier2 queue), a deadline from its service level agreement (SLA, the promised response time: four hours here), the reason code, and the context a specialist needs so the customer does not have to repeat themselves. It also fixes what the agent does while it waits. Here the run pauses, as in Lab: Approve, Edit or Reject, Then Resume with interrupt(), and the customer is told that a person will reply. The agent does not keep acting on the case.
"""Decide whether a proposed action may run, needs approval, or must escalate."""
import json
from dataclasses import dataclass
from datetime import datetime, timedelta, timezone
ALLOW, DENY, UNKNOWN = "ALLOW", "DENY", "UNKNOWN"
THRESH = 0.80 # chosen from labelled past cases, not from the model's self-rating
SLA = {"refunds-tier2": timedelta(hours=4)}
@dataclass
class Case:
case_id: str
tool: str
amount_cents: int # money as integer cents, never a float
policy: str # result of the rules engine: ALLOW, DENY or UNKNOWN
score: float # calibrated score from a verifier model or classifier
rejections: int = 0 # earlier human rejections on this case
def escalate(case, reason, now):
return {"route": "ESCALATE", "reason": reason, "queue": "refunds-tier2",
"respond_by": (now + SLA["refunds-tier2"]).isoformat(timespec="minutes"),
"context": {"case_id": case.case_id, "tool": case.tool,
"amount_cents": case.amount_cents,
"policy": case.policy, "score": case.score},
"agent_state": "paused; customer told a person will reply"}
def decide(case, now):
if case.policy != ALLOW or case.score < THRESH:
reason = f"policy={case.policy}" if case.policy != ALLOW else "low_score"
return escalate(case, reason=reason, now=now)
if case.rejections >= 2: # the agent keeps proposing what humans refuse
return escalate(case, reason="repeated_rejection", now=now)
if case.amount_cents > 5000: # $50.00
return {"route": "APPROVAL", "reason": "amount above autonomy limit"}
return {"route": "AUTO", "reason": "low-risk, policy ALLOW"}
if __name__ == "__main__":
now = datetime(2026, 11, 16, 9, 0, tzinfo=timezone.utc) # fixed for the demo
cases = [Case("c-1", "refund", 2000, ALLOW, 0.95),
Case("c-2", "refund", 145000, ALLOW, 0.91),
Case("c-3", "refund", 30000, UNKNOWN, 0.93), # order record missing
Case("c-4", "refund", 8000, ALLOW, 0.55),
Case("c-5", "refund", 12000, ALLOW, 0.88, rejections=2)]
for case in cases:
result = decide(case, now)
print(case.case_id, result["route"], "-", result["reason"])
print(json.dumps(decide(cases[2], now), indent=1))python3 escalation.pyc-1 AUTO - low-risk, policy ALLOW
c-2 APPROVAL - amount above autonomy limit
c-3 ESCALATE - policy=UNKNOWN
c-4 ESCALATE - low_score
c-5 ESCALATE - repeated_rejection
{
"route": "ESCALATE",
"reason": "policy=UNKNOWN",
"queue": "refunds-tier2",
"respond_by": "2026-11-16T13:00+00:00",
"context": {
"case_id": "c-3",
"tool": "refund",
"amount_cents": 30000,
"policy": "UNKNOWN",
"score": 0.93
},
"agent_state": "paused; customer told a person will reply"
}Read the five lines against the rules. Case c-3 has a high score (0.93) but the policy check returned UNKNOWN, so it escalates: a confident model does not replace missing evidence. It is also the disagreement case from step 1. Case c-4 passes the policy check but its score of 0.55 is below the threshold. Case c-5 passes both, but reviewers have rejected it twice. Only c-1 runs on its own, and c-2 goes through the normal approval gate because of its amount. The order of the checks matters: the escalation checks come first, so a case that fails one cannot reach the cheaper AUTO path.
Step 3: measure the gate. Two rates, both computed per tool:
- Approval request rate = approval requests (interrupts) ÷ all risky-eligible tool calls, meaning every call your risk rules consider, whether it ran on its own or not. It tells you how often you ask a person.
- Override rate (human override rate, HOR) = (edits + rejections) ÷ approval requests. It tells you how often the person disagreed with the agent.
Report them side by side. An override rate computed only over interrupted actions hides how many actions you interrupt in the first place. Alongside them, track time to decision, the share of requests that missed their SLA, and the escalation rate (escalations ÷ cases).
"""Approval request rate and override rate per tool, from one week of events."""
from collections import Counter
# One row per risky-eligible tool call: (tool, outcome). AUTO = ran without a
# human; the other outcomes were sent to a reviewer (an interrupt).
EVENTS = ([("refund", "AUTO")] * 1200 + [("refund", "APPROVE")] * 344 +
[("refund", "EDIT")] * 36 + [("refund", "REJECT")] * 20 +
[("send_email", "AUTO")] * 150 + [("send_email", "APPROVE")] * 846 +
[("send_email", "EDIT")] * 3 + [("send_email", "REJECT")] * 1)
counts = Counter(EVENTS)
for tool in ("refund", "send_email"):
eligible = sum(n for (t, _), n in counts.items() if t == tool)
asked = eligible - counts[(tool, "AUTO")]
overridden = counts[(tool, "EDIT")] + counts[(tool, "REJECT")]
print(f"{tool:<10} eligible={eligible:<5} requests={asked:<4} "
f"request_rate={asked / eligible:.0%} override_rate={overridden / asked:.1%}")python3 metrics.pyrefund eligible=1600 requests=400 request_rate=25% override_rate=14.0%
send_email eligible=1000 requests=850 request_rate=85% override_rate=0.5%Step 4: read the numbers. The two tools tell different stories.
For refund, a quarter of eligible calls reach a reviewer, and reviewers change 14% of them. That is a lot of disagreement: the agent is often wrong on the cases you route to people. Do not widen its autonomy yet. Group the overrides by cause (wrong amount, wrong customer, missing policy step), fix the prompts, tools or rules behind the largest group, and watch the rate fall.
For send_email, 85% of calls reach a reviewer and fewer than 1 in 100 is changed. The gate asks a lot and finds little, which is the setting for approval fatigue from Approval Design and Approval Fatigue: reviewers who almost always click approve may stop reading. Narrow the trigger (for example, review only emails to new recipients or with attachments) and audit a random sample of approvals to check that reviews are real.
What override rate is "healthy"? There is no general number. As an illustration, a team might measure its refund tool for a few weeks, compare the overrides with later audits, and decide that above 8% the agent needs work and below 3% the gate needs a fatigue check. That band is their calibration for their costs and reviewers, not a norm to copy. Set yours from your own data, per tool, and revisit it when the model, prompt or policy changes.
04. Verify Your Understanding
05. Apply It
In the skill's practice project (the agent that sends emails and issues refunds):
- Add a policy check that returns ALLOW, DENY or UNKNOWN for each tool, and escalate on anything but ALLOW, with a queue, an SLA deadline and the case context in the payload.
- Log one row per risky-eligible call with the tool, the route and the human decision, and compute request rate and override rate per tool each week.
- When a pending escalation passes its deadline, move it to a second queue and record that it missed the SLA.
- Write down, per tool, the override band you will treat as a warning, and the data you used to choose it.
06. Review Prompt
Without looking back, list four triggers for escalation and explain why a high score does not override an UNKNOWN policy result. Describe what an escalation payload contains and what the agent does while it waits. Then define the approval request rate and the override rate, say what each denominator is, and explain what a high request rate with a very low override rate suggests.
References
Your progress
Reading state
Sign in to save that you finished reading this lesson.
Prove this skill
8 questions · about 6 minutes · scored automatically. Marking a lesson as read never demonstrates a skill.