Optimize retention interventions by principal strata
Estimate who an optional retention intervention can actually help—not merely who looks likely to leave—from randomized principal strata, then allocate scarce capacity by conservative net value under harmed-stratum sensitivity, budget and fairness constraints.
What it's for
Identifies who a retention offer can actually change the mind of — not merely who looks likely to leave — and allocates limited budget to that group.
Moves retention recommendations beyond risk ranking: Gitrevio can distinguish people likely to stay anyway, people this specific intervention may help, and people for whom the intervention lacks evidence.
What you give it
Every tool is a pure function: it computes from what you pass it and reads nothing on its own. Inputs split into evidence you supply from your connected systems, calibration your team owns, and numerical controls that affect precision but never the result's meaning.
| Field | Type | Role | Required |
|---|---|---|---|
| as_of_ms | number ≥ 0 | Your calibration | Yes |
| current_candidates | array of objects (11 fields) | Evidence | Yes |
| feature_names | array of string | Evidence | Yes |
| holdout_fraction | number ≥ 0.1, ≤ 0.4 | Your calibration | Optional |
| intervention_budget | number ≥ 0 | Your calibration | Yes |
| intervention_capacity | integer ≥ 0 | Your calibration | Yes |
| intervention_id | string non-empty | Your calibration | Yes |
| max_detail_rows | integer ≥ 1, ≤ 1000 | Numerical control | Optional |
| maximum_group_selection_rate_gap | number ≥ 0, ≤ 1 | Your calibration | Optional |
| maximum_harmed_probability | number ≥ 0, ≤ 1 | Your calibration | Optional |
| minimum_cases_per_arm | integer ≥ 10 | Your calibration | Optional |
| minimum_holdout_cases | integer ≥ 10 | Your calibration | Optional |
| posterior_draws | integer ≥ 100, ≤ 5000 | Numerical control | Optional |
| randomized_trials | array of objects (15 fields) | Evidence | Yes |
| seed | integer ≥ 0, ≤ 4294967295 | Numerical control | Optional |
Each randomized_trials
record
| Field | Type | Required |
|---|---|---|
| assigned_at_ms | number (≥ 0) | Yes |
| assignment_integrity_verified | boolean | Yes |
| evidence_verified | boolean | Yes |
| exclusion_restriction_plausible | boolean | Yes |
| features | object | Yes |
| id | string (non-empty) | Yes |
| interference_free | boolean | Yes |
| intervention_id | string (non-empty) | Yes |
| outcome_mature | boolean | Yes |
| randomized | boolean | Yes |
| retained | boolean | Yes |
| role_id | string (non-empty) | Yes |
| subject_ref | string (non-empty) | Yes |
| treated | boolean | Yes |
| treatment_probability | number (≥ 0, ≤ 1) | Yes |
{
"as_of_ms": 1000,
"current_candidates": [
{
"audit_group_id": "group-b",
"audit_group_use_authorized": true,
"data_cutoff_ms": 900,
"evidence_verified": true,
"features": {
"support_gap": 0
},
"id": "candidate-0",
"intervention_cost": 10,
"intervention_eligible": true,
"retained_value": 1000,
"role_id": "engineer",
"supportive_use_authorized": true
},
{
"audit_group_id": "group-a",
"audit_group_use_authorized": true,
"data_cutoff_ms": 900,
"evidence_verified": true,
"features": {
"support_gap": 0
},
"id": "candidate-1",
"intervention_cost": 10,
"intervention_eligible": true,
"retained_value": 1000,
"role_id": "engineer",
"supportive_use_authorized": true
},
{
"audit_group_id": "group-b",
"audit_group_use_authorized": true,
"data_cutoff_ms": 900,
"evidence_verified": true,
"features": {
"support_gap": 0
},
"id": "candidate-2",
"intervention_cost": 10,
"intervention_eligible": true, Truncated for display — the full payload is 4698 lines.
What you get back
This is the actual output of running the example above — computed by the same function the platform calls, not an illustration.
{
"allocation": {
"fairness_constraint_satisfied": true,
"maximum_observed_group_selection_rate_gap": 0.25,
"optimizer_exact": true
},
"candidate_diagnostics": [
{
"always_leave_probability": {
"median": 0.3528,
"p05": 0.269,
"p95": 0.4398
},
"always_stay_probability": {
"median": 0.3571,
"p05": 0.3034,
"p95": 0.4259
},
"conservative_incremental_retention_probability": 0.174,
"conservative_net_value": 164,
"harm_sensitivity_bound": 0.02,
"helped_probability": {
"median": 0.2842,
"p05": 0.194,
"p95": 0.3663
},
"intervention_cost": 10,
"retained_value": 1000,
"selected": true,
"subject_ref": "candidate-1"
},
{
"always_leave_probability": {
"median": 0.3528,
"p05": 0.269,
"p95": 0.4398
},
"always_stay_probability": {
"median": 0.3571,
"p05": 0.3034,
"p95": 0.4259
},
"conservative_incremental_retention_probability": 0.174,
"conservative_net_value": 164, Truncated for display — the full payload is 243 lines.
How it works
Causal inference & experiment design — Separate what a change caused from what merely moved alongside it.
- 1 Use only mature randomized trials with overlap, verified assignment, no interference and a plausible exclusion restriction; reserve the latest trials for untouched evaluation.
- 2 Fit conditional always-stay, helped and always-leave stratum probabilities by EM under monotonicity and require better later observed-outcome likelihood than unconditional trial rates.
- 3 Subtract a governed harmed-stratum sensitivity bound from the lower helped probability, value only incremental retention, and optimize positive conservative value under intervention budget, capacity and authorized group-rate constraints.
Before you trust it
Every tool in the catalog ships with the conditions under which its answer is meaningful — and the conditions under which it should abstain instead of guessing.
Assumptions & guardrails
- Assignment or adoption timing, interference policy, overlap, attrition, and outcome availability match the estimand encoded by the method.
- The intervention is voluntary and consistently delivered, assignment is randomized, outcomes are mature, SUTVA/no-interference and exclusion are plausible, monotonicity is not contradicted, retained value excludes sunk value, and candidate eligibility is lawful.
- A causal label is warranted only when design and diagnostic requirements pass; otherwise treat the result as descriptive or abstain.
- High raw attrition risk is never the allocation target; only estimated incremental benefit from a supportive intervention is considered, with no authority for adverse employment action.
Minimum evidence
- randomized_trials: required and organization-defined
- current_candidates: required and organization-defined
- intervention_id: required and organization-defined
- feature_names: required and organization-defined
- as_of_ms: required and organization-defined
- intervention_budget: required and organization-defined
- intervention_capacity: required and organization-defined
How to validate it
Preserve the assignment/adoption design and validate overlap, pre-period or placebo diagnostics, attrition, interference policy, and cluster-level uncertainty; never tune on the estimated effect.
Calibrating it to your org
Same for everyone
The mathematical kernel, validation rules, method version, and JSON output semantics are organization-independent; no tenant-trained coefficients or company benchmark is embedded in the function.
Specific to you
- a deduplicated chronological trial ledger with overlap and one mature outcome per assignment, plus a current candidate portfolio whose feature definitions exactly match the trial model and whose value excludes nonincremental baseline retention
- intervention consistency and voluntariness, randomization/assignment integrity, no-interference and exclusion assessment, monotonicity and harmed sensitivity, outcome maturity, eligibility, retained value, full intervention cost, budget/capacity, fairness-only group authorization and selection-rate constraint
Calibration workflow
- 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
- 2 Build a tenant-scoped historical cohort using only information available before each prediction or decision; preserve zero periods, censoring, assignment probabilities, and unresolved outcomes when the method requires them.
- 3 Estimate statistical parameters on training history, but obtain costs, utilities, risk tolerance, practical-effect thresholds, capacity, and policy constraints from accountable decision owners.
- 4 Validate on later time windows or held-out aggregate units at the deployment grain, against a simple baseline and the function-specific validation strategy.
- 5 Deploy only if the returned decision clears evidence, overlap, calibration, robustness, and guardrail checks; warning, unsupported, schema-gap, and fallback decisions are abstentions.
- 6 Monitor realized outcomes, data drift, coverage, and decision regret; recalibrate at a governed cadence or after a detected regime/definition change, never merely because a stakeholder dislikes the result.
Call it from your AI
You don't wire up 388 tools in your MCP client. The GitRevio MCP server exposes 20 tools, three of which let an agent search the catalog, read a tool's schema, and run it — so the assistant finds this one on its own.
gitrevio_capabilities_search
{ "q": "estimate who an optional retention intervention" }
→ finds "optimize_retention_interventions_by_principal_strata"
gitrevio_capability_describe
{ "capability_id": "optimize_retention_interventions_by_principal_strata" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "optimize_retention_interventions_by_principal_strata", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.