What hardware verification can teach LLM evaluation
For decades, hardware verification has had to answer a question the AI field is only now taking seriously: how do you know you've tested enough?
A chip tapes out once. If a bug ships, you don't patch it. You respin silicon, months and millions later. That cost forced the field to get rigorous about a hard question, and the answer was never "write more tests by hand." Directed tests don't scale to a state space that large. So verification moved to constrained-random stimulus, assertion-based checking, and an explicit, measurable notion of coverage closure: a number that answers "are we done?" where there used to be a feeling.
Most LLM evaluation today is still in the directed-test era. You prompt a handful of hand-picked examples, read the outputs, and ship if they look good. The ideas hardware used to get out of that era carry over almost directly. The places where they don't carry over show what is hard about evaluating models.
I built Gatecheck to put this into practice, so the
mapping below comes from working code.
The four ideas that port
Constrained-random stimulus → generated, distribution-aware inputs. Instead of a fixed list of prompts, you sample inputs from a distribution that covers the behaviors you care about. Randomness isn't the goal. The goal is to get past the examples you happened to think of.
Assertions → deterministic graders. An assertion is a property the design
must satisfy on every run, checked mechanically. In the harness these are the
deterministic graders: exact, contains, regex, json_schema. They are
cheap and reproducible, which is why they can run on every commit.
The subjective layer → an LLM-as-judge. Some qualities (faithfulness, tone, whether an answer is helpful) no assertion can see. For those, a second model scores the output against a rubric. A judge is useful, and it is also the weakest link, which matters for the next idea.
Regression gating → fail the build on a drop. Snapshot today's pass rates as a baseline. Later, after a prompt edit or a model swap, re-run and fail (non-zero exit) if any suite regresses past a tolerance. This is a verification regression suite, aimed at a prompt instead of an RTL block.
Coverage closure → a measured "are we done?" This is the hardest idea to import and the most valuable: a tracked, reported measure of how much of the behavior space your suites exercise, in place of a gut call.
What a real run looks like
None of this needs a cluster. Here is a complete test from the classification suite Gatecheck ships. This is the whole thing, with no code:
- id: sentiment-positive
system: "You are a precise classifier. Answer with ONE word: positive, negative, or neutral."
prompt: |
Classify the sentiment.
Text: Absolutely loved it -- best purchase I've made all year.
graders:
- type: contains
any_of: ["positive"]
ignorecase: true
And here is every bundled suite: 19 tasks spanning classification, JSON
extraction, summarization, RAG faithfulness, tool selection, refusals, and
pairwise preference, run against two local models on my desktop (Ollama,
--concurrency 2, about three minutes wall-clock, $0.00, judge included and
also local):
| suite | llama3.1:8b | qwen2.5:7b-instruct | | --- | --- | --- | | classification | 1.00 [0.44-1.00] | 1.00 [0.44-1.00] | | structured-output | 1.00 [0.34-1.00] | 1.00 [0.34-1.00] | | summarization | 1.00 · judge 4.0 | 1.00 · judge 4.0 | | faithfulness | 1.00 · judge 4.8 | 0.67 [0.21-0.94] · judge 3.5 | | tool-use | 0.50 [0.15-0.85] · judge 1.5 | 0.50 [0.15-0.85] · judge 1.5 | | red-team | 1.00 · judge 4.3 | 1.00 · judge 4.5 | | preference | 1.00 [0.34-1.00] | 1.00 [0.34-1.00] |
Three things to read from that table, least important first:
- The intervals are wide on purpose.
1.00 [0.44-1.00]is what "3 for 3" proves, which is not much. A pass rate without an interval is a vibe with a decimal point. - The split between models is the useful part. qwen dropped a faithfulness task that llama held on identical inputs. A baseline gate catches a split like that on a model swap, before your users do.
- Every failure in this run was issued by a judge. All five came from
llm_judgegraders, and the transcripts say the judged behavior was largely correct. Ondecline-when-no-tool-fits, both models rightly declined, since there is no booking tool to call, and the local 8B judge failed them anyway. One rationale concedes the response "accurately states that none of the provided tools can be used" and then gives a fail verdict. The deterministic graders issued no false verdicts. Keep that in mind for the next section.
The decision that matters most
Which signals are safe to gate on?
In hardware you would never block tape-out on a flaky check. A test that sometimes passes and sometimes fails on the same input is worse than no test, because it trains everyone to ignore red. The same rule decides the architecture of an eval harness: deterministic graders gate CI; the judge does not.
In Gatecheck, CI runs --deterministic-only. The LLM judge captures real
quality, but it isn't reproducible enough to gate a pull request on, so it runs
locally or on a schedule and informs without blocking. Most of the design is
getting that line in the right place: what is a gate, and what is only a gauge.
Two smaller decisions follow from the same idea:
- An explicit verdict rule. A task passes only if every deciding grader passes. It is undecided when nothing produced a definite verdict, and a failure on error. Pass rate is computed over deciding tasks only, so nothing pads the denominator to make a number look better.
- Costs that aren't guessed. Local and unlisted models are counted as
$0and not estimated, because a made-up cost is worse than an admitted unknown.
Where the analogy breaks
The mapping isn't one to one, and the gaps are where the open problems are.
There's no clean coverage model for natural language. An RTL block has a finite, enumerable structure: lines, branches, FSM states, cross-products you can literally count. "Coverage" there is rigorous. The input space of a language model is unbounded and has no canonical decomposition, so "coverage closure" for LLM eval is, today, an analogy without a metric behind it. Saying so is more useful than pretending a pass rate is coverage.
The device under test is non-deterministic. Even at temperature 0, providers
don't guarantee identical outputs across runs, and seed support is partial. HW
verification mostly assumes a deterministic DUT. Here the DUT is part of the
noise, which is why reproducibility has to be built in.
Your checker is itself a model. An assertion is trusted. An LLM judge is a fallible system being used to evaluate another fallible system, with its own variance and biases, and single-sample judging doesn't even measure that variance. Measuring how reliable a judge is (ensembling, repeated sampling, confidence intervals on small-N pass rates) is the obvious next step. Since this was written, Gatecheck has added judge ensembles.
The takeaway
What carries over is a habit more than a tool: treat a model-backed system like any other system under test. Generate inputs instead of curating them, separate what you can gate on from what you can only watch, commit to the test before you read the results, and say plainly where your own measurement falls short. Hardware verification spent decades learning that habit because mistakes were expensive. AI systems are about to need it for the same reason.