A deterministic validator is a rule-based, pass-or-fail check that enforces an invariant the same way on every run, independent of model judgment, serving as the non-probabilistic floor under an agentic pipeline.

How it works

A deterministic validator encodes an invariant as an explicit rule, a pattern match, a schema check, a build or test that must pass, a forbidden-token scan, and runs that rule against an input to return a binary verdict. Because the rule is fixed, the same input yields the same result on every run, with no dependence on a model's reasoning, its confidence, or which model ran. This is the complement of a judgment-based check, a model scoring output against a rubric, which catches nuance a rule cannot express but is itself probabilistic and can vary run to run. The two common places to put a deterministic check are at runtime, filtering an agent's inputs and outputs as it acts, and at build time, gating an artifact before it ships; the mechanism is the same rule-based verdict applied at a different point. What the validator does on a failure is a policy choice: block the action, fail the build, or hand back a specific reason for another attempt.

Why it matters

An agentic pipeline is probabilistic by construction, and a probabilistic system needs a floor that is not, or its guarantees are only ever as reliable as the model on its worst run. A deterministic check is that floor: it converts a rule from advisory context the model may or may not honor into an enforced boundary the model cannot cross, which is the difference between asking an agent not to do something and making it unable to. The honest limit is that a deterministic check only enforces what it can articulate, so it is strong on mechanically-checkable invariants, a secret must not be committed, a schema must hold, a test must pass, and useless on the dimensions a rule cannot capture, whether the writing is good, whether the design is sound, which still need judgment. Determinism is also not free of false positives, since a rule tight enough to catch the bad case often catches legitimate cases inside the same pattern, so an over-broad validator blocks real work and trains people to bypass it, which is worse than not having it. The discipline is to reserve deterministic gates for the invariants whose violation is costly and unambiguous, and to leave the judgment calls to a verifier that can judge.

In practice

A content pipeline runs an agent that drafts and edits copy, and a rule forbids a particular punctuation mark in shipped text. Rather than instructing the agent to avoid it and hoping, the pipeline runs a deterministic scan that fails the build if the mark appears, so a draft that contains it cannot ship regardless of how the agent reasoned about the rule. The agent is still free to make the judgment calls a scan cannot check; the scan only guarantees the one invariant it was built to enforce, every time, identically.

Practical considerations

The same rule-based check appears under different names depending on where it sits: at runtime it is usually called a guardrail and filters inputs and outputs for safety; at build time it is a gate or validator that holds an artifact to a standard before release; the use here is mostly the build-time form. A deterministic validator is cheap to trust and cheap to run, so it belongs at the bottom of a layered check, with a probabilistic judgment layer reserved for what it cannot see. The recurring failure is scope, in both directions: a validator too narrow lets the bad case through on a path it did not anticipate, and a validator too broad blocks legitimate work and gets disabled, so the rule has to be tuned against real inputs rather than written once and trusted. A validator is also only the enforcement of a decision someone made, so a wrong or stale rule enforces the wrong thing as reliably as a right one enforces the right thing, which makes the rule set something to maintain, not set and forget. Where an invariant genuinely cannot be expressed as a rule, the honest move is a judgment-based check, not a brittle approximation that fails silently on the cases it was never able to see.

Related standards and prior art

  • LangChain: guardrails · continuously updated names deterministic guardrails (rule-based logic: regex, keyword matching, explicit checks) as a category distinct from model-based guardrails
  • Guardrails AI: validators · continuously updated an open-source framework (independent of Anthropic) whose core unit is a validator: a method encoding criteria that checks whether a value meets them
  • Trustworthy Agentic AI Requires Deterministic Architectural Boundaries (arXiv 2602.09947) · 2026-02-10 argues deterministic architectural enforcement, not probabilistic learned behavior, is necessary for trustworthy agentic AI (argument developed for high-stakes scientific workflows)

Defined by Ready Solutions AI