Deterministic Verification

An automated validation approach using programmatic code that guarantees 100% reproducible pass/fail outcomes for identical inputs, eliminating stochastic AI misreporting and hallucinations.

General Meaning

Deterministic verification refers to software validation routines—such as Python scripts, regular expressions, JSON schema validators, and mathematical proofs—that execute purely algorithmic rules unaffected by random seeds or probabilistic variance. Given identical input data, deterministic checks always produce the exact same validation output.

In contrast, inspections performed by large language models (LLMs) are inherently stochastic. Even with identical prompts, an LLM may fluctuate in judgment, overlook syntax flaws, or suffer from confirmation bias by falsely reporting that an issue has been resolved. Deterministic verification provides an unyielding, objective baseline that guarantees rule conformance before any subjective review takes place.

Why It Matters

  • Immunizing pipelines against AI self-reporting bias: Prevents blind trust in autonomous AI claims such as 'all tests passed' by objectively verifying real artifact integrity.
  • Dramatically superior execution speed and zero token cost: Deterministic Python scripts run in milliseconds without consuming expensive API tokens, GPU VRAM, or network bandwidth.
  • Repeatable and objective gatekeeping: Because verification outcomes are strictly binary and immutable across runs, they serve as trustworthy criteria for CI/CD merge gates and completion receipts.

How the Site Factory Uses It

The Site Factory enforces a strict architectural policy established on 2026-10-30: algorithmic deterministic checks serve as the primary gatekeeper, while LLM reviews are relegated to a subordinate secondary role. The system never accepts task completion based solely on an agent's self-assessment.

Specific tools enforce deterministic compliance: validate_design.py and schemacheck.py validate JSON schemas and subdomain regex patterns; check_sources.py validates that extracted numbers and municipality names strictly match raw HTML archives; review.py flags prohibited words, missing ad declarations, CSP headers, and broken internal links; and tools/work.py receipt records SHA-256 content hashes, PR numbers, and exit timestamps. A zero exit code alone never qualifies as done. High-level LLM reviews are only invoked after all deterministic scripts return clean passes.

Caveats & Operational Rules

  • The fallacy of delegating everything to AI: Using an LLM to check JSON syntax or forbidden words burns thousands of tokens while risking hallucinated approvals; mechanical checks must always be implemented in plain deterministic code.
  • Maintaining clear boundaries between deterministic checks and LLM reviews: Maintain a crisp separation between objective criteria (counts, mathematical equivalence, hashes) and subjective semantic assessments (natural readability and tone).

Related Terms

References

  • Book: Martin Kleppmann, *Designing Data-Intensive Applications*, Chapter 1 (Reliability, Scalability, and Maintainability)

Verified: 2026-11-08