Weekly design 13 · Evals & Governance

Every AI-assisted decision needs a receipt

Six months later, someone asks why the AI recommended that. The answer should take minutes, not a forensic project: one record per decision with the inputs, the evidence, the model and prompt versions and the person who decided, provably unaltered and still lawful to keep.

Status: a reference design, not deployed as described. It is written from public standards and platform documentation and describes no organisation’s systems, data or metrics; every example is generic. Every number is cited, derived from a formula on this page, or labelled as an assumption. Nothing here is legal advice. Try it: the interactive walkthrough follows one decision from capture to an audit months later.

1. Six months later, someone asks why

An employee asks for an exception to the travel policy. An assistant retrieves the policy, a model reads it under a prompt, and it recommends “approve with conditions”. A reviewer approves but drops one condition. Done in two minutes.

Six months later an auditor asks why. Most teams cannot answer. They have logs, but logs are written for operators: sampled, rotated, mutable, spread across services and full of personal data. They do not say who decided, what that person was shown, or which prompt and model version produced the recommendation. The policy has been edited twice since.

What the auditor needs is a receipt. One record per decision: what went in, what evidence was used, which versions ran, what the AI recommended and what the person did. Readable in minutes, provably unaltered, kept for as long as the rules require, and still lawful to hold when someone asks for their data to be erased.

Keep the receipt. Replay the evidence, not the model.

It matters now. The EU AI Act requires high-risk systems to allow automatic recording of events over their lifetime [1], and requires providers and deployers to keep those logs for at least six months unless other law says otherwise [2][3]. After the 2026 amendments, the Annex III high-risk obligations apply from 2 December 2027 [3], about a year away. The Act also gives an affected person the right to a clear and meaningful explanation of the system’s role in a decision [4], and GDPR already requires safeguards such as human intervention and the right to contest for solely automated decisions [5], plus meaningful information about the logic involved [6].

2. Why the obvious answers fail

“We log every prompt and response.” Telemetry is the wrong shape. The OpenTelemetry generative AI conventions, still marked Development, give useful identifiers (gen_ai.request.model, gen_ai.response.model, gen_ai.response.id, gen_ai.conversation.id), but make capturing the messages themselves opt-in because they are likely to hold sensitive data [7]. A trace describes a model call. A decision is several calls, a retrieval and a person. And traces expire on the observability platform’s schedule, not the regulator’s.

“We can just re-run it.” Not reliably. On the reference platform, the seed parameter is in preview and determinism is best effort; a changed system_fingerprint signals a backend change [11]. Models also retire: generally available models follow an 18-month lifecycle, and a retired model returns 410 Gone for every request [12]. The sources have moved on too.

“Put it on a blockchain.” Immutability is the point, but immutable personal data collides with the right to erasure [13]. Writing names, free text and retrieved passages into a store that can never change solves one problem by creating another.

“Ask the model to explain itself.” A self-reported rationale is more model output. Store it if you like; it is not evidence. The evidence is what the model was shown and what the person did.

3. The design

Thirteen components in four zones. One rule organises them: the ledger holds proofs; the vault holds content. The immutable layer stores structured fields, identifiers, versions and hashes. Anything that could be personal data, including free text and retrieved passages, goes to a vault that can be deleted.

The trust boundaries follow from that. The application may call the capture SDK but cannot write to the ledger; only the capture service holds the write role. The ledger is write-once for everyone, administrators included. Auditors get a time-boxed read role and never see vault keys.

AI decision records: a decision point calls retrieval, a prompt registry and a model gateway; a capture SDK assembles a record that a schema validates and redaction splits into a vault and an append-only ledger; a digest anchor seals it; a replay service and an auditor view read it months later
Capture at the decision point; proofs to the ledger, content to the vault; replay reconstructs. Open the interactive version for every node’s detail.
ZoneComponentWhat it does
DecisionDecision pointThe screen where a person decides with AI help. Commits only once the record is durable.
DecisionPrompt & policy registryVersions prompts and policies by SHA-256 content hash. The record names the hash, never “the current prompt”.
DecisionRetrievalReturns evidence with document ID, version and a hash of the exact text the model read.
DecisionModel gatewayCalls a pinned deployment; records model version, the reported response model, system_fingerprint, seed and parameters [11]. Refuses auto-upgrading deployments for record-required decisions [12].
DecisionReviewerThe person who decides: accept, change or override, with a reason code. Identity comes from the sign-in.
CaptureCapture SDKOpens a decision context, collects the spans inside it using the OpenTelemetry identifiers [7], and assembles one record per decision.
CaptureDecision-record schemaVersioned JSON schema shaped on W3C PROV: entities, activities and agents [14]. A record that fails validation blocks the commit.
CaptureRedaction & vaultMoves personal data and free text to a vault under per-subject keys; leaves salted hashes. Stores evidence snapshots once, by content hash.
LedgerAppend-only ledgerBlob versions under a locked, version-level retention policy: readable, not modifiable or deletable while it runs; extendable, never shortened [8]. Each record carries the previous record’s hash.
LedgerDigest anchorHourly Merkle root over the hour’s records, written to a confidential ledger that runs in hardware-backed enclaves and returns a receipt [9][15].
LedgerRetention & legal holdPer-class retention set by the people who own the obligation (floor: six months for high-risk logs [2][3]); legal hold for disputes [8].
AuditReplay serviceReconstruct (always), re-execute (while the pinned model is served, best effort), counterfactual (today’s model, never shown as what happened).
AuditAuditor view & exportRead-only by record, person, class or date. Exports the record, evidence, prompt text, inclusion proof, receipt and an offline verifier.

4. One decision, step by step

  1. A decision is assisted. The SDK opens a decision context. Retrieval returns four policy passages with hashes. The gateway calls the pinned deployment with prompt p-7f3a…. The model recommends “approve with conditions” and cites two passages.
  2. A person decides; the record is captured. The reviewer approves and removes one condition, reason code “cost within limit”. The schema validates the record. Redaction moves the name and free text to the vault. The record goes to the ledger with the previous record’s hash. Only then does the approval commit.
  3. The record is sealed. At the top of the hour the anchor builds the Merkle tree and writes its root to the confidential ledger. The receipt is kept with the tree.
  4. Months later, an auditor asks why. The auditor enters the record ID. The view checks the record’s hash, its inclusion proof and the root’s receipt. All pass: this is the record written at the time.
  5. The record replays with the same versions. Reconstruct shows the request, the four passages as the model read them, the prompt, the recommendation and the reviewer’s change. Re-execute finds the pinned version still served and the recommendation matches. Had it retired, the view would say so and offer reconstruct only.
  6. An erasure request arrives. The employee’s vault entries and key are deleted where the law allows. The record still verifies, because the ledger only held hashes. Reconstruct shows “redacted on request”.

5. Controls and failure modes

FailureDetectionFallback
Ledger write fails at decision timeNo durable acknowledgementSigned local outbox; commit once it is durable; drain in order. If both fail, the decision does not commit.
A decision bypasses the SDKDecisions in the system of record with no record IDPage; block the class until the path is instrumented
Schema validation failsSynchronousBlock the commit; show the reviewer what is missing
Personal data lands in a ledger fieldScan in redaction; nightly sample of ledger fieldsWORM means it cannot be deleted, so prevention lives in redaction. A leak is an incident and its rule gets a test.
Deployment auto-upgradesGateway checks the upgrade setting and compares requested and reported versions [12]Refuse the call for record-required classes
Pinned model retired before an audit410 Gone on re-execute [12]Reconstruct only, labelled; never substitute a model silently
Re-execute differs from the recordDiffExpected sometimes [11]; show both. The record is what happened.
Record or chain tampered withHash, chain and inclusion-proof checksAnchored roots and receipts prove the original [9][15]
Vault key lost (not by request)Key-store health; restore drillsRecords verify; content cannot be shown. Back up and drill vault keys separately.

6. Decisions and trade-offs

Capture the decision, not the model call. Auditors ask about decisions. One record per decision, referencing every call inside it.

Record before act. The commit waits for one durable write. That costs a dependency and a few milliseconds. It buys the property that matters: no decision without a record. The outbox stops the dependency becoming an outage.

Proofs in the ledger, content in the vault. Immutability and erasure stop fighting when the immutable layer holds nothing personal. The cost is a second store and a join on read. Whether deleting a vault entry and its key meets an erasure obligation in a given case is for the controller’s counsel; the design makes it possible, not automatic.

Blob WORM for bodies, a confidential ledger for digests. Bodies are many and large, so they go where retention and legal holds are native [8]. Digests are tiny, so they go to the most tamper-resistant store available [9]. A SQL ledger is a fair alternative when relational queries matter; its own documentation calls it tamper-evident rather than tamper-proof and says to keep its digests outside the database [10]. Either way, the anchor lives outside what it protects.

Reconstruct over re-run. Reconstruction is exact while the record is kept. Re-execution is best effort and ends when the model retires [11][12]. The auditor view leads with reconstruction and labels the rest.

Pinned versions, no auto-upgrade. That means a planned migration before every retirement, with at least 60 days’ notice for GA models on the reference platform [12]. It is the price of a record that names the version that actually ran.

7. Metrics and SLOs

SLOFormulaTarget (assumption)
Capture completenessdecisions with a valid record ÷ decisions committed100%; any miss pages
Time to answerp95 of (reconstruction rendered − record ID entered) in audit drills≤ 10 min
Integrityrecords failing hash, chain or proof checks ÷ records verified0
Anchor lagnow − time of last anchored root≤ 2 × H = 2 h
Leak rateledger fields flagged as personal data ÷ fields sampled0; any hit is an incident
Re-execution agreementre-runs matching the recorded recommendation ÷ re-runsTracked, not a pass mark [11]

Proof size. With D decisions a day and an anchor every H hours, each tree holds about N = D × H ÷ 24 records, and an inclusion proof needs at most ⌈log₂ N⌉ hashes [15]. With D = 10,000 (assumption) and H = 1, N ≈ 417 and the proof is 9 hashes, because 29 = 512 ≥ 417. At 32 bytes per SHA-256 hash, that is 288 bytes.

Storage. At an assumed 22 KB per decision (4 KB of record, six 2 KB evidence chunks, 6 KB of prompt and output), storage grows by D × 365 × 22 KB a year: 3,650,000 × 22 KB = 80.3 GB at D = 10,000. Evidence and prompts are content-addressed, so a repeated passage is stored once. Anchoring is one confidential-ledger write per hour, 24 a day, whatever D is. I do not quote prices; they depend on tier, region and redundancy.

8. Rollout

  1. Inventory decision points. Every screen where AI output can change an outcome, classified record-required or not.
  2. Shadow capture. SDK and schema on; records written, commits not blocked. Measure completeness.
  3. Close the gaps until one decision class holds 100% for two weeks.
  4. Record before act for that class. Lock the retention policy only now; unlocked policies are for testing [8].
  5. Audit drill. Twenty random records; someone outside the team answers “why” for each. Time it.
  6. Erasure drill. Delete a test subject’s vault entries; records still verify and show the redaction.
  7. Retirement drill. Migrate before the pinned model retires; old records still reconstruct.
  8. Widen one decision class at a time.

9. What it does not do

  • It does not explain model internals. It records what the model was shown, what it produced and what the person did.
  • It does not prove the reviewer read the evidence. It proves what they were shown and what they decided.
  • It does not guarantee re-execution. Determinism is best effort and models retire [11][12].
  • It does not set retention periods or decide which law applies. That belongs to the people who own the obligation. This is not legal advice.
  • It does not capture decisions made off instrumented paths. The completeness check finds them; it does not prevent them.
  • It does not stop copying. A person can still screenshot what they saw.
  • It is a reference design, not deployed as described. Volumes, sizes and targets are assumptions.

Closing

Every AI system logs. The question is whether, six months on, anyone can say what a decision rested on. Capture at the decision point, keep proofs where nothing can change them and content where it can be erased, anchor the proofs outside the store they protect, and replay the evidence rather than hoping the model behaves the same. Then “why did the AI recommend that?” has an answer in minutes.

Sources

  1. EU AI Act, Article 12: Record-keeping, AI Act Service Desk, European Commission
  2. EU AI Act, Article 19: Automatically generated logs, AI Act Service Desk, European Commission
  3. EU AI Act, Article 26: Obligations of deployers of high-risk AI systems, with application dates after the 2026 amendments
  4. EU AI Act, Article 86: Right to explanation of individual decision-making
  5. GDPR, Article 22: Automated individual decision-making, including profiling
  6. GDPR, Article 15: Right of access by the data subject
  7. Semantic conventions for generative AI, OpenTelemetry
  8. Store business-critical blob data with immutable storage, Microsoft Learn (updated 25 Aug 2026)
  9. Azure confidential ledger overview, Microsoft Learn (updated 24 Nov 2026)
  10. Ledger overview, Microsoft Learn (updated 7 Aug 2025)
  11. Learn how to use reproducible output (preview), Microsoft Learn (updated 27 Feb 2026)
  12. Model deprecations and retirements, Microsoft Learn
  13. GDPR, Article 17: Right to erasure
  14. PROV-O: The PROV Ontology, W3C Recommendation, 2013
  15. RFC 9162: Certificate Transparency Version 2.0, IETF, 2021