Pfizer
Document intelligence for pharmaceutical supply chains
An OCR, retrieval, and classification pipeline for pharmaceutical vendor files, benchmarked across OCR engines, LLMs, and chunking strategies, with a public continuation on real recall notices.
AI Engineer Apprentice
Jun. to Sep. 2026, public continuation 2026
Python, Docker, Tesseract, PaddleOCR, Mistral, Phi-2, TypeScript, SQL
The project
Pharmaceutical supply chains run on vendor paperwork, scanned files whose fields must be read, checked, and routed to the right team. The project asked how far an OCR, retrieval, and LLM pipeline can automate that intake, and where it breaks.
My part
As an AI Engineer Apprentice at Pfizer, I built the end-to-end Python and Docker pipeline, benchmarked OCR and LLM choices, reviewed outputs by hand to diagnose failures, and delivered a demo interface and a technical report with deployment recommendations. I then built a public continuation on real MHRA recall and defect notices, focused on keeping every extracted date traceable to its source.
- Pipeline
- OCR, retrieval, classification
- OCR engines
- Tesseract, PaddleOCR
- LLMs
- Mistral, Phi-2
- Evaluation
- 100+ outputs reviewed for failure analysis
- Claim
- A three-stage pipeline (OCR, retrieval, classification) can route pharmaceutical vendor files, and a source-linked review workspace can keep ambiguous dates visible instead of guessing.
- Result
- 50+ vendor files processed; 4 OCR/LLM approaches compared across 6 chunking configurations; 100+ outputs reviewed. The public continuation covers 742 source-linked date cells from 60 MHRA notices in 5 languages.
Limit The Pfizer code and data are internal. The public continuation is a historical snapshot, and its original-PDF OCR was measured on only 3 PDFs.
The problem
A supplier document can carry manufacturing, expiry, inspection, audit, and arrival dates. Finding a date is only part of the job: a reviewer needs to know what it refers to, which date convention the document uses, and where it came from. A flat OCR transcript loses those relationships.
What I built
AI Engineer Apprenticeship, Pfizer (June to September 2026)
- A Python and Docker pipeline for OCR, retrieval, and classification of 50+ pharmaceutical vendor files.
- A benchmark of 4 OCR/LLM approaches (Tesseract, PaddleOCR, Mistral, Phi-2) across 6 chunking configurations, scored on OCR accuracy, retrieval quality, and routing performance.
- Manual review of 100+ outputs, tracing failures to the OCR, retrieval, or routing stage.
- A demo interface and a technical report covering model trade-offs, optimization steps, and deployment recommendations.
Public continuation
- A bounded, cached collector for 60 real MHRA recall and defect notices, with 371 batch rows and source hashes.
- A trained table-column classifier (character TF-IDF and logistic regression, fitted on 36 notices with chronological document-group splits, against keyword and majority baselines).
- A searchable register of 742 source-linked date cells in English, French, German, Spanish, and Vietnamese.
- Ambiguity kept visible: when
09/10/2026has two valid readings, the value stays unresolved and both candidates are shown. - A browser workspace with source highlights, reasoned review decisions, and CSV and JSON exports.
Limits
- Code, data, and results from the Pfizer apprenticeship are internal, so this page describes them at the level of the CV.
- The public workspace is a historical research snapshot, not a live recall service or a medication-safety tool.
- Original-PDF OCR was measured on 3 public PDFs (6 pages). Customer demand and time savings have not been measured.