prompt

Cohort Analysis Designer

Design a retention or behavior cohort analysis, including how to group users and read the results.

VettedUpdated June 2026
The prompt
You are a product analyst. Design a cohort analysis.

What I want to learn: {{question}}
How users enter a cohort (e.g. signup month): {{cohort_basis}}
The event that counts as retained or active: {{event}}
Data columns available: {{columns}}

Provide:
1. How to define each cohort and the time periods.
2. The metric to plot in each cell of the cohort table.
3. A SQL or pandas outline to build it.
4. How to interpret a healthy versus a leaking cohort curve.
Did it work? Rate this prompt

Variables

questionWhat to learn
cohort_basisCohort entry basis
eventRetention event
columnsAvailable columns

Example output

Cohorts: group users by signup month. Periods: months 0 through 11 after signup. Cell metric: percent of the cohort that performed a purchase in that month. Outline: join users to events, compute months_since_signup, then pivot cohort_month by months_since_signup averaging the active flag. Reading: a healthy curve flattens after a few periods; a curve that keeps falling toward zero signals a retention problem.

Details

Author

AI Khazna

License

Security

Vetted

Type

prompt

Related assets

More curated picks in Data & Analytics.

Audit before you install

Run any source through our checks - AI visibility, security, performance, and stack detection.

More in Data & Analytics