Run 001first execution
determinism envelope
- capability
- finance.npv
- runtime_bundle
- 0.1.0 · 4d64142e…
- platform
- darwin-arm64
- precision_mode
- float64
- thread_count
- 1
- value
- 505.020148896933
computation_hashb74f67d0d7a594aa…
Determinism, by construction
Ask a model the same question twice and you can get two answers. That is non-deterministic AI — fine for prose, fatal for numbers. SQAI takes the number away from the model: every computation runs on a pinned float64 runtime, single-threaded, and prints the hash that replays it exactly.
IIThe replay
One computation — finance.npv at a 10% discount rate over five cash flows — executed once, then replayed months later. Determinism as a promise would ask for your trust. As a hash, it asks for a comparison.
Run 001first execution
determinism envelope
computation_hashb74f67d0d7a594aa…
Run 002months later
determinism envelope
computation_hashb74f67d0d7a594aa…
Identical. Not similar — identical.
shared computation_hashb74f67d0d7a594aa7ac91f6291612452aa8ccdf603351ebc8d801a6fddd91bc8
Two languages, one byte stream
TypeScriptcanonicalJson(result.value)
Pythoncanonical_json(result.value)
identical bytes, either language505.020148896933
same bytes in → same sha256 out → the same certificate
canonicalJson in TypeScript and canonical_json in Python emit the same bytes by construction: −0 becomes 0, keys sort, unicode escaping is fixed. Hash equality across languages is not a coincidence to hope for — it is a serialization contract.
IIIThe fine print
“Deterministic” is easy to print and hard to honor. SQAI does not claim your result is identical across every machine in the universe. It declares an execution scope, records that scope in the envelope, and guarantees identity within it.
Recording the environment beats overclaiming it. Anything that could change the number is either pinned or written down.
declared on every resultdeterministic_scope: "local_registered_source"
IVDomain-separated provenance
Provenance here is not a log line. It is three sha256 constructions, each answering a different question, each computed over canonical bytes.
plan_hashf87610d8afeb…The resolved plan, hashed before anything executes. The same question resolves to the same plan — decision_path: exact_spec — so a plan reviewed once is reviewed forever.
invocation_hashThe identity of the call — the capability plus its canonicalized arguments — behind its own version-tagged prefix. explainQuery prints this as a dry-run preview; the executed hash is stamped independently at run time.
computation_hashb74f67d0d7a594aa…Folds in the invocation_hash before the canonical bytes of the value. The answer is cryptographically chained to its question — this hash cannot be stapled onto a different result.
invocation_hash = sha256("sqai:invocation:v1\0" + canonicalJson(identity))
computation_hash = sha256("sqai:computation:v1\0" + invocation_hash + canonicalJson(value))The prefixes are the point. "sqai:invocation:v1" and "sqai:computation:v1" are disjoint universes of bytes: an invocation can never collide with a computation, and a future v2 can never impersonate v1. Domain separation makes the hashes evidence, not decoration.
Beneath all three, the surface itself is pinned. The capability contract that defines what can run at all ships with a hash of its own:contract_hash sha256:79f1c5a6c716…
sampling is not execution — the model never computes here
VSampling vs execution
temperature: 0a decoding setting
computation_hashan execution property
VIWhere determinism could break
seed_required
Ten of the 4,574 exposed capabilities simulate randomness. Unseeded, they do not run at all — the call is rejected before execution. Seeded, they replay like everything else. No hidden entropy, no quiet exceptions.
one of the tendistributions.sample_normal
schema_revision_mismatch
Every registered source carries a schema revision. Replay a plan against data that has changed and the engine refuses with a structured error — not a silently different number that nothing would ever flag.
declared on every sourceschema_revision
4,564 deterministic as-is · 10 deterministic once seeded · 0 that guess
VIIQuestions
A system whose answers reproduce exactly: same input, same output, provably. SQAI implements it by construction — computations execute on a pinned float64 runtime, single-threaded, and every result carries a computation_hash that replays it byte-identically.
A system whose output can vary across identical requests. Language models sample tokens, so the same question can produce different reasoning, different SQL, and different numbers — with no signal that anything changed. A replayable hash is the antidote to that drift.
Temperature only narrows how the next token is chosen. The model is still predicting your number rather than computing it, and nothing about the run is recorded or replayable. SQAI's determinism is a property of execution, not decoding: the model files a typed plan and the engine does the arithmetic.
Compare the computation_hash on each result. It is a domain-separated sha256 over the invocation identity and the canonical bytes of the value, so matching hashes mean byte-identical answers — the finance.npv example prints b74f67d0… in both TypeScript and Python.
By refusing to be random in secret. Exactly 10 of SQAI's 4,574 exposed capabilities simulate randomness; called without a seed they are rejected with seed_required, and with a seed they replay exactly like every other capability.
The replay fails loudly. Every registered source carries a schema revision, and a plan replayed against changed data returns schema_revision_mismatch — a structured error, never a silently different number.