WRITE · TRACE · UNDERSTAND
Reject citations outside the supplied evidence set
Implement citation_errors(claims,allowed).
Read lesson: Reject citations outside the supplied evidence set →
Your experiment
Implement citation_errors(claims,allowed). Each claim has text and citations list. Return ordered strings "i:missing" if no citations and "i:unknown:key" for each distinct unknown id in that claim, preserving first occurrence. Empty claims return [].
Python runs in your browser. Your draft stays on this device.
What to look for
Identifier validation proves only that a reference belongs to the supplied set. Faithfulness needs a separate check against the referenced content, and uncertain claims should remain qualified rather than acquiring false certainty from a valid citation id.
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.
