Optimize adaptive analytics plan
Choose an exact adaptive sequence of analyses and an outcome-contingent terminal action by Bayesian belief-state dynamic programming, allowing early stopping while enforcing cost, duration, dependency, exclusion and analysis-step constraints and measuring value over the best fixed analysis sequence.
What it's for
Lets a Gitrevio agent decide what to learn next—and when to stop analyzing—by building an auditable outcome-contingent evidence plan instead of calling every tool or following a fixed checklist.
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 |
|---|---|---|---|
| actions | array of objects (2 fields) ≥ 2 items | Evidence | Yes |
| analyses | array of objects (6 fields) ≥ 1 item | Evidence | Yes |
| analytics_budget | number ≥ 0 | Your calibration | Yes |
| cost_of_delay_per_period | number ≥ 0 | Your calibration | Optional |
| maximum_analysis_steps | integer ≥ 1, ≤ 3 | Your calibration | Optional |
| maximum_exact_histories | integer ≥ 100, ≤ 2000000 | Your calibration | Optional |
| maximum_total_duration_periods | integer ≥ 0, ≤ 10000 | Your calibration | Optional |
| minimum_expected_net_value | number | Your calibration | Optional |
| states | array of objects (2 fields) ≥ 2 items | Evidence | Yes |
Each analyses
record
| Field | Type | Required |
|---|---|---|
| cost | number (≥ 0) | Yes |
| dependency_ids | array of string | Yes |
| duration_periods | integer (≥ 0, ≤ 10000) | Yes |
| exclusion_ids | array of string | Yes |
| id | string (non-empty) | Yes |
| results | array of objects (2 fields) (≥ 2 items) | Yes |
{
"actions": [
{
"id": "build",
"loss_by_state": [
100,
0
]
},
{
"id": "defer",
"loss_by_state": [
0,
40
]
}
],
"analyses": [
{
"cost": 1,
"dependency_ids": [],
"duration_periods": 0,
"exclusion_ids": [],
"id": "prototype",
"results": [
{
"id": "negative",
"likelihood_by_state": [
0.9,
0.1
]
},
{
"id": "positive",
"likelihood_by_state": [
0.1,
0.9
]
}
]
}
],
"analytics_budget": 1,
"maximum_analysis_steps": 1, Truncated for display — the full payload is 55 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.
{
"configuration": {
"action_count": 2,
"analysis_count": 1,
"analytics_budget": 1,
"cost_of_delay_per_period": 0,
"maximum_analysis_steps": 1,
"maximum_exact_histories": 250000,
"maximum_total_duration_periods": 10,
"minimum_expected_net_value": 0,
"state_count": 2
},
"decision": "run_adaptive_analytics_plan",
"guardrails": [
"State priors, action losses and every analysis likelihood require prospective local calibration under one decision perimeter; an exact solver cannot repair omitted states, biased tests or invalid likelihoods.",
"Analysis results are conditionally independent given the represented state. Correlated measurement errors, shared data leakage or result-dependent costs require an expanded observation model.",
"The policy may stop early and is optimal only inside its bounded action, analysis, dependency, budget, delay and horizon model. Safety, legal, fiduciary and implementation authority remain external constraints."
],
"method": "exact_adaptive_bayesian_analytics_planning_v1",
"policy_tree": {
"act_now_expected_total_loss": 20,
"analysis_cost": 1,
"analysis_id": "prototype",
"branches": [
{
"next": {
"action_id": "defer",
"decision": "act",
"posterior_expected_total_loss": 4,
"posterior_state_probabilities": {
"adverse": 0.9,
"favorable": 0.1
}
},
"predictive_probability": 0.5,
"result_id": "negative"
},
{
"next": {
"action_id": "build",
"decision": "act",
"posterior_expected_total_loss": 10,
"posterior_state_probabilities": {
"adverse": 0.1, Truncated for display — the full payload is 77 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 Freeze mutually exclusive latent states, prior probabilities, terminal action losses and candidate analyses with discrete result likelihoods, cost, duration, dependencies and exclusions.
- 2 At every posterior belief compare acting now with every feasible next analysis, update state beliefs by Bayes' rule for each possible result, and solve the bounded policy tree exactly with memoized dynamic programming.
- 3 Return the first analysis and full contingent policy only when net value clears the governed gate; reconcile act-now loss, best fixed sequence, adaptivity value and perfect-information upper bound with a global certificate.
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.
- States cover the consequential uncertainty; prior, loss and likelihood models are prospective and local; analysis results are conditionally independent given state; costs/durations are complete; dependencies/exclusions and terminal actions remain feasible; delay cost uses the declared cadence.
- Posterior probability and adaptive selection are model-conditional; they are not substitutes for randomized propensities or guaranteed safety.
- Exact optimization applies only inside the represented state and observation model. Correlated test errors, adaptive implementation effects, unmodeled harms or invalid likelihoods require an expanded model, regardless of solver certainty.
Minimum evidence
- states: at least 2 rows/items
- actions: at least 2 rows/items
- analyses: at least 1 rows/items
- analytics_budget: required and organization-defined
How to validate it
Backtest the chosen action against simple feasible baselines on held-out scenarios, sweep costs/constraints/risk tolerance, and require constraint feasibility under adverse inputs.
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
- prospective analysis-design registry joining decision states/actions to locally resolved test episodes, point-in-time result likelihoods, complete analysis economics, signal-release cadence and executable dependency graph
- state/action completeness, prior and likelihood estimation, loss/cost/delay units, conditional-independence claim, analysis validity, dependencies/exclusions, budget/duration/horizon, exact-history boundary, value gate and implementation authority
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": "choose an exact adaptive sequence of" }
→ finds "optimize_adaptive_analytics_plan"
gitrevio_capability_describe
{ "capability_id": "optimize_adaptive_analytics_plan" }
→ returns the input schema and agent guidance shown on this page
gitrevio_capability_run
{ "capability_id": "optimize_adaptive_analytics_plan", "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 recommendation coherence
Audit whether analytical recommendations for the same decision remain comparable, current, supported and coherent after every unique evidence lineage receives one vote split across its claimants, preventing duplicated source data from manufacturing consensus.
Calculate recommendation conflict exposure
Price the expected, reserve-quantile and tail-CVaR regret of a current action when locally calibrated analytical recommendations conflict, using coherent action-loss scenarios and provenance-adjusted support that cannot be inflated by duplicate source lineage.
Audit analytical specification multiverse
Audit whether an analytical conclusion survives a prespecified multiverse of admissible windows, cohorts, metrics, and models using aligned bootstrap draws, a weighted specification curve, practical-effect support gates, and descriptive choice-influence diagnostics.
Audit analytics challenger independence
Audit whether an analytical challenger supplies genuinely independent error information: use paired temporal moving-block bootstrap bounds on error correlation, incumbent-failure catch rate and common-mode joint failure, with simultaneous Bonferroni control across every screened challenger and explicit evidence gates.
Audit analytics function calibration readiness
Gate analytical functions on paired out-of-time decision loss against a frozen baseline using temporal moving-block bootstrap, autocorrelation- and weight-adjusted effective sample size, evidence coverage, lower confidence bounds, improvement probability and recent degradation rather than declaring a model calibrated from training fit.
Audit analytics transportability
Audit whether locally calibrated analytical functions retain decision-loss improvement across target-similar operating environments using similarity-weighted random-effects meta-analysis, between-environment variance, I-squared, sign consistency and a conservative target prediction interval.