Make a beta readiness call that respects silent segments
Your task
Your beta programs end with a readiness score, but a score from a skewed sample means nothing. An agent gives an advisory readiness call, after first checking that the cohort's feedback is representative.
Write beta_readiness_call(segment_names, invited_counts, responded_counts, scorecard_points): the rule your agent follows at the end of a beta.
segment_names(list of str): the cohort's segments, such as"skeptic".invited_counts,responded_counts(list of int): how many people in each segment were invited, and how many responded.scorecard_points(int): the composite readiness score.- Index
iin each list is one segment. Stop at the end of the shortest list.
It returns one of the values in the rules below. Apply them in order. The first one that matches decides:
- The total invited is 0 or less:
"hold: no cohort invited". - The first segment, in input order, that was invited (more than 0) but has 0 or fewer responses:
"hold: silent segment <name>". - Total responses below 40% of total invites, checked in whole numbers as
total_responded * 100 < 40 * total_invited:"hold: response rate below 40 percent". - A score of 70 or more:
"advisory: ready". Otherwise:"advisory: not ready".
Examples
beta_readiness_call(segment_names: list[str], invited_counts: list[int], responded_counts: list[int], scorecard_points: int) -> strExample 1
Input
beta_readiness_call(["power_user", "casual", "skeptic"], [40, 40, 20], [20, 18, 9], 78)Output
"advisory: ready"Example 2
Input
beta_readiness_call(["power_user", "casual", "skeptic"], [40, 40, 20], [30, 20, 0], 88)Output
"hold: silent segment skeptic"Example 3
Input
beta_readiness_call(["power_user", "casual"], [50, 50], [15, 12], 90)Output
"hold: response rate below 40 percent"