← All writing

AI evaluation · Engineering

Three AI Audits: Why a Model Score Is Not Enough

A code-review benchmark, a live ML replay, and a small vision audit produced respectable headline numbers. Each needed a different check before a downstream system could safely use the result.

In a code-review test, three models landed on 0.949. Their failures were different: one returned malformed structured data, one blocked a safe path guard, and one changed an import boundary into a call-graph prohibition. In a live ML validator, a feature threshold was 163–423× too large because training and serving measured different units. In a vision audit, a local model got31/36 strict answers right, then returned "blue" where the calling service accepted only yes, no, or unclear.

Each number summarized a run without preserving the information needed to use it safely.

Three linked evaluation contracts for inputs, outputs, and evidence, explaining why a score alone is insufficient.
A score becomes useful only after the surrounding contract can be checked.

A score compresses the run

A score tells you how often a result matched a declared rule on a declared sample. It does not preserve the unit of a feature, whether a response can be parsed, or which failures produced the average. Those details decide whether a model result can pass into a product, a merge gate, or another research step.

Comparison of a code-review benchmark, ML feature parity audit, and vision audit, showing their headline metrics, hidden failure, and required control.
Each audit needed a different control; none was repaired by a better aggregate metric alone.

1. Input contract: did both paths measure the same thing?

The feature-contract audit started withlarge_share, a model feature meant to describe the share of a sweep made up by unusually large trades. Training derived its threshold from individual trade quantities. The live validator derived a threshold from per-second net aggressive volume, then applied it to individual trades.

Both variables were called volume. They were not the same measurement. Across affected symbols, the live threshold was 163–423 times larger; the feature was near zero in at least 97% of live events. A distribution monitor can flag the result without identifying the unit substitution that caused it.

# Same fixture, same direction, same raw trades.
historical = batch_features(fixture.trades, fixture.direction)
streaming = live_features(fixture.trades, fixture.direction)

assert historical.large_share == streaming.large_share
assert historical.run_frac == streaming.run_frac

The check has to run before either path produces a score. For numerical pipelines, I would retain the raw inputs, units, time window, direction convention, and code or artifact version alongside the result.

2. Output contract: can the next program consume the answer?

In the GTA VI vision audit, a local Gemma 3 model answered 36 fixed questions about 12 official screenshots. The strict score was 31/36, and an immediate duplicate run returned the same outputs. One of them was still invalid: "blue" for an enum restricted to yes, no, or unclear.

A service needs an explicit policy for an invalid value: retry, escalate, or fail closed. A successful retry can restore operation, while the first-run score remains 31/36.

type Answer = "yes" | "no" | "unclear";

function accept(value: unknown): value is Answer {
  return value === "yes" || value === "no" || value === "unclear";
}

3. Evidence contract: what did the number hide?

The code-review benchmark used 13 small TypeScript diffs and six explicit repository rules. Gemini 3.7 Flash scored 1.000. Claude Sonnet 5, GPT-5.4 mini, and Qwen3 Coder 480B each scored 0.949. Calling the tie a shared result would have been wrong.

Claude blocked a direct Electron import but produced a payload with placeholder rule ID and evidence. GPT-5.4 mini treated a conservative path-containment guard as a vulnerability. Qwen followed a valid renderer bridge into Electron and rejected the resulting call graph, even though the policy prohibited a direct import. The same score described three different operational risks.

Retain the input cases, labels, raw outputs, parser results, and failure categories. The aggregate score can point at a system worth inspecting; the artifact shows what happened inside the score.

The order of checks

A vertical evaluation stack: input contract, output contract, then evidence contract.
Start with what was measured, then validate what was emitted, then preserve how the score was made.
  1. Define source data, units, prompt or feature semantics, scope, and expected labels before inference.
  2. Check schema, types, allowable values, and the policy for invalid or abstaining outputs.
  3. Retain the cases, raw outputs, versions, and failure breakdown that produced the metric.
  4. Report the score with that material, since the score is only the summary.

Scope

These are three small, purpose-built audits from different systems. They do not establish a general ranking of models or a universal evaluation framework. The code-review fixtures were synthetic and single-file; the vision audit used 12 screenshots labelled by one reviewer; the feature replay concerned one recorded research pipeline. The shared lesson is narrower: a good-looking metric does not tell you whether the integration measured the intended input, emitted an acceptable output, or left enough evidence to review.

Before relying on a model score, ask what was measured, what can flow into the next system, and what remains for someone else to inspect.

PK / RESEARCH NOTES

Research notes, when they're worth sending.

AI/ML systems, experiments, and the results that did not survive scrutiny.