Where Does an On-Device Prescription Reader Lose Medications? A Frozen-Replay Study, from a 270M Language Model to a 2B Vision-Language Model
Ilan Sezhiyan Jayaraman
Key points
From the paper's conclusion- We trace much of the handwriting floor to a defect in our own crop step, then replace the pipeline: rotated-box crops, a 2B-parameter vision-language model that re-reads prescription lines and extracts the medications, and per-line numeric grounding.
Abstract
On-device models let a phone read a prescription without sending the photograph anywhere, but small models fail in ways that are hard to attribute: to the camera, the OCR, the model, or the rules around it. We study a phone-based pipeline that reads a prescription photograph with PaddleOCR, extracts medications with a 270M-parameter language model, and filters the result with a deterministic backstop before showing suggestions. Replaying identical frozen inputs through each configuration, with deterministic generation verified, we compare configurations with paired document-level intervals on 49 captures of 15 synthetic prescriptions (6 typed, 9 handwritten by one writer). Production recall is 8%, and 0 of 45 on handwriting. The backstop removes no correct medication and cuts unsafe outputs from 45 to 1. On handwriting nearly all medications never reach the model in readable form; on typed sheets the model mostly picks the wrong text. We trace much of the handwriting floor to a defect in our own crop step, then replace the pipeline: rotated-box crops, a 2B-parameter vision-language model that re-reads prescription lines and extracts the medications, and per-line numeric grounding. On the same captures recall rises from 8% to 67% (paired +59 points, 95% CI +40 to +78): typed 19% to 100%, handwritten 0 to 20 of 45, with no unsafe output. Rotated crops account for most of the reading gain and the model for most of the recall gain, and the OCR confidence gate is now the main limit. The cost is 61 s per photograph against about 12 s, and about 1.9 GB of memory. An earlier claim that better OCR lowered recall does not survive the controlled comparison, and we withdraw it. All results are in-sample, from one writer and one device.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- A hybrid deep learning-based OCR model for handwritten medical prescriptions.Frontiers in medicine · 2026
- An intelligent OCR-LLM prescription review system for inpatient narcotic and psychotropic drugs: Development and retrospective validation.Medicine · 2026
- Escriba-OCR: A 1B Vision-Language Model for Error-Preserving Transcription of Handwritten Portuguese EssaysarXiv · 2026
- Automating data extraction from discharge reports via multimodal LLMs in the REBOOT trialEuropean Heart Journal · 2026
- CNS-Obsidian: A Neurosurgical Vision-Language Model Built From Scientific PublicationsNeurosurgery · 2026
- A hybrid framework for pill identification using convolutional neural networks and optical character recognitionDiscover Artificial Intelligence · 2026