Loading page...Загружаем страницу...正在加载页面...
AtlasRepo

I poisoned 20 drug names to find out whether a local model belongs in a pharmacy

Description and use

The workflow reads handwritten prescriptions, interprets drug names with a local gemma3:4b model, applies deterministic safety checks, and flags uncertain lines for human review, improving accuracy and reducing manual effort in a pharmacy.

Problem

A neighbourhood medical shop in India needs a reliable way to read handwritten prescriptions and decide which lines can be filled automatically and which require human review, without relying on network connectivity.

Outcome

The system processes a prescription in ~58 s on an eight‑core laptop, flags all lines for review due to low confidence, and demonstrates that a local LLM can correctly interpret drug names when combined with deterministic safety checks.

Workflow

  • Photograph handwritten prescription
  • Run macOS Vision OCR to extract text
  • Send extracted text to local gemma3:4b model via Ollama for drug name interpretation
  • Apply deterministic gate checks (safety, grounding, vocabulary)
  • Flag lines below confidence threshold or failing checks for human review
  • Human reviews flagged lines and completes dispensing

Evidence

The whole pipeline runs from one command on the shop's machine: python3 scripts/run_page.py prescription.jpg

Source

The OCR reads. The model understands. The gate decides. Only one of those three is allowed to be wrong quietly, and it is not the model.

Source

  • Record date: 2026-10-17T05:41:25.524Z