A labeled or feedback-rich set used for iteration. It teaches the benchmark and therefore cannot be the final unbiased estimate.
Before the clock
An evaluator is a security boundary and a product specification.
If the harness ignores failed cases, normalizes malformed output creatively, leaks hidden labels, or runs a submission twice, the leaderboard rewards the wrong behavior. The scoring implementation—not the prose README—is the executable contract.
Labels and often inputs withheld from entrants; access is isolated and repeated probing is budgeted to reduce overfitting.
A constrained execution environment: no network, read-only inputs/root, bounded CPU/memory/PIDs/time/output, ephemeral writable space.
Signed manifest proving submission digest, dataset, runner, metric code, environment, seeds, outputs, and score.
Opening promptDesign Glassbox Arena, a multi-tenant evaluation platform. Teams submit code or agent containers; the service executes them on public and private datasets, scores deterministically, prevents gaming and leakage, diagnoses hard slices, and emits reproducible signed results. Treat submissions as hostile.
The benchmark must deserve trust
Assume 2,000 submissions/day. A full private run has 500,000 cases and each case costs 150 CPU-ms. Design the platform end to end.
I see four authority boundaries: specification, execution, ground truth, and scoring. Entrant code is untrusted. Private inputs/labels and metric code are privileged. A score is valid only for an immutable tuple: submission image digest, dataset snapshot, runner image/architecture, metric version, resource profile, environment/seed, and completed case-result manifest.
I will clarify submission languages/artifacts, interactive versus batch agents, network/tool simulation, deterministic requirements, per-case deadline, public feedback budget, risk weights, tenant privacy, and what “reproducible” means across CPU architectures. I will never compute a flattering metric over only successful rows.
Define the evaluation lifecycle
What capabilities, actors, and exclusions are in scope?
Actors are evaluation author, dataset curator, entrant/engineering team, CI service, sandbox scheduler, human reviewer, security operator, and release approver. The lifecycle is define spec → register versioned datasets/slices/metrics → upload and scan immutable image → public smoke/feedback run → quota-controlled private run → shard execution → strict output validation → deterministic aggregation → slice diagnostics/manual review → signed scorecard → promote or reject.
Functional requirements include private/public partitions, stratified slices, resource profiles, resumable shards, hidden labels, result access controls, leaderboard/project views, run comparison, artifact retention, appeals, and rerun policy. NFRs: no runtime network, P95 queue start under five minutes for smoke runs, full-run completion under two hours, deterministic score equality within an explicit tolerance, 99.9% scheduler availability, and no cross-tenant/label leakage. Foundation-model training is out of scope.
Make gaming impossible by construction
What invariants protect the benchmark and the score?
- Inputs, labels, slice membership, metric code, and submission artifact are content-addressed and immutable for a run.
- The entrant sees only the documented input view; labels, private slice names, other tenants, secrets, clocks, network, and host metadata are unavailable.
- Exactly one terminal result exists per expected case ID: valid output, timeout, crash, resource breach, malformed output, or missing.
- Every terminal category contributes to the denominator and policy-defined loss.
- Parser behavior is strict and versioned—no whitespace concatenation, locale guessing, duplicate IDs, NaN/Inf, or silent coercion.
- A shard retry never changes submission/dataset/runner tuple; aggregation consumes one fenced accepted attempt per case.
- Private feedback and submission frequency are budgeted so leaderboard probing cannot become label extraction.
Compute is the first architecture constraint
Size compute, wall time, and result volume. Show the math.
Two thousand submissions × 500,000 cases × 0.15 CPU-seconds is 150 million CPU-seconds/day, or 1,736 continuously busy cores. At 70% target utilization I provision around 2,480 cores before P99 and security overhead. This immediately suggests tiers: cheap smoke/public runs for every commit, full private runs only by policy or quota.
With 32 single-core shards, one full submission uses 15,625 cases/shard × .15 s ≈ 39 minutes ideal wall time; startup, skew, retries, and aggregation push the SLO higher. One billion case results/day at an 80-byte compact record is 80 GB/day, while stdout/artifacts must have strict caps and short hot retention. Datasets are mounted once per node/cache by immutable digest rather than copied per run.
150,000,000 ÷ 86,400 = 1,736 busy cores; ÷ 0.70 ≈ 2,480 provisioned cores
500,000 ÷ 32 × .150 s = 2,344 s ≈ 39.1 minutes ideal shard wall time
Evaluation fleet lab
Change the mock workload. The calculator assumes one core per shard.
Does not include container startup, skew, retries, I/O, speculative duplicate attempts, private-set encryption, or retained logs.
A score begins with immutable manifests
What are the core entities and APIs? How do you prevent a run from mixing versions?
EvaluationSpecVersion pins input/output schemas, resource profile, metric definitions, failure penalties, determinism tolerance, shard plan, and feedback policy. DatasetSnapshot pins objects, case IDs, private labels, and slice membership. Submission pins the scanned image digest and owner. Run pins all three plus runner/environment manifest before scheduling.
Each ShardAttempt has a lease epoch and output object hash; a committed CaseResult names case ID, terminal status, parsed value hash, duration/resource counters, and attempt. Aggregation first validates the complete expected case-ID set, then computes metric components from a canonical ordered record stream. APIs return run/score IDs, never mutable “latest,” and idempotency makes CI retries return the same logical run.
Keep labels out of the execution plane
Walk a submission from upload to signed scorecard.
The artifact gateway authenticates tenant/team, performs resumable upload, hashes the OCI image/archive, scans malware/SBOM/policy, and stores it immutable. The run API authorizes a spec and run tier, reserves compute quota, pins the manifest, and emits a scheduler event. Dataset staging decrypts private inputs inside the isolated evaluation boundary; label objects are mounted only to the scoring service—not the sandbox.
The scheduler shards stable case IDs, leases sandbox nodes, and records heartbeats/resource usage. Each sandbox has no network, read-only root/input, minimal env, bounded CPU/memory/PIDs/scratch/output/wall time, deterministic clock/randomness contract, and a trusted output side channel. Validators parse strict framing and create one terminal record per case. The aggregator verifies completeness, reduces deterministic metric components, computes slice scorecards, and signs an attestation. Public UI sees only policy-approved feedback.
Reproducibility needs an environment contract
What makes execution secure and reproducible across reruns?
I pin image digest, runner image, kernel/runtime profile, CPU architecture class, locale/timezone, dependency artifacts, input manifest, seeds, thread limits, and metric version. I remove network, cloud metadata, host mounts, privileged syscalls/capabilities, wall-clock detail, and ambient secrets. Namespaces plus cgroups are necessary but I prefer microVMs or equally strong isolation for hostile multi-tenant code.
Determinism is defined by contract. Integer/schema outputs should match exactly. Floating metrics specify canonical decimal parsing, stable ordering, numerically stable reduction, and tolerance. If the submitted model is inherently stochastic, the spec supplies deterministic seeds and may evaluate repeated trials; the attestation records each seed. A clean-room rerun pulls only content-addressed artifacts—never a developer cache.
We store stdout/stderr separately with byte caps and secret scanning. A failed process is not rerun merely to collect stderr because the second execution could behave differently or leak information.
Score completeness before quality
Design the evaluator so a clever submission cannot game missing cases or parser quirks.
Phase one validates the result set: expected IDs, exactly one row each, schema version, bounded UTF-8 framing, allowed finite numbers, checksums, and no extra rows. Every case receives a terminal status. Phase two assigns policy loss: valid prediction metric, timeout penalty, crash penalty, malformed penalty, and often catastrophic-policy penalties. The denominator is the full expected set.
For the reimbursement-style example, MAE over successes alone is wrong: one exact answer plus 499,999 crashes cannot beat a complete imperfect model. Likewise inclusive tolerances must be implemented as abs(error) <= threshold; parser whitespace must never turn 1
2 into 12; declared timeout, memory, output, and PID limits must actually be enforced.
Aggregation uses stable case ordering and pairwise/Kahan-style sums where needed. Metric code has golden unit/boundary/property tests and a separate reference implementation. The scorecard displays coverage, every failure bucket, weighted loss, confidence calibration, and slices—not one scalar alone.
The leaderboard rewards a crashing model
Production shows the top submission returned one exact case, crashed on 499,999, and still won because MAE ignored failures. What do you do?
I freeze the leaderboard and mark affected scorecards invalid; do not silently recompute history. I issue a new metric/spec version with complete-set validation and explicit terminal penalties, run a migration audit to identify affected runs, and recompute into new signed scorecards linked to the originals. Entrants get a transparent incident note and appeal path.
Prevention adds invariants before metric reduction, golden adversarial submissions that crash/timeout/omit/duplicate/emit NaN, property tests that worsening any case cannot improve coverage-adjusted loss, and differential testing against a simple reference evaluator. Release requires full canonical container execution, not only metric-unit tests.
MAE = error sum ÷ successful cases. Crash strategically on hard cases.
Materialize every expected case status first; metric denominator and failure loss cover all IDs.
Version the evaluator, invalidate—not overwrite—old attestations, recompute, disclose, and allow appeal.
Private labels leak through the side channel
A submission infers private labels from per-case timing and repeated leaderboard feedback. Another tries DNS and output bombs. Revise the system.
There is no network namespace route or DNS resolver, but I also remove clock precision, host contention signals, case filenames/order clues, and per-case feedback. The runner can randomize or batch case order from a hidden seed and equalize label-dependent scoring work because labels never enter the sandbox. Public results expose coarse aggregate/slice feedback only after minimum cohort sizes.
Private evaluation has submission quotas, cooldowns, similarity detection across near-identical submissions, and a privacy budget for feedback. Final holdout inputs/labels rotate and are inaccessible to normal developers/CI. Output bytes, files, PIDs, syscalls, memory, CPU, scratch, and wall time are bounded outside entrant code; violations become terminal results. Network or sandbox escape attempts trigger security quarantine, not merely a low score.
I monitor unusual query sequences, score deltas, timing correlation, artifacts trying to read host paths, and leaderboard overfitting. A final release decision also uses a never-before-seen confirmation set.
One score hides the product risk
The aggregate score improves 4%, but `.49/.99` amounts, decimal mileage, long documents, and low-contrast scans regress. Ship?
Not until hard-gate slices pass. Slice definitions are versioned, private where they could leak labels, and can overlap. I require minimum support or confidence intervals; tiny slices trigger qualitative review rather than noisy rank changes. The scorecard shows coverage, central metric, worst-slice loss, catastrophic count, calibration, runtime/resource distribution, and reproducibility across reruns.
Schema/document drift is itself a slice: if prose says mileage integer but data contains floats, the canonical schema and validation behavior must be explicit. We do not coerce silently. I compare against the incumbent per slice and weight business harm, not merely sample frequency. A global gain cannot average away a safety or contractual regression.
Capacity, fairness, and audit
How do you schedule fairly, observe the platform, and roll it out?
Hierarchical queues allocate tenant/team quotas, interactive smoke capacity, scheduled private evaluations, and low-priority backfills. Weighted fair scheduling with aging prevents one team from occupying the fleet; admission control reserves full-run budget before launch. Shards checkpoint only trusted result manifests; deterministic failures get finite retries, while node failures can retry with the same tuple and fenced attempt.
I monitor queue age, core utilization, sandbox startup, timeout/resource-breach rate, shard retries, result completeness, score determinism, metric drift, label-access attempts, private feedback budget, slice sample health, attestation gaps, and cost per valid evaluation. Rollout begins with internal reference submissions and shadow scoring, then public smoke runs, then small private canaries, then promotion gates. Old evaluator versions remain reproducible but cannot masquerade as current.
The answer in 45 seconds
Summarize your design and its defining trade-off.
Glassbox Arena pins submission, dataset, runner, metric, resource, and seed into one immutable run. Hostile code executes without network or secrets in resource-bounded isolation; labels live only in the scoring plane. Every expected case gets a terminal result, so crashes and malformed output cannot improve the metric. Aggregation is deterministic, slice-aware, and signed.
Private feedback is budgeted, timing and output side channels are constrained, and promotion uses a final confirmation set plus reproducible clean-room reruns. The trade-off is rich feedback versus benchmark secrecy: I expose enough public diagnostics to improve engineering while rationing private information so teams cannot train on the test.
Complete reference
Data model: keys, invariants, access paths
| Entity | Primary key / fields | Invariant | Primary access path |
|---|---|---|---|
EvaluationSpecVersion | (tenant_id, spec_id, version); schemas, metrics, failure loss, limits, feedback policy | Immutable once used; all boundary behavior executable and tested | Create run; audit evaluator contract |
DatasetSnapshot | (tenant_id, dataset_id, digest); case manifest, label object, slice manifest, visibility | Inputs/labels/slices content-addressed; private objects separately authorized | Stage cases; score/slice lookup |
Submission | (tenant_id, submission_id); image_digest, SBOM, owner, scan status | Executed bytes exactly match accepted digest | Run creation; incident/artifact lookup |
EvaluationRun | (tenant_id, run_id); submission/spec/dataset/runner digests, seed set, state | Tuple frozen before queueing; one signed final scorecard version | Status; compare; reproduce |
ShardAttempt | (run_id, shard_id, attempt_no); lease_epoch, node, resource counters, output_digest | Only fenced accepted attempt contributes | Recovery; performance diagnosis |
CaseResult | (run_id, case_id); terminal_status, value_hash, metric components, attempt | Exactly one terminal row for every expected case ID | Aggregation; failure buckets; appeals |
Scorecard | (run_id, score_version); coverage, metrics, slices, catastrophic counts, signature | Derived only after completeness validation | Leaderboard/release gate/audit |
Attestation | (run_id, attestation_digest); artifact manifests, environment, event roots, signer | Tamper-evident and reproducible from retained inputs | Compliance export; rerun verification |
Concrete API surface
/v1/submissionsResumable artifact upload; returns content digest after scan, never executes mutable tag./v1/evaluation-runsIdempotency-Key; pins submission/spec/dataset tier, seed policy, quota reservation./v1/runs/{id}State, queue position, manifest digests, coarse progress; no private case/label detail./v1/runs/{id}/scorecardCoverage, metric versions, allowed slices, failure buckets, signed attestation link./internal/shards/{id}:claimFenced lease with exact case manifest and resource profile./internal/shards/{id}:commitExpected lease epoch + output digest; completeness/schema validation before accept./v1/runs/{id}:reproduceAuthorized clean-room rerun with identical tuple or explicit comparison tuple./v1/runs/{id}/appealsVersioned reason/evidence; human review cannot mutate original scorecard.Glassbox Arena isolation architecture
Submission bytes enter a hostile execution boundary. Private labels never do. A trusted validator and aggregator turn complete case results into a signed scorecard.
Inputs may cross; labels never do
The sandbox writes predictions to a one-way trusted channel. Only the scoring plane can join predictions with labels and private slices.
Consistency ledger
Operational scorecard
Platform health
Outcome quality
Visual values are illustrative. In production, every metric needs a unit, time window, tenant/slice dimension, owner, alert threshold, and prescribed action.
Phased rollout
Reference corpus
Internal known-good, known-bad, malicious, crashing, timeout, and parser-edge submissions.
Shadow evaluator
Run beside incumbent; compare every case component and investigate disagreements.
Public smoke
Small disclosed set, strict sandbox, rich feedback, no release authority.
Private promotion
Quota-controlled holdouts, signed attestations, slice gates, final confirmation set, appeal path.
Interview traps
- 01Computing error only over successful cases and dropping crashes/timeouts from the denominator.
- 02Documenting inclusive tolerance but implementing strict less-than at the boundary.
- 03Rerunning failed code to capture stderr, allowing behavior and leakage to change.
- 04Removing all whitespace so malformed multiline numbers become a different valid number.
- 05Supplying private labels, slice names, filenames, timing, network, or host metadata to entrant code.
- 06Using mutable image tags, “latest” datasets, or developer caches in a supposedly reproducible run.
- 07Reporting one aggregate metric while hard-risk slices or catastrophic outcomes regress.
- 08Allowing unlimited private submissions and high-resolution feedback, effectively exposing the test set.
- 09Treating containers as a perfect hostile-code boundary without syscall/kernel isolation and quotas.
- 10Publishing a score before verifying every expected case ID and one accepted fenced attempt.
Glossary
- Attestation
- Signed evidence tying a score to exact artifacts, environment, events, and metric code.
- Brier score
- Mean squared error of probabilities; useful for calibration, but still requires slice and business-loss context.
- Content address
- Cryptographic digest identifying exact bytes, avoiding mutable tags or paths.
- Differential test
- Run two independent evaluator implementations on generated boundary cases and compare results.
- Golden set
- Human-validated cases used to check behavior; if repeatedly optimized against, it stops being an unbiased holdout.
- Holdout
- Dataset not used for fitting or ordinary iteration, retained to estimate generalization.
- MicroVM
- Lightweight virtual machine offering a stronger kernel boundary than ordinary process/container isolation.
- Private feedback budget
- Limit on how often and how precisely hidden-test behavior may be revealed.
- Property test
- Generates many inputs to assert general rules, such as adding failures must not improve coverage-adjusted loss.
- Slice
- Versioned subgroup such as decimals, low contrast, long input, language, or policy edge case.
- Stable reduction
- Deterministic numeric aggregation order/algorithm that limits floating-point drift.
- Terminal result
- Exactly one valid prediction or explicit failure category for every expected case.
One-minute spoken recap
Pin everything: submission, dataset, runner, metric, resource profile, environment, and seeds. Isolate execution: no labels, network, secrets, host mounts, or unbounded resources. Validate before scoring: exactly one terminal record for every expected case; failures remain in the denominator. Protect the holdout: feedback budgets, side-channel controls, rotating confirmation data. Explain quality: coverage, failure buckets, risk-weighted metrics, calibration, hard slices, reproducibility, and a signed attestation.