Forecast AI route quality cost drift
Forecast route-level quality, inference cost, p95 latency, breach timing, net value and economic-loss VaR/CVaR with partially pooled Bayesian trends and one common disruption state shared across every route on the same provider.
What it's for
Warns leaders when production AI quality, cost or latency is likely to leave its operating envelope—and shows the economic tail when several routes share one provider.
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 |
|---|---|---|---|
| current_routes | array of objects (10 fields) | Evidence | Yes |
| historical_route_periods | array of objects (10 fields) | Evidence | Yes |
| horizon_periods | integer ≥ 1, ≤ 120 | Your calibration | Optional |
| max_detail_rows | integer ≥ 1, ≤ 500 | Numerical control | Optional |
| minimum_active_periods | integer ≥ 3 | Your calibration | Optional |
| minimum_historical_periods | integer ≥ 3 | Your calibration | Optional |
| scenarios | array of objects (11 fields) | Evidence | Yes |
| seed | integer ≥ 0 | Numerical control | Optional |
| simulations | integer ≥ 100, ≤ 100000 | Numerical control | Optional |
| tail_probability | number ≥ 0.001, ≤ 0.5 | Your calibration | Optional |
| trend_prior_strength | number > 0 | Your calibration | Optional |
Each scenarios
record
| Field | Type | Required |
|---|---|---|
| cost_multiplier | number (≥ 0, ≤ 1000) | Yes |
| demand_multiplier | number (≥ 0, ≤ 1000) | Yes |
| evidence_verified | boolean | Yes |
| id | string (non-empty) | Yes |
| latency_multiplier | number (≥ 0, ≤ 1000) | Yes |
| probability | number (≥ 0, ≤ 1) | Yes |
| provider_disruption_cost_multiplier | number (≥ 1, ≤ 1000) | Yes |
| provider_disruption_latency_multiplier | number (≥ 1, ≤ 1000) | Yes |
| provider_disruption_probabilities | object | Yes |
| provider_disruption_quality_logit_shift | number (≥ -100, ≤ 0) | Yes |
| quality_logit_shift | number (≥ -100, ≤ 100) | Yes |
{
"current_routes": [
{
"evidence_verified": true,
"forecast_request_count_per_period": 100,
"id": "route-a",
"latency_breach_loss_per_request": 2,
"maximum_cost_per_request": 0.05,
"maximum_p95_latency_ms": 300,
"minimum_quality_score": 0.85,
"provider_id": "provider-a",
"value_per_request": 1,
"workload_class": "support"
},
{
"evidence_verified": true,
"forecast_request_count_per_period": 100,
"id": "route-b",
"latency_breach_loss_per_request": 2,
"maximum_cost_per_request": 0.05,
"maximum_p95_latency_ms": 300,
"minimum_quality_score": 0.85,
"provider_id": "provider-a",
"value_per_request": 1,
"workload_class": "support"
}
],
"historical_route_periods": [
{
"cost_per_request": 0,
"evidence_verified": true,
"id": "route-a-0",
"p95_latency_ms": 0,
"period": 0,
"provider_id": "provider-a",
"quality_score": 0,
"request_count": 0,
"route_id": "route-a",
"workload_class": "support"
},
{
"cost_per_request": 0.0202,
"evidence_verified": true,
"id": "route-a-1", Truncated for display — the full payload is 352 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.
{
"assumptions": [
"Route-period history is consecutive and retains true zero-request periods. Quality, cost and p95 latency definitions, workload classes, tokenizer/billing perimeter and provider identity remain stable through the forecast origin.",
"Bayesian linear trends partially pool tenant-local intercepts and slopes; posterior predictive noise is conditional on this model and can miss structural breaks. One provider disruption state is shared across all of its routes to preserve common-mode tail dependence.",
"Quality-adjusted gross value, inference cost and latency-breach loss are finance-owned non-overlapping definitions. Scenario probabilities and provider disruption assumptions describe one common planning horizon.",
"This forecast is not a vendor SLA, guaranteed bill, causal diagnosis, model-safety proof, procurement or deployment decision, data-transfer authorization or judgment about a provider, team or person."
],
"configuration": {
"history_rule": "complete_consecutive_route_periods_including_zero_request_periods",
"horizon_periods": 6,
"minimum_active_periods": 8,
"minimum_historical_periods": 12,
"provider_dependence_rule": "one_disruption_state_per_provider_and_simulation_shared_by_every_route",
"seed": 41,
"simulations": 200,
"tail_probability": 0.1,
"trend_prior_strength": 5
},
"decision": "ai_route_quality_cost_drift_forecast_supported",
"failed_gates": [],
"method": "partially_pooled_bayesian_route_trends_and_shared_provider_disruption_forecast_v1",
"provider_diagnostics": [
{
"provider_id": "provider-a",
"route_count": 2,
"simulated_disruption_fraction": 0.175
}
],
"route_diagnostics": [
{
"active_period_count": 11,
"complete_zero_inclusive_history": true,
"expected_horizon_cost": 21.9799,
"expected_horizon_end_cost_per_request": 0.0333,
"expected_horizon_end_p95_latency_ms": 239.151,
"expected_horizon_end_quality_score": 0.8628,
"expected_horizon_gross_value": 553.2906,
"expected_horizon_latency_loss": 252,
"historical_period_count": 12,
"latest_quality_score": 0.928,
"median_period_to_first_breach_conditional": 1,
"probability_of_any_service_breach": 0.175,
"probability_of_cost_breach": 0.175,
"probability_of_latency_breach": 0.175, Truncated for display — the full payload is 100 lines.
How it works
Sequential Bayesian & bandits — Learn while deciding — update beliefs as evidence arrives and choose where the next unit of effort is worth spending.
- 1 Build consecutive zero-inclusive route histories with stable workload, provider, quality, billing-cost and latency definitions; transform bounded quality by logit and positive cost/latency by logarithm.
- 2 Fit tenant-pooled Bayesian linear trends with posterior predictive uncertainty, draw coherent business scenarios and one provider disruption state shared by all routes on that provider.
- 3 Propagate demand into quality-adjusted gross value, inference cost and latency loss; report route breach probability/timing, provider disruption diagnostics and portfolio economic-loss VaR/CVaR, abstaining on support or evidence gaps.
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
- The likelihood or reward model, prior support, action logging, delayed outcomes, and any stationarity assumptions match the deployment process.
- History retains true zeros, metric and billing definitions are stable, trend residuals are adequate for the decision horizon, provider IDs capture common-mode infrastructure and value/cost/loss definitions do not overlap.
- Posterior probability and adaptive selection are model-conditional; they are not substitutes for randomized propensities or guaranteed safety.
- Posterior drift is conditional on the submitted trend/scenario model, not a causal diagnosis, vendor SLA, guaranteed bill, safety proof, deployment/procurement/data-transfer approval or judgment about a provider, team or person.
Minimum evidence
- historical_route_periods: required and organization-defined
- current_routes: required and organization-defined
- scenarios: 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
- tenant-local route-period projection joining gateway telemetry, outcome resolution, FinOps billing and provider incidents on one time and definition epoch, retaining inactive periods rather than conditioning on traffic
- workload and route version, quality label and maturity, billing/token perimeter, latency definition, trend horizon/prior/support, provider common-mode identity, scenario dependence, value and latency-loss perimeter, currency, tail appetite and evidence ownership
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 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": "forecast routelevel quality inference cost p95" }
→ finds "forecast_ai_route_quality_cost_drift"
gitrevio_capability_describe
{ "capability_id": "forecast_ai_route_quality_cost_drift" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "forecast_ai_route_quality_cost_drift", "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 AI routing experiment integrity
Audit prospectively registered AI-route experiments at the randomization-unit/period/route grain, reconciling logged propensities, allocation fidelity, pre-assignment balance, crossover, outcome maturity, simultaneous-experiment overlap and unique value at risk before any causal effect is reported.
Optimize safe AI routing exploration portfolio
Allocate bounded production traffic to one safe challenger per AI workload by posterior-predictive knowledge gradient, maximizing net learning value under local quality/harm evidence, privacy, latency, provider diversity, shared endpoint capacity, exploration budget, provider concentration and regret CVaR constraints.
Audit AI capability fallback integrity
Prove that every aggregate capability required when AI is unavailable has a current approved runbook and a sufficiently large, timely, successful, independently observed exercise conducted with AI actually disabled.
Audit AI code change evidence integrity
Prove that aggregate AI-assisted coding evidence comes from prospectively registered, nonoverlapping treatment/control studies with immutable assignment, configuration, trace and mature-outcome denominators before anyone estimates an effect.
Audit AI inference cost allocation integrity
Reconcile provider AI invoices bottom-up to workload and route usage, price terms, cached requests, retries, fixed charges and credits without combining currencies or silently allocating unexplained spend.
Audit AI knowledge grounding integrity
Audit the complete AI knowledge supply chain from immutable source versions through indexed chunks and effective access policy to retrieved evidence, claim-level citations and honestly mature grounding outcomes, without treating unresolved answers as failures.