OCR vs LLM: why document validation needs deterministic rules
What OCR does, what an LLM does, why a model's self-reported confidence is not a probability, and how to chain both with deterministic validators in a cascade.
- OCR
- LLM
- AI
- validators
- architecture
- How to validate a bank transfer receiptWhich fields to check on a transfer receipt, how to validate an IBAN with mod 97, how to match it to a registration and why a PDF does not prove payment.IBANbank transferpayment receipt
- ICAO 9303 MRZ: how to validate ID cards and passportsTD1, TD2 and TD3 formats, 7-3-1 weighted modulo 10 check digits, a worked example with the official ICAO specimen and JavaScript code to validate an MRZ.MRZICAO 9303passport
- Health data in sports registrations: GDPR Article 9What the GDPR says about medical certificates in race sign-ups, the Spanish DPA fine over COVID certificates, and what organisers should really ask for.GDPRhealth datadata protection
- LOPIVI: the sexual offences certificate in Spanish clubsWho must provide Spain's negative certificate from the Central Sex Offender Registry, how it is obtained, how the CSV code is checked and what can be automated.LOPIVIchild protectioncertificates
- Medical certificates for trail, ultra and triathlonReal validity periods, what a sports medical certificate must include, and how to check it is valid for race day without storing health data you don't need.medical certificatetrail runningtriathlon
- ID card copies and the Spanish DPA: verify without keepingWhat Spain's data protection authority says about collecting ID card copies (PS-00138-2025), what it means for sports clubs, and how to verify without storing.GDPRAEPDID card
- Spanish DNI and NIE check letter: algorithm and codeHow the check letter of the Spanish DNI and NIE is computed (modulo 23), with JavaScript, PHP and Python code, edge cases and why a valid letter proves nothing.DNINIENIF