Choose your region

    Lists show the case studies of your region first. Browse and search still hold every case study.

    Europe
    North America

    Prescription copilot cuts near-misses at Amazon Pharmacy

    Amazon Pharmacy built MEDIC, a copilot that reads the free-text directions on each e-prescription, rebuilds them under pharmacist-written rules and suggests them to the technicians who type them in.

    Amazon PharmacyUnited StatesPharmacyPilot
    Scenario
    Prescription direction transcription and error checking
    Business function
    Clinical care
    Kind of solution
    Document extraction
    Who built it
    Built in-house
    Where it runs
    Public cloud
    Human oversight
    Assists people
    Organization
    Enterprise, part of Amazon
    AI types
    Generative AI, Document AI

    Sources and their publishers

    This case study draws on reporting by the following publishers. Enterprise AI Case Studies combined these accounts and added its own explanation. The reporting, and every passage quoted from it, belongs to whoever published or supplied it.

    1. Nature Medicine

    2. Amazon

    3. Stanford Graduate School of Business

    4. AHRQ Patient Safety Network

    5. Drug Topics

    6. Healthcare Innovation

    7. TJM Labs

    8. ICML

    9. Fierce Healthcare

    tl;drDirection-related near-misses fell 33% while MEDIC ran in Amazon Pharmacy's production system.See the results

    View the solutionBuild this solution yourself

    Amazon Pharmacy built MEDIC, a medication direction copilot that reads the prescriber’s free-text direction on each prescription and suggests a standardized version to the technician who types it in1, 2. A slip at that step can hurt a patient1.

    A fine-tuned DistilBERT model pulls the parts of a direction out of the text, and pharmacy rules and a medication catalog put them back together1. When any of five safety checks fails, MEDIC suggests nothing at all1. It also flags any clinical difference between what the technician types and the prescription, as it happens1.

    Amazon Pharmacy swapped MEDIC in for its existing data-entry system during an experimental period in production. In the study it published in Nature Medicine in April 2024, direction-related near-misses fell 33% against the system it replaced1, 2. A near-miss is an error that a pharmacist catches before it reaches the patient1.

    Before the deployment

    At Amazon Pharmacy, two people handled each direction1. In data entry, a labor-intensive step, a certified technician transcribed the prescriber’s direction and the other prescription details into a standardized, patient-friendly format1. In pharmacist verification, a pharmacist reviewed that work for accuracy and for interactions across the patient’s profile1.

    The process had the following problems:

    • Free-text directions: Electronic health records leave the directions as free text, and prescribers fill that field with abbreviations, medical terms, and pharmacy jargon1. One physician writes “three times a day” where another writes “t.i.d.”10.
    • Wording that varies across the industry: A study of 25,000 e-prescriptions, described in 2018, found that a simple instruction can be written in hundreds of ways. The wording was a problem in 10% of the directions it reviewed6.
    • Near-misses: When a pharmacist found a mistake, the prescription went back for correction, sometimes after a call to the prescriber, and the event counted as a near-miss1.
    • Dangerous errors: Typing “once weekly” as “once daily” for methotrexate can cause severe harm and even death1.
    • Rework at growing volume: Each near-miss cost a pharmacist correction and a second round of data entry1. By January 2024, Amazon Pharmacy had doubled the number of customers it served in a year3.

    “We’re trying to remove as much operator error and decoding of a script as possible to process these scripts as fast as possible.”

    Vin Gupta, chief medical officer at Amazon Pharmacy10

    The pharmacy already ran a production system for data entry, a hybrid of supervised learning and rule-based modules1. General-purpose language models weren’t the obvious replacement, because they can generate fabricated information with high confidence1. When the researchers first ran standard models on Amazon Pharmacy prescriptions, those models made more errors than the rule-based methods pharmacies already used4.

    Mohsen Bayati, a Stanford Graduate School of Business professor and one of the authors, described the conclusion: “We realized we had to combine approaches into something that takes the benefits of LLMs but has guardrails based on pharmacy guidelines”4.

    What was built

    MEDIC splits the job so that the learned model never writes the final direction1. The model captures what the prescriber wrote exactly as written, mistakes included, so that the rules that follow can check each piece against the medication catalog1. The work is divided as follows:

    • Extraction model: A fine-tuned DistilBERT model extracts nine core components (verb, dose, route, frequency, auxiliary actions, indications, maximum dose, period, and time)1.
    • Pharmacy rules: Rule-based normalization cleans the raw text, and semantic assembly builds the standardized direction from the components. Patient safety guardrails, developed with pharmacists and quality specialists, stop the suggestion when a check fails1.
    • Flagging: Runs every time the technician types or edits a direction. It compares the technician’s version with the prescriber’s, component by component, and flags any place where the two diverge clinically1.
    • Technicians: Adopt or edit each suggestion in the data-entry screen, because MEDIC’s output is only ever a suggestion1.
    • Pharmacists: Still review every prescription afterward, because prescriber guidance can be wrong in ways the AI can’t detect3.

    Alternatives considered

    The team built the following benchmarks, which use language models to write the whole direction1:

    • T5, fine-tuned: Trained on up to 1.5 million pairs of prescriber directions and their pharmacist-verified versions. MEDIC’s extractor learned from 1,000 hand-labeled directions by comparison1.
    • Claude v.2.1 with few-shot prompting: Given anywhere from zero to ten examples1.
    • ChatGPT4 and Gemini Pro: Tried on the same synthesized examples in December 2023. In two of the hardest cases, the models fabricated or misread dosage information1.

    On BLEU and METEOR, two standard text-similarity scores, the large T5 model matched MEDIC and edged slightly ahead1. Bayati rejected that measure. “But that’s not the right metric,” he said. “The right one from a clinical point of view is which outputs are safer for patients”4.

    On that measure, both alternatives produced more near-misses than MEDIC1. Speed and cost mattered too, because a high-throughput pharmacy has runtime requirements. Models of a few hundred million parameters, such as BERT and T5, met them, and models with tens to hundreds of billions of parameters ran slower and cost more per call1.

    Rollout

    MEDIC went through the following phases, from offline tests to a production experiment:

    • Retrospective evaluation: The decision to test MEDIC in production was taken only after it met the required safety criteria in the retrospective evaluation1.
    • Production experiment: With Amazon Pharmacy’s engineering and operations teams, the researchers implemented MEDIC as an API compliant with the Health Insurance Portability and Accountability Act (HIPAA). During an experimental phase, it replaced the then-active production system for a before-and-after comparison1.
    • Publication: Nature Medicine received the manuscript on November 16, 2023, and published it on April 25, 20241.
    • ICML 2025 Expo: Amazon Pharmacy engineers described the production deployment and its result9.

    During the experiment, MEDIC learned from the technicians. A prescription went to a human review queue when a technician declined a suggestion, adopted it with substantial edits, or adopted one that later led to a near-miss1. Quality specialists reviewed the queue periodically, and their findings fed updates to the catalog, the labeled data, and the component libraries, which retrained the extractor1.

    Technology and architecture

    Figure 1What Amazon Pharmacy built around the prescription direction
    What Amazon Pharmacy built around the prescription directionA prescriber's free-text direction enters MEDIC, which runs as an API on Amazon Web Services. Rule-based normalization cleans the text, a fine-tuned DistilBERT model extracts nine components, and an assembly and safety-check stage builds the direction using the DMedCat medication catalog. The suggestion, or a flag on what the technician typed, appears in the data-entry screen. The technician enters the direction and hands it to a pharmacist, who sends errors back as near-misses or passes verified directions to fulfillment. Declined, heavily edited and near-miss cases go to a human review queue that quality specialists use to update the catalog and retrain the extractor. Every part is documented; none is inferred.free text, drug ID (data) · Documented in source [1]standardized text (data) · Documented in source [1]nine components (data) · Documented in source [1]medication attributes (data) · Documented in source [1]suggestion or flag (data) · Documented in source [1]adopt or edit (handoff to people) · Documented in source [1]entered direction (handoff to people) · Documented in source [1]near-miss sent back (feedback) · Documented in source [1]verified direction (handoff to people) · Documented in source [1]declined or edited (data) · Documented in source [1]periodic review (handoff to people) · Documented in source [1]updates, retraining (feedback) · Documented in source [1]MEDIC API ON AWSAMAZON PHARMACY WORKFLOWCONTINUOUS IMPROVEMENTPrescriber direction · Data · Documented in source [1]DATAPrescriberdirectionRule-based normalization · Step · Documented in source [1]Rule-basednormalizationFine-tuned DistilBERT · AI model · Documented in source [1]AI MODELFine-tunedDistilBERTDMedCat catalog · Data · Documented in source [1]DATADMedCatcatalogAssembly and safety checks · Step · Documented in source [1]Assembly andsafety checksData-entry screen · Application · Documented in source [1]APPLICATIONData-entryscreenData-entry technician · Person · Documented in source [1]PERSONData-entrytechnicianPharmacist · Person · Documented in sources [1] [3]PERSONPharmacistFulfillment · Step · Documented in source [1]FulfillmentHuman review queue · Data · Documented in source [1]DATAHumanreview queueQuality specialists · Team · Documented in source [1]TEAMQualityspecialistsfree text,drug IDstandardizedtextninecomponentsmedicationattributessuggestionor flagadopt or editentereddirectionnear-misssent backverifieddirectiondeclinedor editedperiodic reviewupdates,retrainingWhat Amazon Pharmacy built around the prescription directionA prescriber's free-text direction enters MEDIC, which runs as an API on Amazon Web Services. Rule-based normalization cleans the text, a fine-tuned DistilBERT model extracts nine components, and an assembly and safety-check stage builds the direction using the DMedCat medication catalog. The suggestion, or a flag on what the technician typed, appears in the data-entry screen. The technician enters the direction and hands it to a pharmacist, who sends errors back as near-misses or passes verified directions to fulfillment. Declined, heavily edited and near-miss cases go to a human review queue that quality specialists use to update the catalog and retrain the extractor. Every part is documented; none is inferred.free text, drug ID (data) · Documented in source [1]standardized text (data) · Documented in source [1]nine components (data) · Documented in source [1]medication attributes (data) · Documented in source [1]suggestion or flag (data) · Documented in source [1]adopt or edit (handoff to people) · Documented in source [1]entered direction (handoff to people) · Documented in source [1]near-miss sent back (feedback) · Documented in source [1]verified direction (handoff to people) · Documented in source [1]declined or edited (data) · Documented in source [1]periodic review (handoff to people) · Documented in source [1]updates, retraining (feedback) · Documented in source [1]MEDIC API ON AWSAMAZON PHARMACY WORKFLOWCONTINUOUS IMPROVEMENTPrescriber direction · Data · Documented in source [1]DATAPrescriber directionRule-based normalization · Step · Documented in source [1]Rule-basednormalizationFine-tuned DistilBERT · AI model · Documented in source [1]AI MODELFine-tuned DistilBERTDMedCat catalog · Data · Documented in source [1]DATADMedCat catalogAssembly and safety checks · Step · Documented in source [1]Assembly andsafety checksData-entry screen · Application · Documented in source [1]APPLICATIONData-entry screenData-entry technician · Person · Documented in source [1]PERSONData-entry technicianPharmacist · Person · Documented in sources [1] [3]PERSONPharmacistFulfillment · Step · Documented in source [1]FulfillmentHuman review queue · Data · Documented in source [1]DATAHuman review queueQuality specialists · Team · Documented in source [1]TEAMQuality specialistsfree text, drug IDstandardized textnine componentsmedication attributessuggestion or flagadopt or editentered directionnear-miss sent backverified directiondeclined or editedperiodic reviewupdates, retraining
    • AI component
    • Data
    • Handoff to people
    • Feedback
    Sources [1][3]
    MEDIC suggests and checks directions in the data-entry screen, while technicians, pharmacists and quality specialists keep every decision.

    MEDIC is one trained model inside a system of rules, served to the pharmacy’s data-entry system as an API1. All of its components were written in Python and run on Amazon Web Services, from data ingestion and preprocessing to training and fine-tuning1. The following table lists the components.

    Layer What they used Role Source
    Language model DistilBERT, fine-tuned for named entity recognition Extracts the nine core components of each direction exactly as written 1
    Solution platform MEDIC Packages normalization, extraction, assembly, guardrails and flagging behind one HIPAA-compliant API 1, 2
    Data preparation Pharmalexical normalization Cleans and standardizes the raw prescriber text with pharmacist-verification rules 1
    Rules and decision logic Semantic assembly Fills missing components from the catalog and builds the standardized direction 1
    Guardrails Patient safety guardrails (GR1 to GR5) Stop the suggestion when any check fails 1
    Reference data DMedCat Medication catalog built from RxNorm, OpenFDA and Amazon Pharmacy’s drug catalog 1
    Checker model Flagging module Compares the technician’s direction with the prescriber’s and flags clinical divergence 1
    Workplace application Data-entry user interface Shows suggestions when a prescription opens and flags as the technician types 1
    Cloud platform Amazon Web Services Hosts ingestion, preprocessing, training and the running system 1
    Feedback capture Human review queue Collects declined, heavily edited and near-miss cases for quality specialists 1

    Extractor training

    The extractor needed little labeled data1. The study used a random sample of about 1.6 million single-line directions from a year of Amazon Pharmacy prescriptions1. Only about 1,000 were labeled by hand, component by component, with the help of pharmacy quality specialists1.

    Trained on those alone, the extractor reached an F1 score of about 0.70, where 1 is perfect1. The team then combined libraries of observed component values and direction patterns into 10,000 synthetic labeled directions1. Not all of them were realistic or clinically consistent, which the authors accepted because the extractor only has to capture what the prescriber wrote1.

    On a synthetic test set of 10,000 directions, the extractor’s average precision, recall, and F1 all exceeded 0.991.

    Data inputs

    MEDIC uses the following data:

    • Prescriber direction: The raw free-text direction and the drug’s internal ID, sent when a technician opens a new prescription1.
    • Technician’s direction: What the technician types or edits, which flagging compares with the prescriber’s direction1.
    • DMedCat: States for each drug which direction components are required and what the preferred wording is, such as the verb “chew” instead of “take”1. The assembly step and the guardrails check against it, and its public data covers about 99% of Amazon Pharmacy’s medications1.
    • Amazon Pharmacy drug catalog: The pharmacy’s own catalog, curated by pharmacists and certified technicians, which is merged with the public data into DMedCat1.

    Integrations

    MEDIC connects to the following systems:

    • Amazon Pharmacy data-entry system: Calls MEDIC’s HIPAA-compliant API when a prescription opens, and again each time the technician types or edits the direction1.
    • RxNorm API: Brings RxNorm drug data from the National Library of Medicine into DMedCat1.
    • OpenFDA National Drug Code Directory: Custom APIs fetch new drug codes from this daily-updated directory, so the catalog is refreshed daily1.

    Guardrails

    The guardrails decide whether a technician sees anything at all1. They run in a fixed order, and each was built as an independent layer, so that it can be added, changed, or retired without touching the others1.

    Figure 2How MEDIC decides whether to show a suggestion
    How MEDIC decides whether to show a suggestionThe nine extracted components are completed from the DMedCat catalog and assembled into a draft direction. The draft then passes five checks in order: a conflict with the catalog, more than one value for a component, a dose without a verb, a missing frequency, and a tablet or capsule with no dose. If any check is triggered, no suggestion is shown. If all pass, the suggestion appears in the data-entry screen. All steps are documented. (trigger or control) · Documented in source [1] (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]Nine extracted components · Step · Documented in source [1]Nine extractedcomponentsFill gaps, assemble draft · Step · Documented in source [1]Fill gaps,assemble draftConflicts with DMedCat? · Decision · Documented in source [1]DECISIONConflicts withDMedCat?Several values for a part? · Decision · Documented in source [1]DECISIONSeveral valuesfor a part?Dose without a verb? · Decision · Documented in source [1]DECISIONDose withouta verb?Frequency missing? · Decision · Documented in source [1]DECISIONFrequencymissing?Tablet or capsule, no dose? · Decision · Documented in source [1]DECISIONTablet orcapsule,no dose?Suggestion shown · Step · Documented in source [1]SuggestionshownNo suggestion · Step · Documented in source [1]No suggestionnononononoyesyesyesyesyesHow MEDIC decides whether to show a suggestionThe nine extracted components are completed from the DMedCat catalog and assembled into a draft direction. The draft then passes five checks in order: a conflict with the catalog, more than one value for a component, a dose without a verb, a missing frequency, and a tablet or capsule with no dose. If any check is triggered, no suggestion is shown. If all pass, the suggestion appears in the data-entry screen. All steps are documented. (trigger or control) · Documented in source [1] (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]no (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]yes (trigger or control) · Documented in source [1]Nine extracted components · Step · Documented in source [1]Nine extractedcomponentsFill gaps, assemble draft · Step · Documented in source [1]Fill gaps,assemble draftConflicts with DMedCat? · Decision · Documented in source [1]DECISIONConflicts withDMedCat?Several values for a part? · Decision · Documented in source [1]DECISIONSeveral valuesfor a part?Dose without a verb? · Decision · Documented in source [1]DECISIONDose without a verb?Frequency missing? · Decision · Documented in source [1]DECISIONFrequency missing?Tablet or capsule, no dose? · Decision · Documented in source [1]DECISIONTablet or capsule,no dose?Suggestion shown · Step · Documented in source [1]Suggestion shownNo suggestion · Step · Documented in source [1]No suggestionnononononoyesyesyesyesyes
    • AI component
    • Trigger or control
    Source [1]
    A suggestion appears only if the draft passes all five pharmacist-defined guardrails; any one of them stops it.

    In the retrospective evaluation, the guardrails let MEDIC produce a direction in about 80% of cases, a share rounded to the nearest 20% for confidentiality1.

    The second guardrail also keeps MEDIC inside its scope. MEDIC was trained on single-line directions, which make up over 98% of the pharmacy’s directions1. A multi-line direction, such as one tablet in the morning and two at bedtime, tends to produce several values for one component, which stops it1.

    How one prescription flows through the system

    A new prescription passes through MEDIC, a technician, and a pharmacist in the following steps:

    1. The technician opens a new prescription. The data-entry system sends the prescriber’s direction and the drug’s internal ID to MEDIC1.
    2. Pharmalexical normalization cleans the raw direction through a sequence of pattern-based transformations, each guided by one of hundreds of pharmacist-verification rules1.
    3. The DistilBERT extractor returns the nine components. Semantic assembly fills in any required component that’s missing from the catalog and orders the components into a standardized direction1.
    4. The guardrails run. If every check passes, the suggested direction appears on screen1.
    5. The technician takes the suggestion as it is or starts typing. If the prescription reads “take one tablet by mouth daily” and the technician types “take two tablets”, MEDIC warns of an incorrect dose straight away. The flagging output is a yes or no on whether the two directions are equivalent1.
    6. The pharmacist verifies the direction. If the pharmacist finds an error, the prescription goes back to data entry, and that return is the near-miss the study counts1.
    7. The verified direction moves on to fulfillment. No prescription leaves a fulfillment center without a pharmacist having verified the medicine, strength, dosage, quantity, and label10.
    Figure 3One prescription through data entry and verification
    One prescription through data entry and verificationWhen a technician opens a new prescription, MEDIC proposes a standardized direction in the data-entry screen, but only if every safety guardrail passes. Each time the technician types or edits the direction, MEDIC's flagging check marks where it diverges clinically from the prescriber's. The technician sends the entered direction to pharmacist verification. If the pharmacist finds an error, the prescription goes back to data entry, which the study counts as a near-miss; otherwise the verified direction moves to fulfillment.OPTevery guardrail passesLOOPeach typed or edited directionALTerror foundelse: verified1. opens a new prescription · Documented in source [1]1TechnicianMEDICopens a new prescription2. suggested direction · Documented in source [1]2MEDICTechniciansuggested direction3. entered direction · Documented in source [1]3TechnicianMEDICentered direction4. flags clinical divergence · Documented in source [1]4MEDICTechnicianflags clinical divergence5. direction for verification · Documented in source [1]5TechnicianPharmacistdirection for verification6. sent back to data entry (near-miss) · Documented in source [1]6PharmacistTechniciansent back to data entry (near-miss)7. verified direction · Documented in source [1]7PharmacistFulfillmentverified directionOne prescription through data entry and verificationWhen a technician opens a new prescription, MEDIC proposes a standardized direction in the data-entry screen, but only if every safety guardrail passes. Each time the technician types or edits the direction, MEDIC's flagging check marks where it diverges clinically from the prescriber's. The technician sends the entered direction to pharmacist verification. If the pharmacist finds an error, the prescription goes back to data entry, which the study counts as a near-miss; otherwise the verified direction moves to fulfillment.OPTevery guardrail passesLOOPeach typed or edited directionALTerror foundelse: verified1. opens a new prescription · Documented in source [1]1opens a newprescription2. suggested direction · Documented in source [1]2suggesteddirection3. entered direction · Documented in source [1]3entered direction4. flags clinical divergence · Documented in source [1]4flags clinicaldivergence5. direction for verification · Documented in source [1]5direction for verification6. sent back to data entry (near-miss) · Documented in source [1]6sent back to data entry (near-miss)7. verified direction · Documented in source [1]7verified directionTechnician · Person · Documented in source [1]TechnicianMEDIC · AI model · Documented in source [1]MEDICPharmacist · Person · Documented in sources [1] [3]PharmacistFulfillment · Step · Documented in source [1]FulfillmentOne prescription through data entry and verificationWhen a technician opens a new prescription, MEDIC proposes a standardized direction in the data-entry screen, but only if every safety guardrail passes. Each time the technician types or edits the direction, MEDIC's flagging check marks where it diverges clinically from the prescriber's. The technician sends the entered direction to pharmacist verification. If the pharmacist finds an error, the prescription goes back to data entry, which the study counts as a near-miss; otherwise the verified direction moves to fulfillment.OPTevery guardrail passesLOOPeach typed or edited directionALTerror foundelse: verified1. opens a new prescription · Documented in source [1]1opens a newprescription2. suggested direction · Documented in source [1]2suggesteddirection3. entered direction · Documented in source [1]3entered direction4. flags clinical divergence · Documented in source [1]4flags clinicaldivergence5. direction for verification · Documented in source [1]5direction for verification6. sent back to data entry (near-miss) · Documented in source [1]6sent back to data entry (near-miss)7. verified direction · Documented in source [1]7verified directionTechnician · Person · Documented in source [1]TechnicianMEDIC · AI model · Documented in source [1]MEDICPharmacist · Person · Documented in sources [1] [3]PharmacistFulfillment · Step · Documented in source [1]FulfillmentOne prescription through data entry and verificationWhen a technician opens a new prescription, MEDIC proposes a standardized direction in the data-entry screen, but only if every safety guardrail passes. Each time the technician types or edits the direction, MEDIC's flagging check marks where it diverges clinically from the prescriber's. The technician sends the entered direction to pharmacist verification. If the pharmacist finds an error, the prescription goes back to data entry, which the study counts as a near-miss; otherwise the verified direction moves to fulfillment.OPTevery guardrail passesLOOPeach typed or edited directionALTerror foundelse: verified1. opens a new prescription · Documented in source [1]1opens a newprescription2. suggested direction · Documented in source [1]2suggested direction3. entered direction · Documented in source [1]3entered direction4. flags clinical divergence · Documented in source [1]4flags clinical divergence5. direction for verification · Documented in source [1]5direction for verification6. sent back to data entry (near-miss) · Documented in source [1]6sent back to data entry (near-miss)7. verified direction · Documented in source [1]7verified directionTechnician · Person · Documented in source [1]TechnicianMEDIC · AI model · Documented in source [1]MEDICPharmacist · Person · Documented in sources [1] [3]PharmacistFulfillment · Step · Documented in source [1]FulfillmentOne prescription through data entry and verificationWhen a technician opens a new prescription, MEDIC proposes a standardized direction in the data-entry screen, but only if every safety guardrail passes. Each time the technician types or edits the direction, MEDIC's flagging check marks where it diverges clinically from the prescriber's. The technician sends the entered direction to pharmacist verification. If the pharmacist finds an error, the prescription goes back to data entry, which the study counts as a near-miss; otherwise the verified direction moves to fulfillment.OPTevery guardrail passesLOOPeach typed or edited directionALTerror foundelse: verified1. opens a new prescription · Documented in source [1]1opens a new prescription2. suggested direction · Documented in source [1]2suggested direction3. entered direction · Documented in source [1]3entered direction4. flags clinical divergence · Documented in source [1]4flags clinical divergence5. direction for verification · Documented in source [1]5direction for verification6. sent back to data entry (near-miss) · Documented in source [1]6sent back to data entry (near-miss)7. verified direction · Documented in source [1]7verified directionTechnician · Person · Documented in source [1]TechnicianMEDIC · AI model · Documented in source [1]MEDICPharmacist · Person · Documented in sources [1] [3]PharmacistFulfillment · Step · Documented in source [1]Fulfillment
    • AI component
    • Data
    • Trigger or control
    • Handoff to people
    • Feedback
    Sources [1][3]
    MEDIC suggests and flags during data entry, and a pharmacist still verifies every prescription before fulfillment.

    Results

    The production figures come from the before-and-after comparison with the system MEDIC replaced, during the experimental period described in Nature Medicine in April 20241.

    Metric Before After Scope and timeframe Reported by
    Direction-related near-misses Not disclosed 33% fewer (95% CI 26% to 40%) Experimental period in production, against the previous system Amazon Pharmacy researchers, pilot1
    Suggestion coverage Not disclosed 18.3% higher (95% CI 17.8% to 18.9%) Same period Amazon Pharmacy researchers, pilot1
    Suggestions adopted by technicians Not disclosed 28.5% higher (95% CI 28.1% to 29.0%) Same period Amazon Pharmacy researchers, pilot1
    Edits after a suggestion was adopted Not disclosed 44.3% fewer (95% CI 43.2% to 45.4%) Same period Amazon Pharmacy researchers, pilot1

    The metrics and the retrospective tests are explained as follows:

    • Near-miss rate: The share of directions that pharmacist verification judged wrong and sent back to the technicians1. Fewer near-misses also mean fewer pharmacist corrections and less rework at data entry1. Bayati described near-misses as a proxy for errors4.
    • Coverage, adoption, and edits: Coverage is the share of prescriptions that got a suggestion, adoption the share of suggestions that technicians selected, and the edit ratio the share of selected suggestions they changed1. The edits counted range from major revisions to small changes of style or format1.
    • Retrospective near-misses: On 1,200 held-out prescriptions that experts reviewed, the T5 model trained on 1.5 million pairs produced 1.51 times as many near-misses as MEDIC, and the best Claude variant 4.38 times as many1. On the roughly 80% of cases where MEDIC’s guardrails allowed a suggestion, T5 did better, with a near-miss ratio of 0.581.
    • Clinical severity: When pharmacists graded each near-miss for potential harm, MEDIC and T5 showed no statistical difference1. The ten-shot Claude variant had 5.87 times as many clinically severe near-misses as MEDIC across all cases. One added an extra bedtime dose of insulin that could lead to a lethal overdose1.
    • Speed: MEDIC averaged 200 ms per direction on basic CPU machines, against about 1 second for T5 and 7.6 to 8.2 seconds for Claude’s variants, which ran on GPUs1.
    • Flagging: Tested offline on 795 historical near-misses with known errors and corrections, the flagging function caught 95.1% of the errors1.
    • Order processing: Generative AI combined with pharmacists’ expertise increased order processing speed by 90%, across prescription processing as a whole3. Gupta put the gain at more than 90% in a March 2024 interview10.

    Lessons learned

    Pharmacists’ review of near-misses favored the system that knew when to stop, while text-similarity scores favored the model trained on 1.5 million examples1, 4. T5 was the more dangerous system overall, because it kept producing directions on the harder cases with misleadingly high confidence1. The authors’ answer to hallucination was to confine the model to a narrow task and wrap it in deterministic guardrails built on validated pharmacy logic1.

    MEDIC’s reach is narrow. About 20% of directions get no suggestion, and MEDIC handles electronic prescriptions only, leaving out fax, scanned, and spoken prescriptions, which are usually processed by hand and more error prone1. It doesn’t cover the multi-line directions that carry more risk, and the study collected no feedback from patients on the directions they received1.

    Flagging performed differently in production than in the retrospective test, a gap the authors put down to unpredictable human behavior, system limitations, and data-quality problems1. Live flagging was also hard to measure, because technicians change what they type as they go1. Flagging was weaker on verb and dose-form errors, because DMedCat’s data was incomplete1.

    Putting MEDIC into real work took a lengthy period of evaluation and optimization, close collaboration with technicians and pharmacists, and trust that had to be built1. Daniel Tawfik, an assistant professor of pediatrics at Stanford Medicine who wasn’t an author, said a human must stay in the loop: “There are still important things that a pharmacist may catch that an AI system can’t.” He added that no regulatory framework yet says what happens if the AI gets something wrong4.

    Every figure comes from Amazon, because all six authors did the research while employed at Amazon Pharmacy1. The Amazon Science page, the ICML talk, and Stanford’s story, a feature by co-author Bayati’s own business school, relay the same numbers2, 9, 4. The production result rests on one before-and-after comparison, a design whose limits the authors acknowledge, and the old system was left out of the retrospective tests because it was too hard to replicate1.

    Other sources describe the result differently. AHRQ’s Patient Safety Network summary gives a 3% reduction where the paper gives 33%, and the ICML abstract calls it a reduction in “medication direction errors” where the paper measures near-miss events5, 1, 9. Amazon’s January 2024 post describes a generative AI model that structures directions by dose and frequency, built on Amazon Bedrock and Amazon SageMaker, without naming MEDIC3.

    Case study scorecard

    • 33% fewer direction-related near-misses1, 2PilotRelayed
    • 44.3% fewer edits after a technician accepted a suggestion1PilotRelayed
    • 4.38 times as many near-misses from the best Claude benchmark as from MEDIC1MeasuredRelayed
    • 200 ms average execution time per direction1MeasuredRelayed
    • Rules and standards: HIPAA

    Build this solution yourself

    Analysis

    What you need

    To build this solution, you need the three things that MEDIC depended on at Amazon Pharmacy:

    • A medication catalog to check against: The assembly step and the guardrails check every extracted component against DMedCat, and gaps in its data weakened flagging1.
    • Pharmacists and quality specialists with time: They labeled the training directions, helped write the guardrails, and worked through the review queue during the experiment1.
    • Control of the data-entry screen and a near-miss count: Suggestions and flags appear where technicians type, and the near-miss count at pharmacist verification is the measure that MEDIC was judged by1.

    Reference architecture

    Document extraction

    Document extraction reads the documents, forms, and images that an organization receives, sorts each one to its case, and turns it into structured fields for the business system that acts on it. Models read each document into fields, and ordinary software checks the fields against business rules and the organization's reference records. A reviewer compares the fields with the source before they reach the business system, or sees only the doubtful ones, and the corrections measure and improve the models.

    A check mark shows a building block that this case study's sources document.

    Open the reference architecture

    Others who built it

    • Surescripts, which runs the US e-prescribing network, uses its machine-learning Sig IQ service to translate free-text directions into a structured, codified format, and applied it to 12.7% of all e-prescribing transactions in 20257.
    • Carepoint Pharmacy put TJM Labs AI agents into its existing Scriptly prescription-entry workflow, moved seven full-time employees out of prescription entry, and reports prescription accuracy of about 99%8.

    Cite this case study

    Enterprise AI Case Studies. "Prescription copilot cuts near-misses at Amazon Pharmacy." Updated Nov 18, 2026. https://case-studies.ai/case-studies/document-intelligence/DI-010-prescription-direction-copilot-amazon/

    @misc{csai-di-010,
      author = {{Enterprise AI Case Studies}},
      title = {{Prescription copilot cuts near-misses at Amazon Pharmacy}},
      year = {2026},
      note = {Updated 2026-11-18},
      url = {https://case-studies.ai/case-studies/document-intelligence/DI-010-prescription-direction-copilot-amazon/}
    }

    Sources

    The following reporting, and every passage quoted from it, belongs to its publisher, not to this site. Sources and ownership

    1. Source 1:

      Large language models for preventing medication direction errors in online pharmacies

      AcademicNature Medicine, Apr 25, 202425 Apr 2024By Cristobal Pais, Jianfeng Liu, Robert Voigt, Vin Gupta, Elizabeth Wade, and Mohsen BayatiAccessed Nov 16, 202616 Nov 2026

      Supporting excerpts (128)
      • DE, a labor-intensive phase, involves pharmacy technicians transcribing prescriber directions and additional prescription details into a standardized format for efficient pharmacist review and to ensure patient understanding and safety.
      • In the pharmacist-verification phase, pharmacists meticulously review all information processed in the DE phase for both accuracy and potential drug interactions across the patient’s profile.
      • defined as events where errors are caught and re-routed for correction before reaching the patient
      • A critical example is the incorrect transcription of ‘take 20 mg by mouth once weekly’ as ‘take 20 mg by mouth once daily’ for methotrexate oral capsules, which could result in severe adverse effects such as pancytopenia and even death
      • EHRs, while structuring data entry, also permit free-text fields for prescriptions, creating inconsistencies and potential for errors.
      • we substituted MEDIC for Amazon Pharmacy’s then-active production system (a hybrid of supervised learning and rule-based modules) and conducted a before-and-after comparative analysis of their respective performances
      • a notable limitation of LLMs is their propensity for ‘hallucination’ or generating fabricated information with high confidence
      • Our AI module, MEDIC, uses a three-stage process, starting with a rule-based model that leverages pharmacy knowledge to format and standardize raw prescriber directions.
      • The second stage, AI-powered extraction, and the heart of MEDIC, uses a fine-tuned DistilBERT
      • The nine components identified by MEDIC - verb, dose, route, frequency, auxiliary actions, indications, max dose, period, and time
      • The final stage of MEDIC assembles medication directions using pharmacy knowledge and DMedCat
      • we also created a medication database, DMedCat, from RxNorm41, OpenFDA42 and Amazon Pharmacy’s database, containing medication attributes and select core components essential for generating standardized directions
      • It applies safety guardrails developed with pharmacists: direction generation stops if there is a conflict with DMedCat (GR1), multiple core component values (GR2), a dose without a verb (GR3), a missing frequency (GR4) or no dose with tablet/capsule form (GR5).
      • upon a DE opening a new prescription, the suggestion module activates automatically, offering proposed directions within the DE user interface.
      • each time a DE types or edits directions, the flagging module initiates, displaying flagging results in the DE user interface.
      • This process effectively flags, in real time, instances where the prescriber and DE directions diverge from a clinical standpoint
      • should the entered direction be deemed accurate, it advances to pharmacist verification (PV).
      • detected errors in the entered direction are sent back by the pharmacists for rectification.
      • after verification, the typed direction moves to fulfillment.
      • MEDIC effectively reduces its near-miss rate by ceasing direction generation when safety guardrails are activated, covering about 80% of cases that we refer to as MEDIC Active cases (this fraction is rounded to the nearest multiple of 20% to maintain confidentiality).
      • The DH subset, with 1,000 samples annotated by human experts for core components, was utilized to train MEDIC.
      • Training the NER model exclusively with the 1,000 samples in DHL resulted in a marked decline in the F1 score to approximately 0.70.
      • we capitalize on DHL to generate a considerably larger augmented dataset DHLA, comprising 10,000 synthetically created labeled directions.
      • It is important to note, however, that not all synthetically generated directions in DHLA might be realistic or clinically consistent.
      • But, bearing in mind our main guiding principle, the primary objective of extraction is to accurately capture what the prescriber has written.
      • They are listed below in their order of implementation.
      • To evaluate the data efficiency of MEDIC, which relies on just 1,000 samples in DH, we trained a benchmark model using a considerably larger dataset—the DTrain subset, comprising 1.5 million samples.
      • We also developed two benchmark applications of LLMs: one based on fine-tuning, referred to as T5-FineTuned, and the other on few-shot prompting, named Claude
      • On 1,200 expert-reviewed prescriptions, the two benchmarks respectively recorded 1.51 (confidence interval (CI) 1.03, 2.31) and 4.38 (CI 3.13, 6.64) times more near-miss events
      • Focusing on MEDIC Active cases, T5-FineTuned (1.5M) outperforms MEDIC with a near-miss ratio of 0.58 (95% CI 0.33, 0.92).
      • T5-FineTuned (1.5M), unlike MEDIC, fails to recognize its own limitations and confidently churns out directions.
      • Specifically, it had 5.87 (95% CI 2.1, 19.0) times more clinically severe near-misses compared to MEDIC across all cases
      • A glaring example involved adding an extra insulin administration at bedtime, which could lead to a lethal overdose
      • MEDIC and T5-FineTuned showcased average execution times of 200 ms and 1 s on DTest, respectively, compared to 7.6–8.2 s for Claude’s 0–10-shot versions
      • Notably, there was a 33% (95% CI 26%, 40%) reduction in near-miss events related to medication directions, an 18.3% (95% CI 17.8%, 18.9%) increase in suggestion coverage rates, a 28.5% (95% CI 28.1%, 29.0%) rise in suggestion adoption by DE technicians and a 44.3% (95% CI 43.2%, 45.4%) decrease in post-adoption edits.
      • Acknowledging limitations in before-and-after studies
      • Owing to confidentiality, the near-miss ratios relative to MEDIC are displayed
      • MEDIC’s reduction in near-miss events mitigates the need for pharmacist corrections and diminishes subsequent DE rework
      • It demands a lengthy period of evaluation and optimization, necessitating strong collaboration with DE technicians and pharmacists.
      • Discrepancies between the retrospective accuracy (95.1%) of MEDIC’s flagging function and its prospective performance highlight the complex nature of real-world applications.
      • Factors such as unpredictable human behavior, system limitations and data quality issues in a human-in-the-loop setting contribute to this variance.
      • it was less effective in detecting verb and dose form errors primarily due to incomplete data in DMedCat.
      • To begin, a key limitation is the absence of direct patient feedback on the AI-enhanced medication directions.
      • MEDIC primarily addresses electronic prescriptions, leaving other mediums such as fax, scanned documents or oral directives relatively unexplored.
      • These mediums, often processed manually, are more error prone
      • Last, the focus of this study on single-line medication directions, which represent the majority of prescriptions, also narrows its scope.
      • Multi-line and more-complex directions, which carry a higher safety risk, are areas ripe for future exploration
      • A formal analysis of these cost savings is an intriguing area of future research.
      • Its design, built upon mostly synthetically generated directions, along with publicly available datasets, eliminates any constraints on its applicability beyond Amazon Pharmacy.
      • Received 2023 Nov 16; Accepted 2024 Mar 20
      • 2024 Apr 25;30(6):1574–1582
      • this paper focuses on developing an AI solution aimed at improving the accuracy and quality of the DE phase in processing medication directions, consequently reducing near-miss events.
      • fine-tuned with 1.5 million pairs of prescriber medication directions and their corresponding, pharmacist-verified equivalents
      • closely match in BLEU and METEOR metrics, with a slight edge for T5-FineTuned (1.5M).
      • Notably, the best variant of Claude records 4.38 times (CI 3.13, 6.64) more near-misses than MEDIC.
      • both MEDIC and T5-FineTuned (1.5M) had a minimal occurrence of clinically severe near-misses, with no statistical difference between them (P = 0.58)
      • however, the best performing (ten-shot) version of Claude showed a notably higher frequency of clinically severe near-misses.
      • Errors by Claude (ten-shot) encompass various critical mistakes that could substantially endanger patient safety.
      • runtime efficiency as a proxy for service level agreement in a production environment
      • To evaluate the efficacy of MEDIC’s flagging function, we tested it on historically validated near-miss events returned for corrections by pharmacists.
      • MEDIC successfully flagged 95.1% of these errors
      • we have implemented MEDIC as a Health Insurance Portability and Accountability Act-compliant API
      • All of MEDIC’s components were built using Python and hosted utilizing Amazon Web Services cloud technology.
      • This includes custom data ingestion and preprocessing, training and fine-tuning.
      • in collaboration with the Amazon Pharmacy Engineering and Operations teams
      • if a DE technician either declined a suggestion or adopted it but made substantial edits, the relevant prescription (along with the outputs from all of MEDIC’s intermediate stages) was added to a human review queue (HRQ).
      • Additionally, prescriptions were sent to the HRQ if a suggestion, once adopted by DE technicians, subsequently led to a directions near-miss event.
      • The HRQ was periodically reviewed with the assistance of quality specialists to diagnose the source of any discrepancies.
      • updates were made to the DMedCat or to datasets such as DHL and PHL, and the various L libraries, and these updates were subsequently used to retrain AI-powered extraction.
      • The decision to conduct this in-production experimental assessment of MEDIC was made solely after the system met the required safety criteria during the retrospective evaluations.
      • This unique text normalization process applies a sequence of atomic, pattern-based transformations, each guided by one of hundreds of pharmacist-verification rules.
      • The guiding principle of this fine-tuning process is to construct an NER model capable of faithfully extracting information from the incoming direction exactly as the prescriber wrote, regardless of any errors present in the original direction.
      • Any potential corrections are left to the subsequent stage, semantic assembly and safety enforcement.
      • We then contrasted these entities with the medication catalog available in the third phase of semantic assembly and safety enforcement, granting us full control over these incorrect cases.
      • Initially, we manually label the set DH of approximately 1,000 historical directions with the assistance of pharmacy quality specialists
      • For each of the nine components previously discussed, we generate a library of its unique possible values as they appear in DHL.
      • In DHLA, we generated a new sample by first randomly selecting a pattern p from PHL.
      • Considering the high cost of manual labeling and the potential need for a larger labeled training dataset for BERT fine-tuning, we resorted to data augmentation.
      • Out of a total of 160,484 entities available across the 10,000 directions generated in the synthetically augmented test dataset DHLAT, only six were misclassified
      • The average precision, recall and F1 score all exceeded 0.99.
      • we found that an F1 score of 0.90 was attained with a reduced set of 5,000 augmented samples.
      • Notably, substantially larger augmentation sets (for example, 50,000 and 100,000) do not yield statistically significant performance variations across all evaluated metrics when compared to an augmentation size of 10,000 for DHLA.
      • we opted for Bayesian optimization for the MEDIC production implementation due to its efficient convergence.
      • These choices were the result of testing three main techniques: Bayesian optimization61, derivative-free-optimization62 and a simple grid search. All three approaches yielded similar parameters
      • Initially, the medication catalog is used to fill in any missing essential components in the direction.
      • Should any of these guardrails be triggered, MEDIC will immediately cease operation, opting not to generate a suggestion.
      • Incorporated as independent layers, they allow for easy integration, modification or decommissioning.
      • This precautionary measure is put in place because MEDIC is specifically trained and optimally performs on single-line prescriptions and may extract multiple values in multi-line directions.
      • The ultimate output of the flagging process is a Boolean variable that signals whether the two medication directions are equivalent or not.
      • The flagging model issues a warning of an incorrect dosage when the DE technician inputs ‘take two tablets’, rather than waiting for the completion of the entire direction.
      • Suppose the incoming direction reads, ‘take one tablet by mouth daily’.
      • it poses a challenge to track all real-time modifications and thus accurately measure flagging performance online.
      • we conduct a retrospective analysis on 795 historical directions near-miss events
      • We automated ingestion of these two sources using the RxNorm application programming interface (API) and our custom APIs, leading to a daily-updated comprehensive dataset, covering ~99% of Amazon Pharmacy medications.
      • we integrate new NDCs into the RxNorm from the daily-updated OpenFDA42 National Drug Code Directory
      • These data were then integrated with a third source, Amazon Pharmacy’s drug catalog, which is curated by domain experts, including pharmacists and certified technicians.
      • over 98% of medication directions are single-line, hence the study’s focus on this predominant category.
      • a random subsample of approximately 1.6 million single-line medication directions from a year’s worth of Amazon Pharmacy data
      • The DEval subset, including 1,200 samples, served for both NLP and human evaluations, whereas the DTest subset, with 20,000 samples, provided robustness check for NLP evaluations.
      • While models such as BERT and T5, featuring hundreds of millions of parameters, are classified as LLMs70 and meet the runtime requirements of our high-throughput pharmacy application
      • their newer counterparts (boasting tens to hundreds of billions of parameters, albeit with slower runtime and elevated inference costs)
      • GPU machines are used to execute Claude, while basic CPU machines are used for MEDIC and T5-FineTuned.
      • Unlike the latter models which have usage costs, MEDIC and T5-FineTuned are free and compatible with low-cost computing (CPU only).
      • modern LLMs such as Anthropic Claude v.2.1
      • We found that the confidence score produced by T5-FineTuned (1.5M) is misleadingly high
      • 4.36 (95% CI 1.44, 14.0) times more clinically relevant near-misses in MEDIC Active cases
      • The primary evaluation criterion here is the rate of suggestions with ‘critical errors’, defined as suggestions that would lead to a near-miss event in a real-world production environment if used by technicians.
      • Pharmacists further assessed the near-misses identified in this human review to gauge their clinical severity and potential patient harm
      • We assessed whether ChatGPT4 and Gemini Pro (Google Bard’s upgrade on 6 December 2023)48, accessed on 29 December 2023, could address the limitations identified in T5-FineTuned (1.5M) and Claude.
      • Most concerning, in examples 9 and 10, all or two models fabricate or misinterpret dosage information, respectively.
      • Our primary comparison metric was the rate of directions near-miss events23, defined as the proportion of directions deemed erroneous by the pharmacist-verification process and subsequently sent back to DE technicians for rectification.
      • secondary metrics such as (1) suggestion coverage, which represents the proportion of prescriptions for which a suggestion is generated; (2) adoption rate, the proportion of generated suggestions selected by DE technicians; and (3) edit ratio, which denotes the proportion of selected suggestions that were edited by DE technicians before finalization.
      • due to complexities associated with accurately replicating the then-active production system, it was excluded from our retrospective comparisons
      • In MEDIC, we address this challenge in part by confining the LLM’s operational scope and implementing a deterministic layer of guardrails empowered by validated pharmacy logic and gold standard data.
      • Certified pharmacy technicians are tasked with manually transcribing the prescribers’ intentions by referencing raw prescription data.
      • prescribers frequently communicate their directives using abbreviations, terminologies and pharmacy-specific jargon
      • the pharmacist sends back the prescription for correction, possibly necessitating communication with the prescribing healthcare provider for clarification or resolution before another PV step
      • an additional layer of scrutiny exists in the form of a patient safety team
      • Building trust in AI-generated suggestions and incorporating ongoing feedback are essential.
      • Future enhancements could involve integrating additional data sources such as notes, dispensing history and customer details to refine error detection.
      • The remaining datasets generated during the study cannot be made publicly available due to Health Insurance Portability and Accountability Act and Amazon policies.
      • code supporting the findings of this study is not publicly available due to copyright restrictions and is the property of Amazon Pharmacy.
      • All authors conducted this research during their employment at Amazon Pharmacy
      • Given MEDIC’s built-in safety constraints, which inhibit suggestions for around 20% of the cases
      • These guardrails, developed in collaboration with pharmacists and quality specialists, are tailored to enhance the operation of MEDIC.
      • This team is composed of pharmacists and pharmacy quality specialists, who are certified pharmacy technicians with specialized training in medication error evaluation.
      • These edits ranged from major revisions to subtler stylistic or formatting changes before proceeding to pharmacists for final review.
      • the default or preferred information (for example, the verb ‘chew’ instead of ‘take’)
    2. Source 2:

      Large language models for preventing medication direction errors in online pharmacies

      OrganizationAmazon, 2024Accessed Nov 16, 202616 Nov 2026

      Supporting excerpts (2)
      • We introduce MEDIC (medication direction copilot), a system that emulates the reasoning of pharmacists by prioritizing precise communication of core clinical components of a prescription, such as dosage and frequency.
      • Additionally, we tested MEDIC by deploying within the production system of an online pharmacy, and during this experimental period, it reduced near-miss events by 33% (CI 26%, 40%).
    3. Source 3:

      5 ways Amazon Pharmacy uses AI to make getting medications more convenient for customers

      OrganizationAmazon, Jan 24, 202424 Jan 2024Accessed Nov 16, 202616 Nov 2026

      Supporting excerpts (8)
      • said Alexandre Alves, senior principal engineer at Amazon Pharmacy.
      • In the past year, Amazon Pharmacy has doubled the number of customers it serves, and AI is helping the team to efficiently scale.
      • in most cases, prescriptions are typewritten and arrive via an electronic scribe service used by clinical teams.
      • we might find phrases such as “take by mouth,” or “take orally,” he said.
      • That model uses a process called “named entity recognition” to create a structure for the text, using categories such as “dose” and “frequency.”
      • Alves and his team used multiple, pre-trained models from Amazon Bedrock and Amazon SageMaker.
      • Every prescription is still reviewed by a pharmacist because provider guidance can be incorrect for reasons that AI cannot detect.
      • Amazon is able to increase order processing speed by 90%, and, most importantly, reduce the rate of human error.
    4. Source 4:

      An AI "copilot" can reduce prescription errors that put patients at risk

      IndependentStanford Graduate School of Business, Aug 12, 202512 Aug 2025By Sachin WaikarAccessed Nov 16, 202616 Nov 2026

      Supporting excerpts (17)
      • Mohsen Bayati, a professor of operations, information, and technology at Stanford Graduate School of Business
      • Daniel Tawfik, an assistant professor of pediatrics at Stanford Medicine
      • That mix of complexity and high stakes intrigued Bayati and Tawfik, who have previously collaborated on ways to make healthcare more efficient and safer.
      • With several collaborators at Amazon, Bayati developed an AI-based system for translating prescriptions with fewer errors.
      • a different, broader LLM trained on 1.5 million prescriptions performed better according to standard measures of translation accuracy.
      • at least 1.5 million preventable adverse events and an estimated $3.5 billion in costs per year in the U.S.
      • When the researchers initially tested standard LLMs on a set of prescription data from Amazon Pharmacy, they had higher error rates translating prescriptions than the standard rule-based methods used by pharmacies.
      • “But that’s not the right metric,” Bayati says. “The right one from a clinical point of view is which outputs are safer for patients.”
      • “These near-misses can be used as a proxy for errors,” Bayati notes.
      • In a complex, high-stakes domain like medicine, we really need to have a human in the loop. There are still important things that a pharmacist may catch that an AI system can’t.
      • And we don’t have a regulatory framework for what happens if AI gets something wrong.
      • We realized we had to combine approaches into something that takes the benefits of LLMs but has guardrails based on pharmacy guidelines
      • For any AI technology, you need very close collaboration between clinicians and the technical team, like the data scientists and machine-learning engineers, along with the product team
      • the models aren’t penalized much during their training for small errors like changing a dosage schedule from weekly to daily
      • A customized language model designed by Stanford researchers made fewer prescription-instruction errors than standard systems.
      • MEDIC reduced near-misses by about 33%, soundly beating the existing system.
      • it can be difficult to incentivize that close collaboration or create the right cultural training for it.
    5. Source 5:

      Large language models for preventing medication direction errors in online pharmacies (PSNet summary)

      IndependentAHRQ Patient Safety Network, Jun 5, 20245 Jun 2024Accessed Nov 16, 202616 Nov 2026

      Supporting excerpts (1)
      • The researchers tested MEDIC within an existing pharmacy workflow and found that the tool led to a 3% reduction in direction-related near miss events.
    6. Source 6:

      Clearer sigs can reduce errors in e-prescribing

      IndependentDrug Topics, Mar 15, 201815 Mar 2018Accessed Nov 16, 202616 Nov 2026

      Supporting excerpts (2)
      • A study published in the Journal of Managed Care and Specialty Pharmacy reviewed 25,000 e-prescriptions, issued by 22,152 community-based prescribers across the United States
      • A simple instruction such as “take one tablet by mouth once daily” can be expressed in hundreds of ways and wording proved problematic in 10% of the Sigs studied.
    7. Source 7:

      Surescripts report highlights data quality, automation improvements in e-prescribing

      IndependentHealthcare Innovation, Mar 4, 20264 Mar 2026Accessed Nov 16, 202616 Nov 2026

      Supporting excerpts (2)
      • Surescripts has deployed the machine learning-powered Sig IQ, which translates free-text Sigs into the Structured & Codified Sig format, a standardized structure that removes ambiguity.
      • In 2025, 12.7% of all e-prescribing transactions were augmented by Sig IQ
    8. Source 8:

      How Carepoint Pharmacy scaled prescription volume without adding headcount

      Partner or vendorTJM LabsAccessed Nov 16, 202616 Nov 2026

      Supporting excerpts (3)
      • Carepoint deployed TJM Labs AI agents directly within its existing Scriptly workflow
      • Carepoint reassigned seven full-time employees from prescription entry into departments where they contribute more directly to patient care and revenue generation.
      • Prescription accuracy now averages approximately 99%, reducing rework and pharmacist intervention.
    9. Source 9:

      Gen AI Applications in Amazon Pharmacy

      OrganizationICML, 2025By Yifu Chen and Cristobal PaisAccessed Nov 16, 202616 Nov 2026

      Supporting excerpts (3)
      • We present two innovative applications of Large Language Models (LLMs), at Amazon Pharmacy: (1) an AI assistant for customer support and (2) a medication direction copilot for patient safety.
      • MEDIC (medication direction copilot), a system that emulates pharmacist reasoning by fine-tuning an LLM with a compact set of expert-annotated directions to accurately extract and communicate core prescription components.
      • Production deployment demonstrated a 33% reduction in medication direction errors.
    10. Source 10:

      How Amazon Pharmacy is using AI to deliver medications faster as it expands same-day delivery

      IndependentFierce Healthcare, Mar 26, 202426 Mar 2024By Heather LandiAccessed Nov 16, 202616 Nov 2026Archived copy

      Supporting excerpts (6)
      • Dr. Vin Gupta, chief medical officer for Amazon Pharmacy and a pulmonologist
      • One physician might write “three times a day” as far as how frequently the patient should take the medication, while another physician might write, “t.i.d.,’ Gupta explained.
      • It’s on the processing piece that we are really leaning heavily into generative AI
      • We’re trying to remove as much operator error and decoding of a script as possible to process these scripts as fast as possible.
      • The use of generative AI has helped Amazon Pharmacy increase processing speed by more than 90%, according to Gupta.
      • According to Downes, no prescription leaves a fulfillment center without a pharmacist having verified that it includes the right medicine, strength, dosage, quantity, and address label.

    More in Document Intelligence

    View all