Documentation Index
Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Smart Policy Recommender analyzes your interaction history data to identify contact frequency patterns and recommend optimal contact policies. It looks at how often customers are contacted, through which channels, and how they respond — then suggests policies that reduce fatigue and improve engagement. Navigate to AI > Policy Recommendations in the sidebar to view the dashboard, or trigger analysis programmatically viaPOST /api/v1/ai/analyze/policies.
The dashboard page (/ai/policy-recommendations) runs two intelligence tools automatically on load and every 5 minutes:
- analyzePolicyConflicts — Detects contradictions, overlaps, and misconfigurations between your policies
- analyzeContactPolicySuppression — Identifies channels or policies with abnormally high suppression rates
What It Analyzes
The recommender examines two dimensions of your interaction data:- Frequency bands — How contact frequency (contacts per week) correlates with conversion rates. It identifies the “sweet spot” where customers are contacted often enough to stay engaged but not so often that they disengage. The system generates frequency bands at 1, 3, 5, 7, and 10 contacts per week.
- Channel performance — Which channels produce the best engagement. For each channel, the analyzer tracks impressions, clicks, and conversions to compute click-through rate (CTR) and conversion rate (CVR).
Analysis Output Format
Each analysis returns one or morePolicyRecommendation objects with this structure:
| Field | Type | Description |
|---|---|---|
type | "policy" | Always "policy" |
title | string | Action-oriented title (e.g., “Set frequency cap to 3/week”) |
description | string | Data-backed reasoning with sample sizes |
payload | object | Machine-readable policy definition with ruleType, scope, channel, maxContactsPerWeek, suggestedAction |
confidence | enum | "high" (sample > 1,000), "medium" (200—1,000), "low" (< 200) |
metadata.frequencyBands | array | Contacts-per-week to conversion-rate mapping |
metadata.channelBreakdown | array | Per-channel impressions, clicks, conversions |
metadata.estimatedImpact | string | Expected business impact description |
Dual-Tier Analysis
The recommender supports two analysis tiers, automatically routed by theMlRouter:
| Tier | When Used | Method |
|---|---|---|
| LLM | Default, or when ML Worker is unavailable | Builds an interaction summary (channel breakdown + frequency bands) and uses generateObject() with the configured LLM to identify patterns and generate recommendations |
| ML Worker | When ML Worker is connected and dataset exceeds 5,000 rows | Submits an async job to the Python ML Worker for statistical analysis using sklearn — frequency binning, correlation analysis, and optimal threshold calculation |
Heuristic Fallback
If the LLM call fails (provider error, timeout, etc.), the recommender falls back to a deterministic heuristic analysis that:- Finds the optimal frequency — Identifies the contacts-per-week band with the highest conversion rate
- Detects drop-off — Finds where conversion rate drops below 50% of the peak
- Recommends a frequency cap — Sets the cap one step below the drop-off point
- Flags low-engagement channels — Channels with CTR below 2% and at least 100 impressions get a “reduce frequency” recommendation
- Highlights high-converting channels — Channels with CVR above 10% and at least 50 clicks get a “prioritize” recommendation
Reading the Frequency Charts
The recommender displays an interactive frequency analysis chart:- X-axis — Contact frequency (contacts per week)
- Y-axis — Conversion rate (percentage)
- Curve — Shows how conversion rate changes as contact frequency increases
- Optimal zone — Highlighted region where the frequency-to-response ratio is highest
- Current average — A marker showing your current average contact frequency
metadata.frequencyBands array in the recommendation response.
Applying Recommendations
When you click Apply on a recommendation:- A new Contact Policy is created in draft status
- The policy is pre-configured with the recommended frequency limit, time window, and channel scope
- You are taken to the Contact Policies page to review and activate it
Best Practices
- Run analysis regularly — Customer behavior changes over time. Re-run the recommender monthly or after major campaign changes.
- Start with global policies — Apply broad frequency caps first, then refine per-channel.
- Compare tiers — If both LLM and ML Worker are available, compare their recommendations. The ML Worker is more precise for large datasets; the LLM can surface qualitative insights the ML Worker misses.
Advanced Parameters
Each policy analysis run can be fine-tuned using the Advanced Parameters panel. Expand it to adjust:| Parameter | Min | Max | Default | Description |
|---|---|---|---|---|
| Daily Cap | 1 | 100 | 3 | Max messages per customer per day |
| Weekly Cap | 1 | 500 | 10 | Max messages per customer per week |
| Monthly Cap | 1 | 2,000 | 30 | Max messages per customer per month |
| Lookback Days | 7 | 730 | 90 | How far back to analyze interaction history |
| Min Sample Size | 10 | 10,000 | 100 | Minimum interactions before analysis is meaningful |
Large Dataset Warning
When the interaction history contains 5,000 or more rows, a confirmation dialog appears before analysis begins. The dialog shows:- Accuracy comparison — ML Worker uses logistic regression and statistical analysis on the full dataset vs. LLM pattern matching on summarized data
- Estimated cost — Token count and approximate cost if proceeding with LLM
- Speed comparison — ML Worker processes locally in seconds vs. LLM round-trip
Next Steps
AI Configuration
Configure default policy analysis parameters.
Contact Policies
Learn how contact policies work in the decisioning engine.
AI Insights Dashboard
View and apply policy recommendations.