WRITE · TRACE · UNDERSTAND
Verify citation spans against versioned source digests
Sources have unique id,tenant,version,text,sha256 (UTF-8 digest).
Read lesson: Verify citation spans against versioned source digests →
Your experiment
Sources have unique id,tenant,version,text,sha256 (UTF-8 digest). Each claim has text and citations containing source,start,end,quote. For each claim return ok and sorted unique errors. No citations gives missing. For each citation check known ID, exact tenant/version, recomputed source digest, integer code-point range 0<=start<end<=len(text), and exact quoted substring, in that order. Errors are id:unknown,scope,digest,range,quote. Duplicate source IDs raise ValueError. This validates provenance structure and literal spans, never semantic entailment.
Python runs in your browser. Your draft stays on this device.
What to look for
Review source approval, version changes, Unicode offset conventions and claim support. Literal span matching is not an answer-faithfulness classifier.
Watch your code work
Ready to experimentWrite a solution or load the worked answer, then choose Trace & check.
Step through arrays, variables and training curves produced by your own Python.
