How to read a receipt.
Every answer that goes through Aspected comes with a receipt: which documents the model was given, which it was not, and why. This page explains every line, how receipts are kept, and how to check them in your own tools, without Aspected.
The receipt records the retrieval step, which is part of how the AI system works: what went into the answer. It does not prove the answer is true. A wrong answer with a receipt points at the document to fix.
The slip, line by line
(erased); department and clearance stay.scale adj. add up to Aspected's own distance./r/<id> prints the stored receipt again, exactly as it was.Incidents and overrides
A receipt never changes after it is printed. When something about an answer needs recording, it is added after it, in the same chain:
- Incident (stamp INCIDENT): someone reports that an answer should not have happened, for example a Restricted document reaching someone without clearance. It goes to the review queue in the control room and can be exported with its chain proof for the case file. EU AI Act Art. 26(5).
- Override (stamp CORRECTED): the person overseeing the AI marks the answer wrong and names the document it should have been built on, optionally with the corrected answer. It shows wherever the answer appears. Art. 14(4).
Keeping receipts
- The journal keeps every receipt, newest first, searchable by question, receipt id, person or department.
- Retention is set in months (Settings). Receipts older than that are deleted from the start of the chain; an anchor keeps the hash of the last deleted one, so the rest still verifies. The EU AI Act asks deployers to keep logs at least six months (Art. 19, 26(6)), unless other law, such as data protection, sets another period.
- Exports: one receipt as JSON (
/api/receipt/<id>/export); the whole journal as JSON Lines (/api/journal.jsonl), oldest first, with the chain's anchor and head on the last line; the audit pack as CSV (one row per document per receipt); an incident or override with its chain proof (/api/event/<id>/export).
Reading the JSON
Each line of the journal export is one record. The fields an auditor needs:
AR-… with kind answer, or EV-… with kind incident or override (then receipt names the answer it is about). Time with its UTC offset.external).not_used, lost_on with the aspect and reason.policy on each line.Verifying the chain, without Aspected
Each record's hash is SHA-256 over the record without its hash, written as JSON with sorted keys and compact separators. The asker's name sits outside the hash, behind a salted commitment (user.name_commit), so a name can be erased without breaking the chain; while the name is there, it must match the commitment. This script checks a journal export:
import hashlib, json, sys
def body(rec):
b = {k: v for k, v in rec.items() if k != "hash"}
if "name_commit" in (rec.get("user") or {}):
b.pop("asked_by", None); b.pop("erased", None)
b["user"] = {k: v for k, v in rec["user"].items() if k not in ("name", "salt")}
return json.dumps(b, sort_keys=True, ensure_ascii=False, separators=(",", ":")).encode()
lines = [json.loads(l) for l in open(sys.argv[1], encoding="utf-8")]
records, chain = lines[:-1], lines[-1]["chain"]
prev = chain["anchor"]
for r in records:
assert r["prev"] == prev, f"the chain breaks before {r['id']}"
assert hashlib.sha256(body(r)).hexdigest() == r["hash"], f"{r['id']} was changed"
u = r.get("user") or {}
if u.get("salt"):
assert hashlib.sha256((u["salt"] + "|" + u["name"]).encode()).hexdigest() == u["name_commit"], f"name changed in {r['id']}"
prev = r["hash"]
assert prev == chain["head"], "records are missing at the end"
print(f"{len(records)} records verified, head {prev[:16]}")
Run it as python verify.py aspected-journal.jsonl. A changed, removed or reordered record stops it at that record.
What a receipt does not say
- Whether the answer is true. It shows what the model was given and why; the model can still misread it.
- Anything about answers that did not go through Aspected. A read-only receipt shows what another assistant cited, but Aspected cannot hold anything back there.
- Which document is right when the labels are wrong. If two versions both say "published", only the date tells them apart; the control room lists such cases to fix.
References to the EU AI Act are indicative and describe what the receipt contributes to a deployer's or provider's own obligations. Check them against the legal text and with your counsel.