Under the hood: ML foundation and technical architecture
A technical deep-dive into how RetainGuard predicts policyholder churn, processes risk signals and delivers AI-generated guidance across 9 insurance roles.
For Part 1 (business overview, personas, scenario walkthrough), see (blog part 1 link).
The ML foundation
The churn prediction engine at the core of RetainGuard is an XGBoost model trained on policyholder data and deployed as a real-time inference endpoint on Amazon SageMaker. It scores each policyholder against 58 encoded features and returns a churn probability between 0.0 and 1.0, with sub-second latency for individual requests and full batch support for portfolio-wide scoring.
What the 58 features cover
The model draws on seven categories of policyholder data:
| Category | What it captures |
|---|---|
| Demographics | Age, location, customer segment |
| Policy configuration | Policy type, coverage level, contract term, auto-renewal status |
| Claims history | Claim count, rejection rate, claim type, recency |
| Billing behavior | Payment history, missed payments, premium changes, payment method |
| Customer satisfaction | NPS score, satisfaction trend, complaint frequency |
| Digital engagement | Channel usage, login frequency, self-service activity |
| Calculated risk indicators | Risk index, churn velocity, tenure score |
No single feature drives the score. The model weighs the full combination - a policyholder with a low NPS and disabled auto-renewal is a different risk profile than one with late payments and no claim history. The 58-feature evaluation captures that difference.
Risk intelligence pipeline
It is deployed as a real-time inference endpoint. It accepts individual and batch requests, returns a churn probability with sub-second latency and classifies risk into three tiers.

Fig4: Churn-Risk-Intelligence-Pipeline
- Risk signal detection: Beyond the ML score, a rule-based engine identifies specific churn triggers: monthly contracts, disabled auto-renewal, late payments, claim rejections, policy lapses, low satisfaction scores, premium hikes and high risk indices
- Continuous retraining: An automated pipeline handles data processing, training, evaluation, model registration with approval workflows, drift detection and retraining. The model does not go stale
- Risk classification: Churn probability mapped to three tiers: LOW (below 40%), MEDIUM (40-70%), HIGH (above 70%). CLV and Revenue-at-Risk are calculated from the annual premium and churn score
Why this matters for insurance
Insurance is a relationship business with long policy cycles. Losing a policyholder means losing years of future premium revenue, the cost of acquiring a replacement and often the loss of cross-sell potential across multiple product lines.
Most insurers already have data that could predict churn. The gap is not in data collection. It sits in three areas:
- Timing - knowing early enough to act, not after the cancellation request lands
- Context - understanding why this specific policyholder is at risk, not just that they are
- Action - giving the right team the right recommendation, in a format they can use immediately
RetainGuard addresses all three. The ML model provides early detection. The risk signals provide context. The AI agents provide actionable, role-specific guidance.
The combination of ML prediction and Agentic AI advisory closes the gap between "knowing a customer might leave" and "knowing what to do about it, right now, for your specific role."
Technical architecture

Fig. 5: Technical Architecture
- Prediction engine: SageMaker real-time endpoint for churn scoring, with automated pipelines for retraining, model registry for versioning and approval workflows for production deployment
- AI Advisory layer: Amazon Bedrock with Claude models - Haiku for fast, lightweight advisory and Sonnet for deep reasoning tasks like retention planning, premium optimization and compliance audits
- Persistence layer: Amazon DynamoDB for prediction history and agent output logs. Amazon S3 for model artifacts, training data and pipeline outputs





