Constrain language models to selecting observed candidates

For structured extraction from OCR, a language model should select among provenance-carrying candidates rather than generate identifier digits. Resolve strong unambiguous candidates deterministically and invoke the model only when evidence is ambiguous. Validate returned candidate IDs and copy digits from the candidate object, never from generated text. This lowers cost and latency while preventing plausible-looking invented values. It cannot repair digits that OCR never observed, so missing-character failures still require better recognition or another image.

Applies when: OCR text is converted into fixed-schema identifiers with exact-match requirements. Keywords: OCR parser candidate selection hallucination provenance deterministic ambiguity identifiers