Skip to content

The Drift Log · Determinism and model independence

Why Model Independence Is an Engineering Posture

1 September 2026 · 6 min read · 1406 words · established

Two identical crystal prisms casting exactly the same refraction

Replacing parsers with runtime LLM calls trades deterministic invariants for statistical tendencies. Logic must be owned at runtime.

A service crashes at 3:14 AM because an upstream payload contained an unexpected Unicode character.

Two years ago, this was a missing branch in a parser. Today, it is increasingly common to find that the parser does not exist at all. In its place sits an HTTP call to a hosted language model instructed to "extract the fields from this unstructured string and return JSON."

The code passed staging. It handled the test fixtures. It ran cleanly across tens of thousands of production transactions. Then, under a specific prompt token distribution, temperature non-zero variance, or an unannounced upstream model update, the model returned the JSON wrapped in a markdown code fence. The downstream deserialiser panicked.

This is not a bug in the model. It is an architectural error. When you place a probabilistic system inside a synchronous execution path, you surrender the ability to make hard assertions about what your system will do.

Owning your logic outright is an engineering posture. It requires drawing a sharp boundary between where statistical inference belongs and where deterministic software must run.

The Failure Mode of Delegated Logic

Teams rarely introduce runtime model dependencies out of malice. They introduce them because writing deterministic state machines, input sanitisation routines, and validation grammars is difficult, unglamorous work.

An engineer facing forty edge cases in legacy insurance claim documents can spend three weeks writing an AST-based extractor with rigorous unit tests, or thirty minutes crafting a prompt that handles the ten examples currently on their desk. The prompt feels like leverage.

In production, that leverage inverses. When deterministic code fails, it fails predictably. Given input $x$, it will produce faulty output $y$ every time. You can capture $x$, reproduce the defect locally in a single-threaded test runner, step through the execution frame by frame, patch the logic, and verify that the fix holds.

When a runtime model invocation fails, reproduction is statistical. The model might return valid output on the next nine attempts. The failure cannot be trapped with standard assertions because the failure domain is open-ended. You have not written a parser; you have introduced an external, mutable interpreter whose instruction set changes without a changelog.

This operational fragility creates three distinct costs:

  1. Latency and availability coupling: A deterministic parser executes in microseconds in process memory. A model call adds hundreds of milliseconds, introduces network hops, consumes connection pools, and couples core logic to third-party availability.
  2. Latent AI hallucination risk: The system cannot guarantee that a field omitted in the source input was not invented by the model to satisfy schema constraints.
  3. Flaky tests and non-reproducible CI runs: Integration suites that hit model endpoints inevitably produce flaky tests, training developers to rerun failed builds rather than investigate regressions.

When runtime logic depends on a model, your software does not have invariants. It has tendencies.

Two Meanings of Determinism

To eliminate this fragility, we must be precise about what "deterministic" means in a production codebase. The term is often overloaded to describe build pipelines and runtime logic interchangeably. They are separate properties.

+-----------------------------------------------------------------------+
| RUNTIME LAYER: Model Independence                                      |
| Pure functions, explicit state machines, zero statistical inference.  |
| -> Eliminates hallucination surface and runtime variance.             |
+-----------------------------------------------------------------------+
                                   |
                                   v
+-----------------------------------------------------------------------+
| DISTRIBUTION LAYER: Reproducible Builds                               |
| Byte-for-byte binary verification, sealed inputs, cryptographic trees.|
| -> Eliminates supply-chain tampering and environmental drift.          |
+-----------------------------------------------------------------------+

1. Model Independence (Runtime Determinism)

Model independence means that no AI model runs inside the critical path of the software, and no component's behaviour depends on a model's output at runtime.

If you feed input $A$ to function $f$, it will execute the exact same instructions and return output $B$ across every execution environment, forever. The hallucination surface is not reduced; it is zero. There is no statistical layer attempting to guess developer intent, no temperature parameter, and no schema drift caused by upstream weights shifting under your feet.

This is the standard by which critical infrastructure, billing engines, compilers, and core libraries have always been evaluated.

2. Reproducible Builds (Artifact Integrity)

Model independence guarantees how software executes; reproducible builds guarantee how software is packaged.

A build is reproducible if, given the exact same source tree, toolchain, and build environment, it produces a bit-for-bit identical binary or release archive. It ensures that the code running in production matches the audited source code, sealed by published checksums.

A system can have reproducible builds while relying on runtime model calls, leaving it vulnerable to runtime hallucinations. Conversely, a system can be entirely model-independent but suffer from non-reproducible builds due to unpinned toolchains or non-deterministic build timestamps.

A resilient engineering posture demands both: logic that executes without runtime statistical dependencies, distributed via artifacts whose provenance is mathematically verifiable.

The Cost of Owning the Logic

Conceding what is hard about model independence is necessary: writing explicit software takes more upfront effort than prompting a model.

Consider a validation engine for complex regulatory rules. If an engineering team decides to own that logic deterministically, they must:

  • Formalise the problem domain into explicit types and state transitions.
  • Write exhaustive boundary tests for every documented rule.
  • Build resilient fallbacks for malformed inputs that reject invalid data outright rather than guessing what the user meant.
  • Maintain the codebase over time as domain rules evolve.

This work requires domain understanding and disciplined systems programming. A prompt allows a team to bypass domain understanding temporarily. It creates an illusion of velocity while shifting the operational burden from build time to runtime, where errors cost orders of magnitude more to detect and remediate.

Prompt-in-the-Loop:
[Input] ---> ( External Statistical Engine ) ---> [Probable Output]
                     ^
                     | (Latency, Cost, Uncontrolled Variance)

Model-Independent Architecture:
[Input] ---> [ Validated AST / State Machine ] ---> [ Guaranteed Output ]

When you write the parser, the state machine, or the transformation matrix directly, you take on the engineering burden once. In exchange, you get predictable execution cost, near-instantaneous execution speed, zero external network dependencies, and a test suite that passes or fails on the merit of your code.

The Line Between Synthesis and Execution

Rejecting runtime model dependencies does not mean rejecting models entirely. It means restricting them to the environments where probabilistic systems are an asset rather than a liability: offline synthesis, discovery, and development-time tooling.

A model is exceptionally effective at exploring codebases, identifying patterns, suggesting implementations, or generating initial drafts of deterministic code. These are all offline activities.

The boundary condition is simple:

  • Offline (Permissible Inference): An engineer or an automated discovery pipeline uses a model to harvest requirements, generate test cases, or draft a state machine. The output is written to disk as plain source code.
  • Verification Gate (The Firewall): The generated code is subjected to static analysis, linters, type checkers, and exhaustive test harnesses. It must compile and pass deterministic validation suites without an active model connection.
  • Runtime (Strict Determinism): The verified code is deployed. At runtime, the model is entirely absent. The software runs as pure deterministic instructions.

If an AI-assisted tool drafts a regex or an arithmetic routine, and that code is checked into version control, audited by an engineer, and executed by a standard runtime, your production system remains model-independent. The model was a compiler of intent during development, not a runtime dependency.

The failure occurs the moment the model is left inside the loop—when the production server calls out to an inference endpoint to make decisions that should have been codified before the code was deployed.

An Audit for Monday Morning

If you want to evaluate where your systems stand, run an architectural audit against your core repositories next week. Look specifically for places where operational guarantees have been swapped for statistical shortcuts.

  1. Greep your runtime dependencies for inference clients. Search for API clients, HTTP wrappers, or SDK calls targeting model providers within your synchronous request paths, worker jobs, or background processing pipelines.
  2. Classify each call by intent. Ask a blunt question for every call found: Is this performing creative synthesis on behalf of an end-user, or is it parsing, routing, transforming, or validating data?
  3. Isolate parsing and business logic. If the model is extracting data, checking permissions, validating inputs, or calculating state transitions, flag it as technical debt. These belong in deterministic code.
  4. Inspect your integration tests. Run your CI suite ten times in parallel. If you see flaky tests caused by non-deterministic response assertions or timeout thresholds against inference endpoints, rip the network call out of the test harness.
  5. Enforce the synthesis-runtime boundary. Move model usage entirely to development time, migration scripts, or offline discovery pipelines. Keep the runtime artifact pure.

Software that works most of the time is easy to build. Software that never deviates from its specification requires deciding what you will not delegate. Model independence is not an aesthetic preference; it is the deliberate refusal to let statistical variance govern your production infrastructure.

Keep reading

Next in the log

The Strategic Master Library · written and reviewed under the house's own epistemic rules: nothing claimed that we cannot show.