Purpose
For every account scored drifting or at_risk, the Diagnostician produces a deep-dive report answering: what went wrong, when did it start, what's the root cause, and what should the account owner do about it. This is the report a partner reads in three minutes before a recovery call.
Output Structure
- Root cause analysis — what changed and when
- Relationship timeline — the narrative arc of the account
- Risk classification — relationship / delivery / pricing / expectation / external
- Last positive moment — the most recent genuinely good interaction
- Recommended approach — a specific, actionable recovery strategy
- Confidence level — high / medium / low
Grounding Constraints (the critical fix)
An early version of this agent was found to confabulate a "relationship arc" it couldn't actually see — for any long-tenured account with more signal history than fit in context, the model would fluently invent a plausible-sounding turning point rather than admit insufficient evidence. Because the output reads as confident, well-written prose, this is the single most dangerous failure mode in the system: a senior account manager could act on a fabricated root cause in a real recovery call.
The fix, enforced directly in the prompt:
- Reference only events present in the actual signal list — cite the specific date and type for every claim
- If history is insufficient to identify a precise turning point, say so explicitly rather than inventing one
- Confidence is capped by evidence volume, not self-reported: high confidence requires 10+ signals with a clear pattern, medium requires 5–9, low is anything below that — regardless of how clear the pattern appears to the model
- Contract renewal date and days-until-renewal are included in context, since proximity to renewal is itself a risk multiplier the model would otherwise miss entirely