Interview question
Build an offline AI evaluation harness with slice-based release gates
Builds a reproducible evaluation harness that records immutable cases, versioned outputs, deterministic checks, calibrated graders, slices, and release decisions.
TL;DR
Builds a reproducible evaluation harness that records immutable cases, versioned outputs, deterministic checks, calibrated graders, slices, and release decisions.
Evaluation dataset design, reproducibility, grader calibration, slice metrics, paired comparison, uncertainty, and actionable release gates.
Practice the problem like a real interview: restate, reason, implement, and test.
Implement a release evaluation for a support-answer feature. Each immutable case includes approved input, expected facts or a task-specific scoring guide, risk slice, and stable ID. Run a candidate and baseline configuration, store versioned outputs, apply deterministic checks before model-based grading, compute paired slice metrics with uncertainty, and block releases on material regressions rather than one aggregate average.
Move to the linked follow-up, next path step, prerequisite, or deeper variant.
Move forward in the planned practice sequence.
Global groundedness: baseline 0.86, candidate 0.88
Billing-policy slice: baseline 0.84, candidate 0.68 -> release blocked
Schema validity: candidate 99.9%
High-risk unsupported-claim rate: candidate 2.1%, gate <= 0.5% -> release blocked.
def evaluate_release(dataset: Dataset, baseline: Config, candidate: Config) -> Decision:
runs = {}
for case in dataset.cases:
runs[case.id] = PairedRun(
baseline=execute(case, baseline),
candidate=execute(case, candidate),
)
results = []
for case in dataset.cases:
pair = runs[case.id]
deterministic = deterministic_checks(case, pair)
judged = blinded_pairwise_grade(case, pair) if deterministic.can_grade else None
results.append(case_result(case, pair, deterministic, judged))
report = aggregate_paired(
results,
slices=dataset.declared_slices,
confidence=0.95,
)
violations = [gate for gate in RELEASE_GATES if not gate.passes(report)]
return Decision(
allowed=not any(gate.blocking for gate in violations),
violations=violations,
report=report.with_reproducibility_manifest(dataset, baseline, candidate),
)
Execution is O(cases × configurations), while model and grader calls dominate cost. Pairing reduces variance, but small slices still need explicit uncertainty and minimum sample handling.
Aporeon is shaped by Aleksandar Tomovski, a software developer with experience on both sides of technical interviews. Content is reviewed for accuracy, natural spoken delivery, useful depth, and honest trade-offs.
Help improve the interview library.
Say thanks with a standalone, one-time $5 contribution. No account required.