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


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: