Proving one AI decision without handing over the whole log
The problem with sending the whole run
When a customer disputes a decision, say a declined loan or a refused refund, you need to show what the system decided and on what basis. Sending the entire run exposes every other step, often other customers' data and internal prompts. Sending only the one step proves nothing, because nothing ties it to the rest.
What a receipt contains
| Part | What it proves |
|---|---|
| The event | What was decided, with hashes of its inputs and outputs |
| The Merkle path | This event is one of the leaves under the run's Merkle root, at this position |
| The capsule | The run's sealed root, event count and identity |
| The log inclusion proof | This run was appended to the public transparency log |
How it is checked
- Recompute the event's leaf hash from its fields. A changed field fails here.
- Walk the Merkle path up to the capsule's root. An event from elsewhere fails here.
- Check the claimed position against the event's sequence number and the run's size.
- If the disputing party holds the inputs or outputs, hash them and compare.
- Pin the receipt to something the checker already trusts: the run's capsule hash, given to them at the time, or a published log root.
Why pinning is the step that matters
A receipt invented from nothing is internally consistent too: anyone can build an event, a tree and a capsule that agree with each other. The receipt only proves something when it is anchored to a value the checker obtained independently. That is why the verifier reports an unpinned receipt as unverified, even when every other check passes.
from mershtrust import verify_receipt
result = verify_receipt(receipt, log_root=published_root)
for check in result.checks:
print(check.name, check.passed)The same check exists in the TypeScript verifier, with the same check names, so a receipt can be verified in a browser.
Questions
- What is a Merkle proof?
- A short list of sibling hashes that lets you recompute a tree's root from one leaf. If the result equals the published root, the leaf is in the tree.
- Does a receipt reveal the rest of the run?
- No. It reveals one event plus hashes of its siblings in the tree, which say nothing about their content.
- Why does a receipt need a published root?
- Because a self consistent receipt can be fabricated. Checking it against a root the checker already holds is what makes it evidence.