Press ▶ to send a document through the system, stage by stage.
Left to right: what every rule reads (the OCR lines and the number and date settings), the conditions some rules have, the rules for each field in the order they are tried (top first: a rule above wins over the ones below), the fields they fill, and the checks that decide whether a document goes straight through. Line width: how often a rule's value was used; green, yellow, red: right, mixed, mostly wrong. Purple dashed: rules that only run on one document type, so a wrong type takes them all down. Yellow dotted: rules computed from other fields. Hover anything to follow its connections; click a rule to jump to its card.
Rows are rules, columns are documents (seen on the left, unseen on the right). Green: the rule's value was used and was right. Red: used and wrong. Grey: it fired but a higher-priority rule won. Hover a cell for details.
Every time a rule was added, documents that were right before and wrong after. On the seen set these were noticed and patched; on the unseen set nobody was looking.
Both are TrOCR-small, the same 61.6 million weights in the same architecture. Out of the box is Microsoft's pretrained model (stage 1: synthetic printed text lines). Fine-tuned is the same model trained further on SROIE, a set of scanned shop receipts (microsoft/trocr-small-printed, the most used of the small printed TrOCR models on Hugging Face). The pages, the line boxes and the rules are identical; only the OCR changes.
Every version was written against the out-of-the-box model's mistakes. Patches for one engine's typos do nothing, or harm, when the engine changes.