AI Engineering
What I learned building AI verification pipelines
Getting an LLM to check its own output is harder than it sounds. Notes on building verification pipelines that catch real errors.
Last updated September 15, 2026
"The output looks right" is not a verification strategy, and it's the one most AI systems start with anyway — a developer reads a handful of outputs, they seem reasonable, and the system ships. That works at the sample sizes a developer can personally review. It stops working the moment volume exceeds what a human can spot-check, which for most production systems is almost immediately.
Two different kinds of checks
The first real improvement is separating verification into two categories that get confused if you don't name them separately: deterministic checks and model-graded checks. A deterministic check doesn't need a model at all — does the output parse as valid JSON, does a required field exist, does a numeric value fall inside a sane range. These are cheap, fast, and completely reliable, and skipping them in favor of "let the eval framework catch it" wastes a model call checking something a regex or a schema validator could catch for free. Model-graded checks are for genuinely subjective judgments a deterministic rule can't make — is this response actually relevant to the question asked, does this summary preserve the original's key claims — and that's where a second model call, scoring the first one's output, earns its cost.
The mistake I made early on was routing everything through model-graded checks, including things a JSON schema validator would have caught in milliseconds for free. Deterministic checks first, model-graded checks only for what's actually subjective, is both cheaper and more reliable than defaulting to "ask another model to judge it."
RAGAS and OpenAI Evals instead of eyeballing samples
Once a check needs a model's judgment, doing that judgment consistently is its own problem — a developer manually reading twenty outputs and going "yeah, these seem fine" isn't a repeatable process, and it doesn't scale past the first evaluation. RAGAS gives structured metrics specifically for retrieval-augmented pipelines — faithfulness (does the answer actually follow from the retrieved context, not just sound plausible), answer relevance, context precision — instead of a vague "does this look right." OpenAI Evals is the more general version: a framework for defining a rubric once and running it consistently across however many outputs need checking, instead of re-deriving "what does good look like" from memory every time.
The shift that matters isn't the specific tooling, it's going from ad hoc human spot-checks to a defined, repeatable rubric that produces the same judgment on the same input every time it's run — which is the property that makes a verification signal something you can actually trust and track over time, instead of a vibe that changes depending on who happened to review that batch.
What verification actually unlocks
The real payoff of a working verification pipeline isn't confidence in any single output — it's the ability to make a defensible decision about what to automate outright and what to route for human review. Without verification, that decision is a guess based on how the system felt during testing. With verification, it's a measured judgment: outputs that consistently pass every check can be automated with real confidence, and outputs that verification flags as uncertain get routed to a human instead of shipped blind. That's the actual difference verification buys — not a system that never makes mistakes, but a system that knows which of its own outputs it should be less sure about, and treats those differently from the ones it's earned confidence in.
Tags
Related posts