What Limits On-Device Prescription Reading? A Frozen-Replay Study with a 270M-Parameter Language Model
On-device language models let a phone read a prescription without sending the photograph anywhere, but small modelsfail in ways that are hard to attribute: to the camera, the OCR, the model, or the rules around it. We study a phone-basedpipeline that reads a prescription photograph with PaddleOCR, extracts medications with a 270M-parameter languagemodel, and filters the result with a deterministic backstop before showing suggestions. Replaying identical frozeninputs through each configuration, with deterministic generation verified, we compare configurations with paireddocument-level intervals on 49 captures of 15 synthetic prescriptions (6 typed, 9 handwritten by one writer). Productionrecall is 8%, and 0 of 45 on handwriting. The backstop removes no correct medication and cuts unsafe outputs from 45to 1. On handwriting nearly all medications never reach the model in readable form; on typed sheets the model mostlypicks the wrong text. A prompt scoped to prescription lines (+12 points), switching off a repetition penalty (+9) and alarger model (+29, at 3.4 times the latency) raise recall on typed text only, and numeric grounding causes most dosingerrors. An earlier claim that better OCR lowered recall does not survive the controlled comparison, and we withdraw it.An exploratory analysis traces much of the handwriting floor to a defect in our own crop step. All results are in-sample,from one writer and one device.
Authors
- Ilan Sezhiyan Jayaraman (ORCID: https://orcid.org/0009-0005-6311-3402)
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2026-10-30
- DOI
- https://doi.org/10.5281/zenodo.23795679
- Primary Topic
- Handwritten Text Recognition Techniques
- Type
- preprint