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

Inputs split into evidence read 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
Example input
{
  "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.

Example output
{
  "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. 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. 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. 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. 1 Define the management decision, target outcome, aggregate unit, privacy boundary, cadence, and prediction/intervention horizon for this organization.
  2. 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. 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. 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. 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. 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 18 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.

Related tools

Audit attrition risk prediction integrity

Audit an attrition model's complete eligible cohort, point-in-time features, supportive-use governance, intervention-contaminated labels, competing outcomes, calibration, false positives and authorized subgroup error before any person-level use.

Forecasting & survival

Forecast governed attrition competing risks

Forecast voluntary departure, internal transfer and involuntary exit as calibrated discrete-time competing risks with company-local chronological validation, peer partial pooling, posterior intervals and an automatic abstention when the model does not beat role base rates.

Sequential Bayesian & bandits

Analyze info gap robust satisficing

Select a robust-satisficing action under severe uncertainty with Info-Gap Decision Theory: evaluate worst and best payoff across a governed nested uncertainty envelope, maximize the radius before a critical requirement fails, report windfall opportuneness, and use no scenario probabilities.

Decision analysis

Audit attention fragmentation evidence integrity

Audit consented point-in-time contributor identity, availability, privacy-safe calendar metadata and work-session lineage before reporting aggregate meeting load, protected focus blocks or cross-project switching.

Statistical audit & measurement

Audit code knowledge concentration integrity

Audit file, module, service, or repository knowledge concentration from point-in-time substantive changes, reviews, incident response and documentation using identity-confidence filtering, recency decay, Bayesian ownership uncertainty, entropy-effective owners, HHI and leave-top-owner-out resilience—without turning contribution evidence into a person-performance score.

Sequential Bayesian & bandits

Audit onboarding mentorship evidence integrity

Audit point-in-time onboarding cohorts, ordered autonomy milestones, source completeness and corroborated mentorship windows before publishing privacy-safe ramp evidence.

Statistical audit & measurement

See every tool in People, retention & knowledge →

Ready to See Your Engineering work clearly?

Request a free demo