Technical Architecture
Components, integrations, data flow, and system constraints
Treat deviation handling as a first-class runtime system, not a reporting afterthought. Every component is designed for real-time classification, proportional intervention, and continuous learning from agent behavior.
Core Components
Eight services that form the deviation-intelligence runtime.
Copilot Panel UI
Suggestion card, override action, deviation status, and supervisor approval — all inline within the agent workspace.
Deviation Classification Service
Real-time classification of every override in <500ms. Labels deviation type (corrective, cost-risk, policy-risk, quality-risk).
Risk Scoring + Policy Mapping
Computes a 0–21 weighted risk score per override and performs policy_criticality lookup to determine severity.
Selective Intervention Router
Maps risk tier to the appropriate friction level: allow (L), justify (M), approve (H), or block (C).
Supervisor Queue Service
Receives Tier H and C overrides only. SLA timers enforce response deadlines. Queue is prioritized by risk score.
Post-Resolution Audit Pipeline
Batch audit pipeline. 10% random sample of Tier L cases plus all escalated cases feed into the QA review queue.
Learning & Calibration Pipeline
Adjusts risk thresholds based on FP/FN rates, promotes approved overrides to suggestion updates, and recalibrates weekly.
Inference Gateway
Tier-based model routing with token budgets. Routes Tier L to lightweight models and Tier H/C to high-capability models.
Integration Topology
Five external systems the copilot connects to, each with a defined integration pattern.
Subscribes to assignment and escalation events to track case flow and agent workload in real time.
Reads case context and conversation history; writes copilot suggestions, deviation tags, and resolution metadata back.
Receives handoff events when self-serve fails to resolve. Passes context (attempted resolution, user intent) to the agent workspace.
Serves policy documents by version and market. The classifier and risk scorer query active policy rules at inference time.
Emits structured events — deviation class, risk score, intervention decision, outcome — to the analytics and QA pipeline.
Primary Data Flow
End-to-end path from customer contact to learning loop.
Fork points: FAQ/Self-Serve may resolve the case (→ END). If the agent follows the copilot suggestion, the case proceeds directly to Resolution with a log entry. Overrides enter the classification pipeline.
Non-Negotiables
Five architectural constraints that cannot be traded away.
Low-latency classification
Deviation classification completes in <500ms. Agents never wait for the system to catch up.
Explainable rationale
Every intervention surfaces the contributing risk factors and policy references so the agent understands why.
Minimal friction for Tier L
70% of overrides pass with zero added friction — just a log entry. The system is invisible when risk is low.
Full provenance for escalated actions
Tier H and C cases carry a complete audit trail: deviation class, risk breakdown, agent rationale, supervisor disposition.
Graceful degradation
If the classifier or gateway is unavailable, the system defaults to Tier M (reason tag required) — never blocks agents outright.
Key Logged Fields
Every deviation event emits these fields for analytics, audit, and learning.
| Field | Description |
|---|---|
deviation_class | Corrective, cost-risk, policy-risk, quality-risk, or empathy-within-policy |
risk_score | Composite 0–21 weighted score with per-factor breakdown |
intervention_decision | Allow, justify, approve, or block — plus the tier that triggered it |
agent_reason_tag | Structured tag selected by the agent when justification is required |
supervisor_disposition | Approved, rejected, or modified — with optional supervisor note |
final_case_outcome | Resolution type, CSAT score, reopen flag, and cost-to-serve |
automation_handoff_context | Self-serve attempt details passed at handoff: intent, steps tried, failure reason |
suggestion_accepted | Boolean — whether the agent accepted the copilot suggestion as-is or overrode it |