Claude Architect · 강의

에스컬레이션 및 지표 안티 패턴

감정 기반 에스컬레이션, 확신 점수 및 집계만 사용하는 지표를 다룹니다

레슨 4/413개 단계

에스컬레이션 및 지표 안티 패턴은(는) CoddyKit의 무료 Claude Architect 강의입니다. 이것은 4개 중 4번째 강의입니다. 아래에서 전체 강의를 무료로 읽을 수 있으며, 내장 코드 에디터와 24/7 AI 튜터와 함께 브라우저에서 직접 실습할 수 있습니다. 이 강의는 Claude Architect 학습 경로의 일부이며, 진행 상황이 웹과 CoddyKit 앱에 동기화됩니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

이 강의의 일부는 아직 번역되지 않았으며 영어로 표시됩니다.

Two Silent Failure Modes

Production agents rarely fail loudly. They fail by handing off to humans for the wrong reasons and by reporting health metrics that hide real damage.

This lesson dissects two exam-favorite anti-patterns: escalation driven by sentiment or self-rated confidence, and aggregate-only accuracy metrics. Both feel reasonable, both pass a demo, and both quietly erode trust at scale.

Architect-grade systems escalate on defensible triggers and measure performance stratified by what actually matters.

What a GOOD Escalation Trigger Looks Like

Escalation to a human is a privileged action. It should fire on triggers you can defend in an audit:

  • Explicit human request — the customer asks for a person, you escalate immediately.
  • Policy gaps — no rule covers this case.
  • No progress — repeated attempts have not resolved the issue.
  • Threshold violations — e.g. a refund exceeds an allowed limit.

Each of these maps to a concrete, observable fact in the conversation or the tool results — not to a guess about how the user feels.

def should_escalate(turn):
    if turn.customer_requested_human:
        return True            # explicit request -> escalate now
    if turn.no_matching_policy:
        return True            # policy gap
    if turn.attempts >= turn.max_attempts and not turn.resolved:
        return True            # no progress after real attempts
    if turn.refund_amount > REFUND_LIMIT:
        return True            # threshold violation
    return False

The Sentiment Escalation Trap

It is tempting to wire escalation to a sentiment classifier: "if the user sounds angry, hand off to a human."

This is a bad trigger. Sentiment is noisy, easy to misread, and uncorrelated with whether the agent can actually solve the problem. A calm user with an impossible request still needs escalation; a frustrated user with a one-step fix does not.

Escalating on emotion floods your human queue with solvable tickets and trains the agent to give up instead of resolving.

Self-Rated Confidence Is Not a Trigger Either

The second seductive anti-pattern: ask the model to rate its own confidence 1-10 and escalate when it is "low."

A model's self-rated confidence is not calibrated. It can be supremely confident while wrong and hesitant while correct. The same applies to untrained classifiers bolted onto the pipeline.

Confidence theater gives you a number that looks like a signal but carries no reliable information about correctness.

# Anti-pattern: escalate on the model's own confidence score
ESCALATE_IF = """Rate your confidence 1-10. If <= 4, escalate."""
# Problem: that 1-10 number is uncalibrated. The model may rate
# a hallucinated answer 9/10. This signal is not trustworthy.

The Right Pattern for Emotional Conversations

Frustration is real and worth handling — just not as an escalation trigger. The correct pattern is a sequence:

  • Acknowledge the emotion — show the user they were heard.
  • Propose a concrete solution — actually attempt to resolve the issue.
  • Escalate only if the request is reiterated — if the user still insists on a human after a genuine attempt.

This resolves most cases in-agent and reserves human time for situations that truly need it.

SYSTEM = """When a customer is upset:
1. Acknowledge their frustration briefly and sincerely.
2. Propose a concrete next step using your tools.
3. Escalate to a human ONLY if they reiterate the request
   for a person after you have attempted a solution.
Never escalate based on tone alone."""

Ambiguous Identity: Ask, Don't Guess

A related reliability rule shows up in the Customer Support scenario. When a lookup returns multiple matching customers, the agent must ask for more identifiers — never guess which record is correct.

Guessing risks acting on the wrong account: refunding the wrong order, leaking another person's data. "Most likely match" is not good enough when the action is irreversible.

Like escalation, identity resolution should rest on observable facts, not probabilistic hunches.

result = get_customer(email=email)
if len(result.matches) > 1:
    # Do NOT pick the first / 'most likely' match.
    return ask_user(
        "I found multiple accounts. Can you share your order "
        "number or postal code so I can find the right one?"
    )

Deterministic Enforcement for Hard Limits

Some escalation triggers are really business rules — and business rules with financial, legal, or safety stakes must not rely on the prompt.

Prompts are roughly 90% probabilistic; hooks are 100% deterministic. A PostToolUse or outgoing-call hook can block a policy-violating action (e.g. a refund over $500) before it ever executes, regardless of what the model decided.

If a threshold violation has real consequences, enforce it with a hook, not a hopeful instruction.

{
  "hooks": {
    "PostToolUse": [{
      "matcher": "process_refund",
      "command": "./guards/block_refund_over_500.sh"
    }]
  }
}
// Hook rejects refund_amount > 500 deterministically,
// forcing escalation instead of trusting the prompt.

Why Aggregate Accuracy Lies

Switching to metrics: a single headline number like "97% accuracy" is one of the most dangerous things on an architect's dashboard.

An aggregate average can hide poor performance on a specific document type or field. Your extractor might be 99% accurate on invoices and 60% accurate on handwritten receipts — and the blended 97% looks great while the receipt path is quietly broken.

Aggregate-only metrics give false confidence and delay the discovery of localized failures.

Stratify by What Matters

The fix is stratified random sampling plus field-level confidence. Instead of one global score, you break performance down across the dimensions that carry risk: document type, field, customer segment, language.

Stratification surfaces the 60%-accurate receipt path that the average concealed. It turns "the system works" into "the system works here and fails there" — which is the only statement you can act on.

# Don't report one number. Report per-stratum accuracy.
for doc_type in ("invoice", "receipt", "handwritten"):
    sample = stratified_sample(labeled_set, doc_type, n=200)
    for field in REQUIRED_FIELDS:
        acc = field_accuracy(sample, field)
        print(doc_type, field, acc)   # exposes hidden weak spots

Calibrate Before You Automate

Field-level confidence is only useful if it is calibrated on a labeled validation set before you let it gate automation. Calibration tells you what a confidence of 0.8 actually means in terms of real-world correctness.

Without calibration you are back to confidence theater — the same flaw as a model self-rating 1-10. The discipline is identical for escalation and for metrics: trust a number only after you have shown it tracks reality.

Detecting Discrepancies, Not Just Reporting Scores

Good measurement also builds in self-checks. For extraction, have the model surface both a calculated_total and a stated_total so a downstream validator can flag mismatches — a concrete, verifiable signal instead of a vibe.

This pairs naturally with stratified metrics: discrepancies cluster in exactly the strata your aggregate number was hiding. Measure where it breaks, then enforce the limits with deterministic guards.

schema = {
    "type": "object",
    "properties": {
        "calculated_total": {"type": "number"},
        "stated_total": {"type": "number"}
    },
    "required": ["calculated_total", "stated_total"]
}
# Validator compares the two; a gap is a hard, actionable signal.

Quick Check: Escalation Trigger

Apply the rule to a real design decision.

Recap: Defensible Triggers, Honest Metrics

Key takeaways:

  • Good escalation triggers: explicit human request, policy gaps, no progress, threshold violations.
  • Bad triggers: sentiment, model self-rated confidence, untrained classifiers — none are calibrated signals.
  • Emotional cases: acknowledge, propose a solution, escalate only if reiterated. With multiple identity matches, ask for more identifiers — never guess.
  • Hard limits (refund > $500) belong in deterministic hooks, not prompts.
  • Aggregate accuracy hides weak document types and fields. Use stratified sampling and field-level confidence calibrated on a labeled set before automating.

Escalate on facts; measure where it breaks.

무료로 시작

AI 튜터와 함께 Python을(를) 배우세요 — 무료

브라우저에서 실제 코드를 작성하고 실행하며, 24/7 AI 튜터로부터 즉각적인 도움을 받고, 웹이나 앱에서 중단한 부분부터 계속 학습하세요.

코스
26
레슨
104

자주 묻는 질문

“에스컬레이션 및 지표 안티 패턴” 강의는 무료인가요?

네 — “에스컬레이션 및 지표 안티 패턴” 전체 내용을 이 웹사이트에서 무료로 읽을 수 있습니다. 인터랙티브하게 실습하려면(내장 코드 에디터와 24/7 AI 튜터), CoddyKit PRO로 업그레이드하면 Claude Architect 강의 전체를 잠금 해제할 수 있습니다. Claude Architect 강의에는 총 4개의 강의가 포함되어 있습니다.

“에스컬레이션 및 지표 안티 패턴”에서 뭘 배우나요?

감정 기반 에스컬레이션, 확신 점수 및 집계만 사용하는 지표를 다룹니다 브라우저에서 직접 실행하는 실습 코드로 Claude Architect을(를) 배우며, 24/7 AI 튜터가 강의를 진행하면서 질문에 답변해줍니다.

Claude Architect을(를) 시작하는 데 경험이 필요한가요?

사전 경험은 필요하지 않습니다. CoddyKit의 Claude Architect은(는) 초급자부터 고급 학습자까지를 위해 구성되어 있으므로, 여기서 시작하거나 처음부터 시작할 수 있으며 자신의 속도대로 진행할 수 있습니다. 이것은 4개 중 4번째 강의입니다.

“에스컬레이션 및 지표 안티 패턴” 강의는 얼마나 걸리나요?

대부분의 CoddyKit 강의는 약 5~10분이 소요됩니다. 각 강의는 간결하고 인터랙티브하여 꾸준한 진행이 가능하며, 웹과 앱에서 중단한 부분부터 바로 시작할 수 있습니다.

이 Claude Architect 강의에서 코드를 작성하고 실행할 수 있나요?

네. 모든 Claude Architect 강의에는 내장 코드 에디터가 포함되어 있으므로, 브라우저에서 바로 실제 코드를 작성하고 실행한 후 즉시 AI 피드백을 받을 수 있습니다 — 로컬 설정이 필요 없습니다.

이 강의의 모든 강의

  1. 루프 및 오케스트레이션 안티 패턴
  2. 도구 및 오류 안티 패턴
  3. 프롬프트 및 검토 안티 패턴
  4. 에스컬레이션 및 지표 안티 패턴
← Claude Architect(으)로 돌아가기