Analysis

Run A Cohort Retention Analysis

Specify the entity type being cohorted, how cohorts are defined (signup month, hire date, etc.), the key metric to track, the time granularity, and the relevant dataset columns, and this prompt builds a full cohort by time period retention or engagement table from raw data. It flags which cohorts meaningfully beat or lag the average, checks whether newer cohorts trend better or worse over time, runs a time-to-event calculation like time to 50% churn, and delivers the Python or SQL code that generates the whole analysis plus a heatmap.

Prompt
Run a cohort analysis on my {entity_type} data.

Cohort definition: Group {entities} by {cohort_definition}
Key metric to track: {key_metric}
Time periods to track: {time_periods}

Available dataset columns:
{dataset_columns}

Deliver:
1. A cohort retention/engagement table (cohort × time period)
2. A visual representation (heatmap description or the code to build one)
3. Which cohorts do meaningfully better or worse than average
4. Whether newer cohorts trend better or worse over time
5. Time-to-event analysis (how long until 50% of a cohort churns/converts/etc.)
6. Actionable takeaways — what changed for the best- and worst-performing cohorts?

Include the Python/SQL code that generates this from raw data.
Download .md

Variables