← the late compiler
C_000119 · llms and generative ai · advanced

Deterministic Validators

Programmatic checks — schema validity, format, forbidden content, numerical bounds — that give unambiguous pass or fail signals.

Step 1 of 4

In words

What it is, why it matters, and what it is like.

Why am I learning this?

This concept gives you the first, most reliable layer of checking any AI system's output. Before you spend money on a model judge or hours reading human review, deterministic validators catch the failures that are unambiguous: the answer isn't in the right format, contains forbidden content, or is numerically out of range. They are the cheapest, fastest, and most reproducible checks you will use. This unlocks further study of model-based evaluation — knowing when a deterministic check is enough and when you need an LLM-as-judge. Without this foundation, you will later be tempted to use an expensive model judge for something a simple rule could catch, wasting time and money.

The idea, in plain terms

Imagine you are checking a form someone filled in by hand. You have a list of rules: the date must be written as day/month/year, the phone number must have exactly 10 digits and start with 9, 8, 7, or 6, the 'age' field must be a number between 0 and 120, and the 'comments' box must not contain the word 'bomb'. None of these rules require judgment or interpretation. A date like '32/13/2024' is just wrong — the day can't be 32. A phone number like '123' is too short. An age of 200 is impossible. And if someone writes 'bomb' in the comments, you reject it without reading the rest. You do not need a brilliant assistant to check these; a simple clerk with a checklist can do it. In AI, a deterministic validator is exactly that checklist. It takes the output of a model — text, a JSON object, a number — and applies rules that have only two possible results: PASS or FAIL. There is no 'maybe'. This is in contrast to a model-based judge, where a large language model looks at an answer and decides, with some probability, if it is good. Deterministic validators do not guess; they follow rules. In the world of AI, where models can produce almost any output, having a set of checks that are unambiguous is like having a solid foundation for a building — you can build fancier things on top, but you need this base first.

An analogy

Think of a security guard at a gated entrance. His job is to check everyone who wants to enter. He has a clipboard with a list of checks: Does the person have a valid ID? Is the ID's photo matching their face? Is the ID's expiry date in the future? Is the person on the do-not-enter list? These checks are binary — yes or no. He does not evaluate the person's character or whether they seem nice; he just checks the facts. If any check fails, the person is stopped. A deterministic validator is that security guard. It does not use a magic crystal ball; it uses a checklist of rules that are written in code. Now, consider where this guard's power ends. He cannot decide if a person is legally allowed to enter a country — that needs an immigration officer with judgment. He cannot assess if a person is a security risk based on their behaviour — that needs expert analysis. The guard's checks are only as good as the checklist. If the checklist is incomplete, a clever person might get through (in AI, a model might produce a subtly harmful answer that passes all format checks). So deterministic validators are powerful for what they are, but they are only a first line, not a complete solution. They are cheap, fast, and never get tired, but they cannot judge quality or intent.

Definition

A deterministic validator is a programmatic check — such as schema validation, format matching, forbidden content scanning, or numerical bound testing — that returns an unambiguous PASS or FAIL signal based on a fixed set of rules, with no randomness and no model-based judgment.

Where this sits

You may have heard of the 'Evals Gap' — the widespread failure to properly evaluate AI applications before shipping. Deterministic validators are the first step in closing that gap. They are the cheapest and most reliable evaluation tool in your arsenal. Also, they connect to 'Evaluation Datasets': you will build a set of inputs to test your validators, to ensure they catch what they should. And when you later learn about 'LLM as Judge', you will see that deterministic validators are the layer that should run before a model judge, catching the easy structural failures so the judge only handles the hard cases. They also relate to 'Answer Relevancy and Correctness' — a deterministic validator can check for a format that implies relevance or a fact that implies correctness, but it cannot judge whether the answer truly addresses the question. You have not yet studied any of these topics, but this concept will be the bedrock you build on.

Signal from the Frontier

Get the next essay on mind, machine, and meaning

Essays at the intersection of AI, philosophy, and Indian governance. No promotional content.

We'll send a one-click sign-in link to confirm. No password needed.

Views expressed are personal and do not represent the Government of India or the Government of Uttarakhand.