At a glance
34 of 60 outputs had a failure. New types stopped appearing after about 45.
| Version | Catches good outputs (TPR) | Catches bad outputs (TNR) |
|---|---|---|
| v1, dev | 0.94 | 0.71 |
| v2, dev | 0.94 | 0.93 |
| v2, held-out test | 0.95 | 0.91 |
v1 passed drafts that blended two policies. One tighter definition and two examples fixed it, measured on labels it had never seen.
1. Success criteria
- Order-status, return and refund drafts: correct policy and order facts, sendable with light edits, on 90% of common cases
- Escalation: 100% of chargeback, legal, safety and harassment tickets flagged
- Refusals: never promises a refund, discount or delivery date that policy and order data do not support
- Length: under 120 words unless the customer asked several questions
2. Error analysis
60 traces sampled from the pilot week: 40 random, 20 from tickets agents marked "wrong". The support lead and the PM read each and wrote one note on the first failure.
Example open-coding notes:
- "Says returns accepted within 60 days. Oakline policy is 30 days for furniture, 60 for decor."
- "Pulled the customer's previous order, not the one in the subject line."
- "Customer mentioned 'disputing with my bank'. Draft offered a replacement."
- "Quoted the 2024 white-glove delivery fee."
Axial coding into failure types:
| Failure type | Traces | Fix before writing tests |
|---|---|---|
| Invented or blended policy | 9 | Policy articles split by product category; instruction to quote the policy line |
| Too long | 7 | Length rule plus one short example in the prompt |
| Wrong order data | 6 | Use the order number in the ticket first; show it in the draft header |
| Outdated content | 5 | Archive old articles; filter retrieval to current versions (see context-rag-debug) |
| Missed escalation | 4 | Separate escalation classifier before drafting |
| Ignored the workspace's macro or tone | 3 | Retrieve the matching macro and use it as the base |
| Traces with a failure | 34 of 60 |
New failure types stopped appearing after about trace 45.
3. Checks per failure type
| Failure type | Grader | Check |
|---|---|---|
| Invented policy | LLM judge (faithfulness) | Every policy claim is supported by a retrieved policy passage |
| Too long | Code | Word count ≤ 120 unless the input has 2 or more questions |
| Wrong order data | Code | Order number in the draft equals the gold order number |
| Outdated content | Code | No retrieved source has status: archived; known stale figures are in must_not_include |
| Missed escalation | Code | escalated flag equals should_escalate |
| Ignored macro or tone | LLM judge (tone) | Uses the macro's structure; no blame of the customer |
Case set: 120 cases. 70 common, 20 edge, 15 should-escalate, 5 should-refuse, 10 regressions (one per fixed bug from the pilot).
4. Judge validation: faithfulness judge
80 drafts labeled pass/fail by the support lead: 6 few-shot examples, 30 dev, 44 test (22 pass, 22 fail).
| Version | Split | TPR | TNR | Note |
|---|---|---|---|---|
| v1 | dev | 0.94 | 0.71 | Passed drafts that blended two policies |
| v2 | dev | 0.94 | 0.93 | Definition now says "a claim combining two policies is unsupported"; added two blended examples |
| v2 | test (once) | 0.95 | 0.91 | Accepted for gating |
5. Results (3 trials per case)
| Category | Bar | Baseline prompt | After fixes | Status |
|---|---|---|---|---|
| Common | 90% | 81% | 94% | Pass |
| Edge | 75% | 60% | 78% | Pass |
| Should escalate | 100% | 80% | 100% | Pass |
| Should refuse | 100% | 100% | 100% | Pass |
| Regression | 100% | n/a | 100% | Pass |
Consistency: 3 common cases passed on some trials and not others; all three are multi-item orders. Added to the capability suite.
Top remaining failures: multi-order threads (5 cases), partial refunds with store credit (3 cases).
6. Decision
Ship to the 10-workspace pilot. Regression suite runs on every prompt, model or retrieval change. Weekly: sample 30 live traces, repeat open coding, add new failure types.