PreciseDocs

Methodology and holdouts

How Precise splits credit across segments, proves a change against a BAU Control Line, sets the width of a forecast range, and ranks launch audiences from priors. Each section states what is exact, what is sampled, and where a method declines to answer.

On this page
CapabilityRuntimeStatus
Run contribution, holdout sizing, integrity and calibration on the sample bookSandboxLive
Inspect the sample Holdout opportunity cap and BAU Control Line on public-test AccessSandboxPreview
Run batch attribution and a BAU Control Line test on authorized campaign linesTenant CloudPreview
Fit a launch prior and select launch audiences on the tenant GatewayTenant CloudPreview

Attribution: what is exact and what is sampled

A player is a distinct value of the segmentation columns. Read the engine, value function, estimator and draw unit with the result. Both Gateways below advertise method version 2.0.0.

Engine and inputCalculationWork or limit
Python batch / Burst, additive sum of disjoint segmentsExact closed form. A segment contributing 40 of 100 clicks receives 40 clicks. If the declared target is 200 it receives 0.20 target units. Its share of delivered clicks is 0.40.Zero draws through the configured 500-player batch ceiling
Python batch / Burst, ratioEnumerates all coalitions through 20 players. Above 20 it uses complementary-contribution sampling. Each draw partitions a permutation at a random size and evaluates both complementary sets.Default 1,000 draws per player, up to 500 players. Exact pairwise interaction and Owen values stop at 16.
Hosted sandboxAuthenticated run_analysis evaluates the four-player reference below inside your workspace. Player a receives 3.1504744295378964 with zero draws.The deployed example measures four players. Hosted 500-player latency is unmeasured.
Customer Rust Gateway, additive sumComputes the closed-form contribution for the supplied sum.Zero draws at every admitted size
Same Rust build, eligible weighted ratio, auto or exactFrom 14 players the Schwinger-Beta integral factors the coalition sum. Deterministic numerical quadrature computes each credit. Smaller eligible games enumerate.Zero stochastic draws. Work is linear in players at fixed quadrature resolution and weight range. Each nonempty denominator must be positive, the empty coalition must have zero value, and any floor must be nonbinding.
Same Rust build, other ratio gamesExact enumeration is budgeted. An admitted sampled ratio above 21 players uses antithetic permutations.The large sampled path defaults to 1,024 permutation evaluations. Admission, explicit method or numerical conditioning can lead to a refusal.

Where enumeration stops

The ordinary Gateway enumeration budget is 50,000,000 player-coalition visits. At 21 players, 21 × 2²¹ = 44,040,192. At 22, 22 × 2²² = 92,274,688. The integral has its own budget. On one Mac, the original Python batch measurement enumerated 20 players in 18.4 seconds at about 833 MiB peak RSS.

Check all 500 Rust credits

Download the ratio request generator and independent oracle. It uses Python's standard library and checks its equal-denominator formula against exhaustive rational enumeration at eight players. Its 500-player case compares each named credit, the sum and the draw count. Start a Gateway built from the Precise source tree.

Shell
cargo build --locked --manifest-path rust/Cargo.toml -p precise-gateway --bin precise-gateway
HOST=127.0.0.1 PORT=18089 PRECISE_GATEWAY_STATE_DIRECTORY="$(mktemp -d)" rust/target/debug/precise-gateway serve

In a second terminal, run these commands from the directory containing the download. Both maximum absolute player error and the efficiency residual must be under 1e-10 in ratio units.

Shell
python3 ratio-oracle.py > request.json
curl --fail --silent --show-error -H 'content-type: application/json' --data-binary @request.json http://127.0.0.1:18089/harness/tree/math/run > response.json
python3 ratio-oracle.py --check response.json

On 24 Nov 2026, against a local Gateway built from the current source, this independent oracle measured maximum absolute player error 3.47e−16 and efficiency residual 3.02e−14 across 500 players with zero draws. The Rust tests also check 18 small games against enumeration (6, 10 and 14 players across six families); the largest absolute error observed was 9.281e−14. Measured on one laptop the same day: a local debug route test returned all 500 scores with zero draws in both interactive and standard tiers in 181 and 191 ms, and optimized kernel-only runs at 500 players took 5.4 ms with equal weights, 12.2 ms over 12 decades of weights and 52.9 ms over 100 decades. Some valid, highly skewed inputs can refuse. Carry the engine version and run status when comparing results.

Run the same vector through unified Access

On an Access server configured with the optional ratio worker, discover ratio_shapley in tools/list or the deployment's OpenAPI document. This optional adapter accepts aggregate segments and an optional positive floor, up to 500 players. Its REST operation and MCP tool run the same native kernel. With a running public-test Access instance that exposes this operation, use the request file above and jq:

Shell
jq '{segments:.input.segments,floor:1}' request.json > access-input.json
curl --fail --silent --show-error -H 'content-type: application/json' --data-binary @access-input.json "$PRECISE_URL/api/v1/tools/ratio_shapley" > access-output.json
python3 ratio-oracle.py --check access-output.json

This 500-player case passed the oracle on a local unified Access public-test deployment. A deployment without the optional Gateway omits this operation. The four-player reference below runs inside your authenticated sandbox workspace.

Measured error against exact

The Python batch benchmark uses one synthetic ratio family, fixed game seed 3 and sampler seeds 0 through 19. The grand-coalition value and credits are in numerator units per denominator unit.

SegmentsDrawsTypical errorWorst score in any seedAbsolute efficiency error, worst seed
88,0002.3%6.4%4.5%
1212,0003.1%9.4%9.5%
1616,0002.9%10.3%5.6%
2020,0004.4%14.5%4.4%

Typical error is the square root of mean squared player error, divided by the mean absolute exact player score. Worst uses maximum absolute player error across all seeds with that same denominator. The last column divides the largest absolute efficiency residual by the absolute grand-coalition value.

Download the vectors, exact per-player scores, timings and errors and the benchmark script. In a Python environment with the batch package's dependencies, point the script at a Precise source checkout that contains the batch package. The full run covers 80 sampled games plus one exact enumeration per size. This command emits the four table rows above.

Shell
python3 batch-attribution.py "$PRECISE_CHECKOUT" --table
  • About 95% of scores fall within 1.96 of the engine's own standard errors.
  • Sampled ratio scores are published as estimated, with no rescaling to the campaign total. They missed the total by 0.4% to 9.5% in these runs.
  • From 12 segments up, at least half the seeds swapped one pair of close segments against the exact order. At 20 segments every seed did.

Large Python batch ratio runs

At 1,000 draws per segment the sampler thins out as segments are added. Runs at 100, 150 and 200 segments completed. A run at 500 segments was refused with eight unsampled cells. Worked arithmetic that matched those runs puts the chance of a refusal at 0.9% for 200 segments, 32% for 300, 93% for 400 and 99.99% for 500. At 3,000 draws per segment a 500-segment run completed: the median segment's standard error was 7.5% of its score, and the scores summed to within 0.8% of the true total. Name about 3,000 draws per segment for a ratio run near the ceiling.

When a method refuses

A Python complementary-sampling run needs at least one draw in every cell of segment and coalition size. If a cell has none, the run publishes no scores: the batch job fails the run, and its Python online worker answers not_computable with sample-coverage-incomplete. The batch job refuses above its configured ceiling. The Rust Gateway can refuse an explicit exact request above its work budget. The engines answer with a refusal in place of a biased number.

The batch output carries the score, the method (additive_exact, exact, approximate_fast or parallel_approximate) and the draw count. The standard error is computed inside the engine and is left out of the batch output today. The Gateway method returns estimates, variances and samples with its status. These measurements come from one laptop core and one family of synthetic games, and hosted timings are unmeasured.

Run the method

The sandbox runs contribution/shapley on the method's four-part reference input.

Runtime: SandboxStatus: Livetools/call · run_analysis
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "run_analysis",
    "arguments": {
      "method": "contribution/shapley"
    }
  }
}

The answer is exact, and the four scores sum to the supplied total within 1e-9. It ends with the reading that matters: "this splits credit for the supplied total; read a lift from a clean holdout." A contribution score divides a total that already happened. A holdout measures what a change caused.

Holdouts: two kinds

Audience HoldoutBAU Control Line
What is comparedUnits such as households, devices or stores. Some are reached with a treatment and some are held back from itTwo campaign setups on two lines, both live and both buying media. One line keeps the current setup, the other runs the changed setup
AssignmentUnits, at randomTwo live line items swap setups on a random schedule, block by block
The questionDid the treatment change the outcome?Did the changed setup do better than the current one?
Healthy whenThe split matches the plan and the held-back units did not receive the treatmentEach line ran its assigned setup for the whole block and the BAU Control Line kept the current setup
Sized or planned bypower/holdoutworkflow/plan-adaptive-campaign-loop
Checked bycomparison/holdout-integrity, mounted on the sandboxcomparison/setup-holdout-integrity, listed as planned (checked_by_mounted: false)
Random schedule, each block to BAU Control Line: current setup; Random schedule, each block to Test line: Precise setup; BAU Control Line: current setup to Net lift vs. BAU (both live, both buying); Test line: Precise setup to Net lift vs. BAU.Random schedule, eachblockBAU Control Line:current setupTest line: Precise setupNet lift vs. BAUboth live, both buyingRandom schedule, each block to BAU Control Line: current setup; Random schedule, each block to Test line: Precise setup; BAU Control Line: current setup to Net lift vs. BAU (both live, both buying); Test line: Precise setup to Net lift vs. BAU.Random schedule, eachblockBAU Control Line:current setupTest line: Precise setupNet lift vs. BAUboth live, both buying
Diagram source
Mermaid
flowchart LR
  coin["Random schedule, each block"]
  bau["BAU Control Line: current setup"]:::ghost
  changed["Test line: Precise setup"]:::said
  result["Net lift vs. BAU"]
  coin --> bau
  coin --> changed
  bau -.->|both live, both buying| result
  changed --> result

The BAU Control Line is how Precise proves its own changes: the result reads as net lift against the current setup, after fees. You set one number, the Holdout opportunity cap. The app answers in the sentence a buyer sees. Answer trimmed to the two holdout readings, recorded from sample data.

Runtime: SandboxStatus: PreviewGET /api/v1/holdouts/ORD-012/sizing
curl -sS --fail-with-body "$PRECISE_URL/api/v1/holdouts/ORD-012/sizing"

Example answerSample Book · Synthetic Data

{
  "order_id": "ORD-012",
  "setup_holdout": {
    "risk_budget_pct": 2,
    "sentence": "Two live line items run side by side: one on your current setup, one on the change."
  },
  "unit_holdout": {
    "verdict": "go",
    "reading": "Hold out 1% for 7 days: 736,973 reached and 7,444 held out can detect a 0.80-point lift."
  }
}

Size an Audience Holdout

size_holdout tests held-back shares of 1, 2, 3, 5, 7.5, 10, 15, 20, 25, 30, 40 and 50 percent, up to the configured cap. It tries 7, 14, 21, 28, 42, 56, 70 and 84 days below the maximum, then the maximum itself. Among feasible designs it picks the lowest share first, then the shortest duration at that share. For a sample order it uses the observed control purchase rate when available, enrolled units per test day and the planned lift. Preregister the baseline, minimum detectable effect, unit, horizon and allocation before a prospective test. With order_id it sizes a test in the sample book. With your own baseline_rate, mde or relative_lift, and daily_volume it sizes yours, and that form needs a workspace key.

Runtime: SandboxStatus: Livetools/call · size_holdout
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "size_holdout",
    "arguments": {
      "order_id": "ORD-012"
    }
  }
}

Said, on the sample book: hold back 1% for 7 days to detect a 0.88pp lift, where 736,973 units reached and 7,444 held back detect 0.80pp at 80% power. ORD-067 gives the other kind of answer. Its test is capped at 48 units per arm, which can detect a 13.8pp lift, and the 0.40pp target needs 57,487 units per arm.

Runtime: SandboxStatus: Livetools/call · size_holdout
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "size_holdout",
    "arguments": {
      "order_id": "ORD-067"
    }
  }
}

The ORD-067 response succeeds with verdict: underpowered, recommended: null and limitation.code: holdout-underpowered-not-proof. The 48-unit cap on each arm still binds at 50% held back. More calendar time alone cannot remove that cap. ORD-001 has no unit test and returns HTTP 409 with order_has_no_holdout.

Check that a holdout ran clean

Runtime: SandboxStatus: Livetools/call · run_analysis
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "run_analysis",
    "arguments": {
      "method": "comparison/holdout-integrity",
      "order_id": "ORD-012"
    }
  }
}

Measured on the sample book: 4,516,160 units were assigned to treatment and 4,523,200 held back, a 49.96% split against 50% planned, and 0% of held-back units were reached. Read the arms yourself with one query.

Runtime: SandboxStatus: LivePOST /api/sql/run
SELECT holdout_arm, SUM(eligible_units) AS eligible_units, SUM(purchases) AS purchases,
       ROUND(100.0 * SUM(purchases) / SUM(eligible_units), 3) AS purchase_rate_pct
FROM outcomes WHERE order_id = 'ORD-012'
GROUP BY holdout_arm ORDER BY holdout_arm

holdout_arm is treatment, control or none, and the check compares the first two. The treatment arm bought at 7.33% and the control arm, the held-back units, at 6.45%: a difference of 0.88pp.

Forecast ranges and calibration

Every forecast carries a range. The width comes from past misses: calibration/split-conformal-band takes forecasts that have already been scored and returns the half-width that covered the requested share of them.

Runtime: SandboxStatus: Livetools/call · run_analysis
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "run_analysis",
    "arguments": {
      "method": "calibration/split-conformal-band"
    }
  }
}

Measured on the sample book: 21 scored cases put the 80% range for net margin at 14,827 to 17,367 around 16,097, and they support coverage of at least 81.82%. Worked arithmetic: with 21 cases the 18th smallest miss sets the half-width of 1,270, and rank 18 of 22 is 81.82%. The method states its own condition: the scored cases and the next forecast come from the same population, with no drift between them.

The track record is listed whole, misses included. Of 36 Decisions in the sample book, 31 are scored: 27 landed inside their range and 4 landed outside. One had no measurable outcome and 4 are open. On the sandbox the record is read with get_calls, one of its older tool names.

Runtime: SandboxStatus: Livetools/call · get_calls
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_calls",
    "arguments": {
      "limit": 3
    }
  }
}

Launch audiences from priors

Before a campaign has delivery of its own, Precise can rank audiences from comparable past campaigns in the customer's cloud. This is the first door of Launch Audiences: it ranks segments the advertiser is already approved to use, works on historical totals, and needs no new data rights. Every launch number is a Forecast with zero own impressions until the BAU Control Line comparison closes.

StepMethodWhat it does
Pool comparable campaignscalibration/hierarchical-prior@1.0.0Fits one population prior from at least three comparable past campaigns on the same outcome and gives each candidate audience a prior net return per dollar with an interval. It takes effects with their sampling variances (REML), conversions out of eligible units (beta-binomial) or counts over exposure (gamma-Poisson). With fewer than three it declines to give a prior, with hierarchical-prior-not-identifiable.
Credit by data partnercontribution/owen@2.0.0Splits past campaign value first across data partners, then across each partner's segments, using the partner grouping you supply.
Measure overlapApache DataSketches ThetaEstimates the reached households two candidate audiences share, inside the customer's cloud. See sketch functions.
Pick a set that does not repeat itselfprecise.portfolio-select/v1 and portfolio/select@1.0.0Picks, one at a time, the audience that adds the most independent net return per dollar, scored by a log-determinant over quality and overlap, then splits the budget within each audience's minimum and cap. An audience with no settled or family-prior evidence is refused.
Price after feesFee WaterfallPrices each audience or deal after media, data, supply and curation fees. An undisclosed fee stays unknown. See the fee stack.
Size the test before launchpower/holdout@1.0.0, design/holdout-split@1.0.0, design/block-length@1.0.0Sizes the BAU Control Line split and block length, or an Audience Holdout, under the Holdout opportunity cap.

What runs today: both catalog methods run on a tenant Gateway, and the sandbox lists their contracts in its catalog without running them on the sample book. The selector's weights are starting values. Its output marks them desk-parity-not-adtech-settled until they are refit on settled ad-tech results. Overlap is read one pair of audiences at a time; a builder that fills the whole overlap table for a candidate set is next. No single operation runs the steps together yet; one planning operation is planned. Known limits

Add a settled launch to the prior pool. When the BAU Control Line comparison closes, the launch joins the comparable campaigns as one more group: its measured net lift and that lift's sampling variance. The next fit includes it, misses as well as hits, so the next launch starts from settled results.

Methods on the sandbox

GET https://sandbox.precise.ai/api/catalog (with your scoped penv_... key) lists 64 methods and six workflows. Inside your isolated workspace, run_analysis executes 21 live methods and five workflows on the sample book or on your own aggregated inputs (computed and returned, never retained). Pass "describe": "<method>" for a method's input and output schema, or "list_contracts": true for all of them.

This page uses contribution/shapley, power/holdout, comparison/holdout-integrity and calibration/split-conformal-band. The same tool also runs contribution/shapley-intervals, contribution/owen, contribution/pairwise-interaction, comparison/paired-cluster-ratio and comparison/matched-cells.

Next: Partner data matching. Limits and refusal codes are in Limits and errors.

↑↓ to move↵ to open

Connect an agent

Precise Sandbox speaks MCP over Streamable HTTP with a per-company workspace key (penv_...). Request a private sandbox key at sandbox.precise.ai.

https://sandbox.precise.ai/api/mcp/<YOUR_SANDBOX_KEY>

Set PRECISE_SANDBOX_KEY to your per-company workspace key (penv_...), then run once in a terminal.

claude mcp add --transport http precise-sandbox https://sandbox.precise.ai/api/mcp --header "Authorization: Bearer $PRECISE_SANDBOX_KEY"