Blog
Saved0

Deterministic vs probabilistic AI steps: combining rules and models safely

Same contract, same supplier, new model: last year's regulated processor became this year's standard subscription, and skipped privacy review. How to combine rules, models and human judgment so a prediction never quietly becomes a fact.

LinkedIn
On this page
  1. The contract didn't change. The decision did.
  2. Is "is the model deterministic?" the right question?
  3. The business still owes deterministic obligations
  4. Where does uncertainty get lost?
  5. Three kinds of step
  6. Wrap every model in deterministic checks
  7. What should a model's output contract carry?
  8. Confidence isn't a control
  9. Let the system abstain
  10. Test behavior, not just answers
  11. Common anti-patterns
  12. Ten rules for combining deterministic and probabilistic steps
  13. The result: deterministic responsibility, not deterministic AI
  14. Frequently asked questions
  15. How Frozion combines rules, models and people in one workflow
  16. Sources
The short answer

Combine rules and models by treating every model output as a proposal, not a fact. Wrap it in deterministic checks: eligibility, typed contracts, domain validation, calibrated thresholds, policy and human judgment where needed. Let the system abstain. Version the model, prompt, context and threshold together, because a model change is an application change.

The contract didn't change. The decision did.

A global enterprise uses an AI-assisted procurement workflow to renew software and data-service agreements. At onboarding, it analyzed a signed vendor contract, a data-processing addendum and a security annex. A model classified the vendor as a regulated data processor, which triggered privacy and security review before the purchase order.

Twelve months later, the same signed agreement came up for renewal. Same supplier, same text, same purpose, same service. The workflow now called a newer model and context release. This time it classified the vendor as a standard software subscription, and the renewal went down the automated path.

Both answers were valid JSON. Both used an allowed category. Both scored above the generic confidence threshold. Neither call failed, and the policy code downstream did exactly what it was written to do. Privacy later found the service still processed regulated customer identifiers.

The incident review blamed model nondeterminism first. That was only part of it. The real failure was that a learned classification became a business fact without keeping what made it uncertain: the evidence behind it, the context it saw, how its score was calibrated, and what had to be checked before it could steer an irreversible path.

Is "is the model deterministic?" the right question?

No. Repeatability, correctness and permission to act are three separate questions. A repeatable answer can be wrong, a correct answer can be unauthorized, and only the third question decides whether anything happens.

A model can be computationally deterministic with fixed inputs, artifacts, hardware, seeds and settings. It's still probabilistic in the sense that matters: its output is a learned estimate, and its correctness is established by testing, not guaranteed by the code. ML frameworks say so directly: deterministic modes need fixed environments, often cost performance, and can still differ across releases or hardware.

The reverse holds too. A rule engine can give the same answer every time while applying a stale policy, the wrong currency or the wrong legal-entity mapping. Repeatability is valuable. It isn't validity.

QuestionWhat it meansWhy it's separate
Will it repeat?Same versioned inputs, artifacts and state give the same outputA repeatable output can be consistently wrong, stale or out of scope
Is it valid?Correct enough for this task, population and contextA valid result may not be exactly reproducible, and validity shifts by segment and over time
May it drive action?Authority, policy, evidence and consequence allow itA correct result can still be unauthorized or unsafe to commit

The business still owes deterministic obligations

A model can interpret a contract, rank evidence, extract fields, classify intent or draft a proposal. The application around it still owes obligations that plausibility can't satisfy. A payment must meet currency, balance, limit and reconciliation rules. An authorization must name the right person, tenant, resource, purpose and policy version. A state change must go from a valid state to an allowed next one. A tax or pricing rule must apply exactly once its facts are known. An external change needs a stable operation ID and proof of what happened. An approval must bind to the exact proposal that will run.

That doesn't mean every business decision is objective. Plenty need judgment. The narrower requirement is that uncertainty stays visible until a governed checkpoint decides what the system may do. The model supplies judgment; it can't quietly redefine the obligation.

Where does uncertainty get lost?

At the interface. The model returns a clean category, a schema confirms it's an allowed value, and the next step branches as if it were a verified fact. By the time policy code runs, the uncertainty is gone.

Structural validation is necessary. It can't establish factual correctness, policy applicability, source eligibility, calibration or authority. A schema-valid payload can be confidently wrong. So status has to travel with the value: proposed, structurally valid, domain-validated, independently verified, policy-eligible, approved, committed. Collapsing those into one field is how probability turns into false certainty. Typed contracts for AI workflows covers how to carry that status between steps.

Three kinds of step

Describe each step by the contract it offers, not the technology behind it.

Kind of stepContractExamplesHow you test it
DeterministicSame versioned inputs and state give the same defined result or errorCalculation, policy check, schema validation, query, mapping, state changeExact assertions, invariants, property and boundary tests
ProbabilisticProduces an estimate, ranking, extraction or draft whose validity is empiricalClassification, extraction, ranking, summarization, recommendationEvaluation sets, calibration, segment metrics, stress tests
JudgmentAn accountable person decides on a version-bound proposal and evidenceApproval, exception review, adjudication, expert checkAuthority, evidence completeness, proposal binding, consistency

These aren't permanent labels for technologies. A hand-coded classifier with an exact contract is deterministic. A model endpoint with deterministic serving is still probabilistic in validity. A person following a checklist still exercises judgment on an ambiguous case. The point is to stop a probabilistic step passing as deterministic just because both return JSON.

Wrap every model in deterministic checks

The envelope doesn't make the model correct. It limits when uncertainty can become action:

  1. Eligibility: may this person, tenant and purpose run this step on this resource?
  2. Context: select required sources under permission and freshness rules, and record where they came from.
  3. Proposal: the model returns a typed proposal, not an unqualified fact.
  4. Validation: check shape and type, then domain rules, references, units and allowed values.
  5. Thresholds: is the result inside the range where automation was validated?
  6. Policy and people: resolve obligations that can't be met automatically.
  7. Point of change: enforce authority, operation ID, retry rules and evidence.

Scale it to consequence. A low-risk text suggestion may need little beyond a label and an edit option. A classification that changes a payment, entitlement or regulated workflow needs much more. Deciding which cases a rule can settle before a model is called at all is its own design choice, covered in deterministic-first routing.

A probabilistic model step surrounded by a ring of deterministic checks: eligibility, context rules, typed output, validation, thresholds, policy and human review, and controls at the point of change
The model sits inside exact checks. They don't make it right; they decide when its output may become action.

What should a model's output contract carry?

Enough for the next step to know what's claimed and how sure it is: the value and task, its status, alternatives, the basis for any confidence, the calibration profile, evidence, versions, scope and abstain reason, and remaining obligations.

ElementPurposeWhat goes wrong without it
Value and task typeWhat the model is assertingUnlike outputs treated as equivalent facts
StatusProposed, validated, approved, committedA valid proposal treated as a decision
AlternativesPlausible competing answersThe top answer hides ambiguity that should trigger review
Confidence basisProbability, margin, agreement, verifier, or noneA decorative number read as calibrated correctness
Calibration profileDataset, segment, metric and threshold usedOne global threshold reused everywhere
EvidenceSource passages behind the resultNobody can verify or explain it
VersionsModel, prompt, context and toolsA provider or context change silently shifts behavior
Scope and abstentionWhether the input was in range, and why it declinedThe model is forced to answer outside its tested coverage
ObligationsValidation, policy, approval still requiredThe value arrives, the conditions don't

Not every task has a defensible confidence value. A contract that says "no calibrated probability available" is more trustworthy than invented precision.

Confidence isn't a control

A score is useful only once its meaning is tested. Neural networks can be accurate and still poorly calibrated: their confidence doesn't match how often they're right. A model saying "94 percent confident" isn't a probability. A token likelihood isn't a business-risk measure. Two models agreeing aren't necessarily independent. A verifier isn't right just because it's separate.

Thresholds belong to a decision policy, not to the model. They depend on the task, class, segment, consequence, the cost of a false yes and a false no, review capacity and the quality of the evaluation behind them. Version the calibration profile with the threshold. When the model, prompt, context or data shifts, the threshold may stop meaning what it meant.

Let the system abstain

Many designs assume every request must get an answer. That turns uncertainty into forced automation. Research on selective prediction formalizes the alternative: trade coverage for lower risk by declining cases the system can't handle reliably. The question becomes which share of the work it can cover at the required risk.

Abstaining isn't a failure. It's a valid outcome with routes: apply a rule or lookup, fetch required evidence under the same permissions, call a stronger model allowed by cost and residency, run an independent check, send the exact proposal and evidence to an authorized person, or stop and record why. Choose the least costly path that meets the risk, evidence and authority needs of this decision.

Test behavior, not just answers

Unit tests still matter, but they can't fully specify a probabilistic step. NIST's AI Risk Management Framework stresses testing, evaluation, verification and validation in the context of use.

LayerWhat to testQuestion
Deterministic stepsExact outputs, invariants, errors, authorization, state changesDoes it meet its contract in every defined case?
Probabilistic stepsTask metrics, calibration, coverage, segments, out-of-scope inputs, robustnessDoes it meet the risk profile in this context?
BoundariesSchema, status, units, IDs, evidence, versionsCan uncertainty cross without being misrepresented?
End to endOutcomes, policy gates, review, resume, retries, side effectsDo acceptable parts add up to an acceptable result?
ProductionDrift, overrides, abstentions, false accepts and rejects, costIs live behavior still inside what was approved?

And a model change is an application change. Prompts, retrieval rules, context order, features, calibration, thresholds, routing, regions and post-processing all shift which cases get automated, escalated or committed. Publish them together as one release, and compare a proposed release against recorded cases before it goes live.

Common anti-patterns

Anti-patternWhy it failsWhat to do instead
Treat schema-valid output as factShape says nothing about truth or authorityKeep it a proposal until validated
One global confidence thresholdMeaning varies by task, segment and consequenceCalibrate and set thresholds per decision
Read a model's stated confidence as probabilitySelf-reported confidence isn't calibratedUse a tested basis, or say none exists
Force an answer on every caseOut-of-coverage inputs get automatedAllow abstention with defined routes
Equate temperature zero with correctnessRepeatable isn't validTest validity separately from reproducibility
Swap models as infrastructureThe decision surface changes unseenVersion model, prompt, context and threshold together
Put obligations in the promptPrompts don't enforce limitsEnforce rules, policy and approvals outside the model

Ten rules for combining deterministic and probabilistic steps

  1. Mark each step as deterministic, probabilistic or judgment.
  2. Treat model output as a proposal unless the contract says otherwise.
  3. Carry alternatives, evidence, scope and confidence basis through typed contracts.
  4. Enforce authority, policy, invariants and approvals outside the prompt.
  5. Validate in layers: structure, domain, facts, policy, approval.
  6. Calibrate before you set a threshold, and set it per decision.
  7. Design safe abstain and escalation paths.
  8. Release model, prompt, context, calibration, threshold and policy together.
  9. Test exactly where you can, statistically and by segment where you can't.
  10. Record what the system knew, proposed, checked, escalated and did.

The result: deterministic responsibility, not deterministic AI

Back in the procurement case, the model's category should never have been the final word. The contract and annexes enter under explicit source rules. The model returns a proposed classification with passages, alternatives and a versioned confidence basis. Domain checks confirm the supplier and service scope. A deterministic policy asks whether the evidence is enough for auto-renewal, and any doubt about regulated data sends it to privacy review whatever the top category says.

None of that guarantees the model is never wrong. It stops the system from hiding uncertainty and acting as if no judgment took place. Probabilistic capability isn't a defect to engineer out; it's why the application can read language and spot patterns at all. The architecture's job is to keep uncertainty visible until enough evidence, validation, authority and policy exist to turn a proposal into action.


Frequently asked questions

What is the difference between deterministic and probabilistic steps in an AI system?

A deterministic step has an exact contract: the same versioned inputs give the same defined result or error, tested with exact assertions. A probabilistic step produces an estimate whose correctness is empirical and context-dependent, tested with datasets, calibration and segment metrics.

Is a model with temperature zero deterministic?

It may repeat its answer, but repeating isn't the same as being right. The output is still a learned estimate, and providers, hardware and releases can change it. Treat it as a proposal that must be validated, whatever the sampling settings.

Can a confidence score decide when an AI output is automated?

Only after calibration. A raw score or a model saying it's 94% sure isn't a tested probability. Set thresholds per task, segment and consequence, version the evaluation behind them, and route anything below the threshold to rules, more evidence or a person.

How does this work for agents we already run?

Route the agent's tool calls through a governed runtime over MCP or HTTPS. Known facts and rules settle what they can, the model's output arrives as a proposal, and policy and human review decide before anything consequential changes.

With Frozion

How Frozion combines rules, models and people in one workflow

Model Routing settles what it can with known facts and calls a model only for what's left, routing by policy. Policy is enforced before and after every step, and policies decide with history from the Feature Store. The HITL Inbox sends only rule-selected decisions to a person, with the whole case, and binds approval to the exact revision reviewed. Model and prompt changes go through version compare and batch simulation on recorded cases before approval to publish, and every decision lands in one tamper-evident record.


Sources

  1. NIST AI Risk Management FrameworkTest, evaluation, verification and validation in the context of use.
  2. NIST AI 600-1, Generative AI ProfileLifecycle risk management for generative AI systems.
  3. PyTorch, Reproducibility notesDeterminism needs fixed seeds, environments and algorithms, and may still differ across releases.
  4. Guo et al., On Calibration of Modern Neural Networks (2017)Accurate networks can still be poorly calibrated.
  5. Geifman and El-Yaniv, SelectiveNet (2019)Abstention as part of the model, trading coverage for risk.
  6. JSON Schema Draft 2020-12Structural validation, distinct from correctness or authority.
More in Work that finishes

Work that finishes

Retries & side effects 2
Durable & event-driven 1
Contracts & routing 3
APIs & integration 1

Other topics

Pick up where you left off: