Conformalize prediction intervals
Apply finite-sample split-conformal inflation to model intervals, with Mondrian group corrections and explicit global fallback for sparse groups.
What it's for
Wraps any model's intervals in finite-sample coverage guarantees, with group corrections and an explicit fallback where a group's data is too sparse.
Adds a distribution-free coverage layer to probabilistic ETA and risk intervals rather than trusting nominal p50/p90 labels alone.
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 |
|---|---|---|---|
| calibration_rows | array of objects (5 fields) | Evidence | Yes |
| coverage_level | number ≥ 0.8, ≤ 0.99 | Your calibration | Optional |
| intervals_to_adjust | array of objects (4 fields) | Evidence | Optional |
| minimum_group_size | integer ≥ 10, ≤ 10000 | Your calibration | Optional |
Each calibration_rows
record
| Field | Type | Required |
|---|---|---|
| actual | number | Yes |
| group | string (non-empty) | Optional |
| id | string (non-empty) | Yes |
| predicted_lower | number | Yes |
| predicted_upper | number | Yes |
{
"calibration_rows": [
{
"actual": 0.5,
"id": "resolved-eta-0",
"predicted_lower": 0,
"predicted_upper": 1
},
{
"actual": 0.5,
"id": "resolved-eta-1",
"predicted_lower": 0,
"predicted_upper": 1
},
{
"actual": 0.5,
"id": "resolved-eta-2",
"predicted_lower": 0,
"predicted_upper": 1
},
{
"actual": 0.5,
"id": "resolved-eta-3",
"predicted_lower": 0,
"predicted_upper": 1
},
{
"actual": 0.5,
"id": "resolved-eta-4",
"predicted_lower": 0,
"predicted_upper": 1
},
{
"actual": 0.5,
"id": "resolved-eta-5",
"predicted_lower": 0,
"predicted_upper": 1
},
{
"actual": 0.5,
"id": "resolved-eta-6",
"predicted_lower": 0,
"predicted_upper": 1
}, Truncated for display — the full payload is 132 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.
{
"adjusted_intervals": [
{
"conformal_lower": -1,
"conformal_upper": 2,
"correction": 1,
"correction_source": "global_fallback",
"group": null,
"id": "new-eta",
"original_lower": 0,
"original_upper": 1
}
],
"assumptions": [
"Calibration and future rows are exchangeable at the unit represented by each row.",
"Intervals and outcomes were frozen before calibration; selecting only favorable resolved rows invalidates coverage.",
"Group-conditional coverage is claimed only for groups meeting the minimum calibration size; other groups use marginal coverage.",
"Conformal correction guarantees coverage under exchangeability, not interval sharpness or causal validity."
],
"calibration": {
"empirical_coverage_after": 1,
"empirical_coverage_before": 0.9,
"groups": [
{
"calibration_rows": 20,
"correction": 1,
"correction_source": "global_fallback",
"empirical_coverage_after": 1,
"empirical_coverage_before": 0.9,
"group": "__all__"
}
],
"rows": 20
},
"coverage_level": 0.9,
"finite_sample_rank": 19,
"global_correction": 1,
"method": "split_conformal_interval_inflation_v1",
"warnings": []
} How it works
Forecasting & survival — Estimate when something completes or fails, with censoring and unresolved work handled honestly rather than dropped.
- 1 Apply finite-sample split-conformal inflation to model intervals, with Mondrian group corrections and explicit global fallback for sparse groups.
- 2 Evaluate the method-specific diagnostics and gates returned by the function, then abstain unless the declared decision clears them under locally governed thresholds.
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
- Training examples precede their outcomes, censoring and unresolved work are represented, and deployment populations remain comparable to validation cohorts.
- A predictive interval or risk estimate is not a deadline promise, causal explanation, or individual-performance judgment.
Minimum evidence
- calibration_rows: required and organization-defined
How to validate it
Use chronological train/calibration/test windows, compare proper scores and decision value with a simple baseline, and recalibrate only from outcomes resolved after prediction time.
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
- metric/outcome definitions, entity grain, observation window, costs, thresholds, priors, and constraints represented by the function inputs
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": "apply finitesample splitconformal inflation to model" }
→ finds "conformalize_prediction_intervals"
gitrevio_capability_describe
{ "capability_id": "conformalize_prediction_intervals" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "conformalize_prediction_intervals", "arguments": { ... } }
→ returns the result shown above Works in Claude Desktop, Claude Code, Cursor, Cline, Continue.dev, Goose and Aider. See the MCP server.