How to Analyze Churn Using AI
Review customer churn, compare segments, and explain changes with AI using the metrics in your Cube deployment.
- Define the churn metric
- Compare customer segments
- Review supporting results
What is customer churn analysis with AI?
Customer churn analysis measures how many customers stop using a product during a defined period and examines where those losses occur. An AI agent can help query the available metrics, compare plans or cohorts, and summarize the results. The customer population, churn event, and time window still need an explicit definition.
This workflow reviews historical churn using an existing Cube deployment and its modeled metrics. It does not train a churn prediction model. A segment with a high observed churn rate is a starting point for investigation; it does not establish why a customer left or predict which customer will leave next.
Start with a clear churn definition
Choose the churn event, customer population, and time period before comparing results. For plan comparisons, use the plan each customer had at the start of the period.
| Metric | Illustrative example |
|---|---|
| Customer churn rate | 46 of 1,000 customers active on June 1 left by June 30: 4.6%. |
| Churn by plan | Starter: 36 of 600 customers (6.0%); Growth: 9 of 300 (3.0%). |
| Gross revenue churn | Report recurring revenue lost to cancellations and downgrades separately from customer churn. |
| Signup cohort retention | Compare customers who started in the same month at the same tenure. |
Copy. Paste. Run your churn review.
Connect to Cube via MCP or our CLI, then run the prompt below in your preferred agent.
Start with a Cube deployment connected to your data and a model containing the metrics you want to analyze.
Connect over MCP
Connect your agent to your existing Cube deployment and sign in through OAuth.
https://cubecloud.dev/mcp
Complete OAuth in your agent to connect your Cube account.
Use your default deployment or select another one available to your account.
Connect with CLI
Install the Cube CLI and sign in from a terminal-capable agent.
curl -fsSL https://raw.githubusercontent.com/cube-js/cube/master/install-cli.sh | sh
cube login --url https://TENANT.cubecloud.dev
cube spec --json
02Run this prompt in your agent
Choose your agent and copy the prompt below.
Use the Cube MCP server connected in Codex and select the intended deployment. Run read-only analytics queries. Run a customer churn review using my connected Cube deployment.Use read-only requests and keep credentials and customer identifiers private. DEFINITIONSInspect the model and report the available churn metric, its numerator,denominator, customer grain, time zone, and effective churn event.Use the approved business definition. If a required metric or input ismissing, explain the gap instead of inventing a measure or a result. ANALYSIS1. Review the last three complete calendar months. State their exact dates.2. For each month, show customers active at the start, customers from that population who churned, and churn rate. Compare changes in percentage points. Do not average segment rates to obtain the overall rate.3. Compare available segments such as plan or region. Show the opening population, losses, rate, and share of total losses for each segment. Flag small samples and use segment membership at the period start.4. If recurring revenue metrics exist, report gross revenue churn separately. Explain whether contraction and expansion are included.5. If cohort data exists, compare retention at equal tenure. Keep calendar month churn and signup-cohort retention separate. OUTPUTReturn the metric definitions, result tables, query context, and a conciseinterpretation. Separate observed patterns from hypotheses about causes.Recommend follow-up checks that can test those hypotheses. Do not inventchurn-risk scores or claim causal drivers without supporting evidence.
How it works
Confirm the churn definition
Check the effective churn event, opening customer population, time zone, and reporting period. Scheduled cancellations and subscription end dates can describe different events.
Compare rates and losses
Review monthly churn alongside customer counts. Compare plans or cohorts consistently so that a high percentage in a small segment does not hide a larger source of losses.
Investigate the pattern
Use the returned results to decide which segment needs a closer look. Check cancellation reasons, product activity, or support history before attributing churn to a specific cause.
What a churn review can reveal
Compare the monthly trend with churn by plan. The image uses fictional values; the worked example below shows how the June rate is calculated.
| Plan at period start | Opening customers | Customers lost | Churn rate |
|---|---|---|---|
| Starter | 600 | 36 | 6.0% |
| Growth | 300 | 9 | 3.0% |
| Enterprise | 100 | 1 | 1.0% |
| Total | 1,000 | 46 | 4.6% |
- The overall rate is 46 divided by 1,000, or 4.6%. Each lost customer belongs to the opening population. New customers acquired during June are excluded from both sides of this calculation.
- Starter accounts contribute 36 of the 46 losses, or 78.3%. Their churn rate is also 3 percentage points higher than Growth, making Starter a useful place to begin a follow-up investigation.
- The data does not explain why Starter customers left. Review cancellation reasons and changes in product usage before proposing an intervention, and measure its effect separately.
This hand-calculated example and the image use fictional values, not a prediction, benchmark, or customer result. Your output depends on the metrics and data available in your deployment.