Code RoomChurn risk detector
MediumPrep Room Coding #30

Churn risk detector

Vibe & agenticAI agents & automationMid–Senior~15 min

Customer success keeps finding out accounts went quiet only after they've churned. Design an agent that watches product usage and flags accounts drifting toward the exit. What data does it get, what does a flag actually look like, and why should it never contact a customer itself? Tell me how you'd measure whether its flags are genuinely predictive rather than noise, and then pitch the build to the customer-success director — what's the number that convinces her?

Implement
first_churn_flag_week(weekly_usage: list[int], baseline_weeks: int, drop_percent: int, sustained_weeks: int) → int
Examples
in[[10,10,10,10,4,4,4],4,50,2]out5
in[[10,10,10,10,4,9,4,4],4,50,2]out7
in[[8,8,8,8,8,8],4,50,2]out-1
What a strong answer looks like

Turn the fuzzy goal into a bounded agent task. Say what the agent reads, what it may do on its own versus draft for a human, and what it must never touch. Then earn the trust: how you’d verify it before rollout, and the pitch (the problem, what you built, why it matters).

0:00 of about 15 min

Agent build: design the agent in plain language (or narrate it). The coach grades the decomposition, the guardrails, the verification plan, and the pitch.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.