The life of a prescription at Amazon Pharmacy

From pricing estimation and regulatory compliance to inventory management and chatbot assistants, machine learning models help Amazon Pharmacy customers stay healthy and save time and money.

Pharmacies play a vital role in ensuring patients’ health, but the process of dispensing medications is far more complex than it may appear. At Amazon Pharmacy, we are using artificial intelligence (AI) and cutting-edge technologies to remove this complexity and improve patients’ experiences.

The pharmacy challenge

When a prescription arrives at a pharmacy, its details must be entered into the pharmacy's software system. Then, a licensed pharmacist reviews the prescription to verify the patient's information, check for potential drug interactions or allergies, and confirm that the prescribed medication, dosage, and instructions are appropriate and accurate.

This process is susceptible to errors — even if the prescription arrives electronically. A U.S. study estimated that there are approximately 51.5 million dispensing errors annually in community pharmacies, with a meta-analysis supporting an error rate of around 1.5%.

Related content
Amazon Health Services' Sunita Mishra and Columbia University’s Katrina Armstrong discuss technology's potential role in medical settings.

Pharmacies must also handle billing and insurance claims for their patients. These are involved calculations based on patients’ specific insurance policies, their copay responsibilities, and the rates that the pharmacy has negotiated with different insurance providers. In fact, just identifying a patient's insurance can be challenging. The result is that patients often do not know the prices they will pay for their medications until the end of the process, when they’re picking up their prescriptions at a retail pharmacy or checking out online.

After a prescription has been validated and the purchase completed, the pharmacy staff must locate the specific medication in their inventory. However, it's possible that at this stage, the prescribed medication, the required strength, or the preferred brand may no longer be available. Providing a substitute could necessitate contacting the prescribing physician again for approval. Additionally, depending on the substitution, the billing and insurance process may need to be re-initiated to account for any changes in pricing or coverage.

Once the medication is ready for dispensing, the pharmacist provides the patient with detailed instructions on how to properly take it. Patients may also have questions regarding their insurance coverage or costs. However, these conversations often take place in public areas, which can be uncomfortable for patients who have personal or sensitive questions.

Finally, patients need convenient access to pharmacists at any time, day or night. This allows patients to report how they are feeling while taking their medications, which can help pharmacists provide better guidance and support throughout the treatment process.

The AI-powered pharmacy

Amazon Pharmacy uses large language models (LLMs) to enhance the accuracy, safety, and speed of prescription processing. First, we use LLMs to transcribe raw prescription data into structured, standardized formats that are seamlessly processed by software and more easily understood by patients. For example, medical abbreviations like "PRN" and "QID" are transformed into their full-text equivalents, such as "take as needed" and "take four times a day," respectively.

After standardizing the prescription data, the system performs a validation step that includes checking the medication names, dosage forms, strengths, and directions for use against an industry database. After validation, all prescriptions are still carefully reviewed and verified by licensed pharmacists. By leveraging this automated process, Amazon Pharmacy has reduced the number of near-miss events (potential medication errors) by 50% and improved processing speed by up to 90%. This allows our pharmacists to focus their time and attention on critical tasks, such as providing personalized care and addressing complex medication-related issues.

Pharmacy.png
The AI workflow at Amazon Pharmacy.

Amazon Pharmacy understands the importance of price transparency for customers. When a patient is using insurance to cover the cost of medication, Amazon Pharmacy will first try to obtain the exact price directly from the insurance provider. However, if this real-time pricing information is not available, Amazon Pharmacy will provide an estimated out-of-pocket cost for the patient's copay, without requiring the customer to go through the entire checkout process first.

To generate accurate price estimates, Amazon Pharmacy uses an ensemble of decision-tree-based models. These models take into account factors such as historical claims data (time series features) and static information such as the specific medication, the number-of-days' supply, and the quantity prescribed. By providing upfront pricing information, either the exact cost or a reliable estimate, Amazon Pharmacy aims to increase transparency and help patients understand their out-of-pocket expenses before committing to purchases. Additionally, Amazon Pharmacy searches for applicable industry coupons and automatically applies them to orders. We also use ML to validate the patient's insurance registration and claim requests to insurance providers.

Amazon is known for its extensive logistics and fulfillment capabilities, and Amazon Pharmacy takes advantage of Amazon's vast network of same-day and local delivery facilities, as well as innovative transportation methods like Prime Air drones. Additionally, Amazon Pharmacy employs specialized automation technologies, such as robotic vial-filling systems, to streamline the medication-dispensing process, enabling prompt delivery of medications to patients across the nation.

Beyond the physical logistics infrastructure, Amazon Pharmacy has developed its own order fulfillment system to handle complex medication-routing and -dispensing logic, while ensuring compliance with over 160 different pharmacy regulatory bodies across the United States. For example, if a medication for an order is no longer available at the closest fulfillment center, Amazon Pharmacy can identify the next best eligible facility to fulfill the order, even if it's in a different state, provided that the relevant state regulations allow for such cross-state fulfillment.

Related content
ARA recipient Marinka Zitnik is focused on how machine learning can enable accurate diagnoses and the development of new treatments and therapies.

Moreover, Amazon Pharmacy's order fulfillment algorithm takes into account regional variations in insurance eligibility. In such cases, Amazon Pharmacy will first validate that there are no changes to the patient's copay. If changes are required, Amazon Pharmacy will work with the insurance providers to clarify the benefits. To accomplish all of this, Amazon Pharmacy's order fulfillment solution employs a combination of operations research techniques, such as optimization solvers, and deep-learning models such as variational autoencoders and diffusion models. These models help simulate different scenarios and optimize the fulfillment process to ensure efficient and compliant delivery of medications to patients.

Amazon Pharmacy also introduced personalized AI-powered chatbots to assist users. These virtual assistants can answer frequently asked questions about Amazon Pharmacy, such as how to enroll in the service. In a first for the industry, Amazon Pharmacy's chatbot also provides personalized support, allowing patients to ask questions about their medication orders, delivery status, prescription transfers, and inventory availability. If a patient prefers, there is always 24/7 access to direct pharmacist support and the customer care team.

Implementing a personalized AI chatbot in the healthcare setting is a complex task. It's crucial to safeguard patients' privacy and ensure the highest level of accuracy, avoiding LLM hallucinations. To address these challenges, Amazon Pharmacy has enhanced the typical retrieval-augmented generation (RAG) approach used for LLM chatbots. The enhancements include input and output guardrails, the use of ensembles of specialized (mini) AI models, and a continuous model improvement process through reinforcement learning using human feedback (RLHF).

The digital pharmacy counter

Amazon Pharmacy is leveraging ML and optimization algorithms to streamline the complex process of dispensing medications. By addressing long-standing challenges such as data entry errors, lack of price transparency, intelligent nationwide medication fulfillment, and personalized-AI-based experiences, Amazon Pharmacy enables patients to save time, save money, and stay healthy.

Related content
Gari Clifford, the chair of the Department of Biomedical Informatics at Emory University and an Amazon Research Award recipient, wants to transform healthcare.

For example, it is not uncommon for medications to go into short-term back order (STBO), especially new medications entering the market, as was recently the case with the GLP-1 line of medications used for diabetes and weight loss. Amazon Pharmacy’s intelligent-fulfillment solution has enabled an 85% decrease in delivery estimate misses for unforeseen reasons, including STBOs.

The AI-powered Amazon Pharmacy assistant helps customers navigate the complexities of the pharmacy industry, providing 24/7 assistance on topics like prescription tracking, insurance coverage, medication availability, and cost-saving strategies. Half of the customers who interact with the assistant don't require additional human support, which saves them time and effort. (For customers who still need assistance, Amazon Pharmacy likewise provides 24/7 access to pharmacist support.) Additionally, the assistant provides real-time medication transfer or shipment status updates in response to patient queries, handling follow-up questions to recommend next steps.

For all the success of our AI-based systems, however, Amazon Pharmacy’s research and engineering teams remain hard at work. We will continue pushing the envelope in scaling medication dispensing, improving personalized AI-based chatbots and assistants, and transitioning toward a longitudinal pharmacy that is proactively looking out for patients.

Research areas

Related content

US, WA, Bellevue
We are seeking a passionate, talented, and inventive individual to join the Applied AI team and help build industry-leading technologies that customers will love. This team offers a unique opportunity to make a significant impact on the customer experience and contribute to the design, architecture, and implementation of a cutting-edge product. The mission of the Applied AI team is to enable organizations within Worldwide Amazon.com Stores to accelerate the adoption of AI technologies across various parts of our business. We are looking for a Senior Applied Scientist to join our Applied AI team to work on LLM-based solutions. On our team you will push the boundaries of ML and Generative AI techniques to scale the inputs for hundreds of billions of dollars of annual revenue for our eCommerce business. If you have a passion for AI technologies, a drive to innovate and a desire to make a meaningful impact, we invite you to become a valued member of our team. You will be responsible for developing and maintaining the systems and tools that enable us to accelerate knowledge operations and work in the intersection of Science and Engineering. You will push the boundaries of ML and Generative AI techniques to scale the inputs for hundreds of billions of dollars of annual revenue for our eCommerce business. If you have a passion for AI technologies, a drive to innovate and a desire to make a meaningful impact, we invite you to become a valued member of our team. We are seeking an experienced Scientist who combines superb technical, research, analytical and leadership capabilities with a demonstrated ability to get the right things done quickly and effectively. This person must be comfortable working with a team of top-notch developers and collaborating with our research teams. We’re looking for someone who innovates, and loves solving hard problems. You will be expected to have an established background in building highly scalable systems and system design, excellent project management skills, great communication skills, and a motivation to achieve results in a fast-paced environment. You should be somebody who enjoys working on complex problems, is customer-centric, and feels strongly about building good software as well as making that software achieve its operational goals.
IN, KA, Bengaluru
Do you want to lead the development of advanced machine learning systems that protect millions of customers and power a trusted global eCommerce experience? Are you passionate about modeling terabytes of data, solving highly ambiguous fraud and risk challenges, and driving step-change improvements through scientific innovation? If so, the Amazon Buyer Risk Prevention (BRP) Machine Learning team may be the right place for you. We are seeking a Senior Applied Scientist to define and drive the scientific direction of large-scale risk management systems that safeguard millions of transactions every day. In this role, you will lead the design and deployment of advanced machine learning solutions, influence cross-team technical strategy, and leverage emerging technologies—including Generative AI and LLMs—to build next-generation risk prevention platforms. Key job responsibilities Lead the end-to-end scientific strategy for large-scale fraud and risk modeling initiatives Define problem statements, success metrics, and long-term modeling roadmaps in partnership with business and engineering leaders Design, develop, and deploy highly scalable machine learning systems in real-time production environments Drive innovation using advanced ML, deep learning, and GenAI/LLM technologies to automate and transform risk evaluation Influence system architecture and partner with engineering teams to ensure robust, scalable implementations Establish best practices for experimentation, model validation, monitoring, and lifecycle management Mentor and raise the technical bar for junior scientists through reviews, technical guidance, and thought leadership Communicate complex scientific insights clearly to senior leadership and cross-functional stakeholders Identify emerging scientific trends and translate them into impactful production solutions
US, MA, Boston
The Artificial General Intelligence (AGI) team is seeking a dedicated, skilled, and innovative Applied Scientist with a robust background in machine learning, statistics, quality assurance, auditing methodologies, and automated evaluation systems to ensure the highest standards of data quality, to build industry-leading technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As part of the AGI team, an Applied Scientist will collaborate closely with core scientist team developing Amazon Nova models. They will lead the development of comprehensive quality strategies and auditing frameworks that safeguard the integrity of data collection workflows. This includes designing auditing strategies with detailed SOPs, quality metrics, and sampling methodologies that help Nova improve performances on benchmarks. The Applied Scientist will perform expert-level manual audits, conduct meta-audits to evaluate auditor performance, and provide targeted coaching to uplift overall quality capabilities. A critical aspect of this role involves developing and maintaining LLM-as-a-Judge systems, including designing judge architectures, creating evaluation rubrics, and building machine learning models for automated quality assessment. The Applied Scientist will also set up the configuration of data collection workflows and communicate quality feedback to stakeholders. An Applied Scientist will also have a direct impact on enhancing customer experiences through high-quality training and evaluation data that powers state-of-the-art LLM products and services. A day in the life An Applied Scientist with the AGI team will support quality solution design, conduct root cause analysis on data quality issues, research new auditing methodologies, and find innovative ways of optimizing data quality while setting examples for the team on quality assurance best practices and standards. Besides theoretical analysis and quality framework development, an Applied Scientist will also work closely with talented engineers, domain experts, and vendor teams to put quality strategies and automated judging systems into practice.
US, MA, Boston
The Artificial General Intelligence (AGI) team is seeking a dedicated, skilled, and innovative Applied Scientist with a robust background in machine learning, statistics, quality assurance, auditing methodologies, and automated evaluation systems to ensure the highest standards of data quality, to build industry-leading technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As part of the AGI team, an Applied Scientist will collaborate closely with core scientist team developing Amazon Nova models. They will lead the development of comprehensive quality strategies and auditing frameworks that safeguard the integrity of data collection workflows. This includes designing auditing strategies with detailed SOPs, quality metrics, and sampling methodologies that help Nova improve performances on benchmarks. The Applied Scientist will perform expert-level manual audits, conduct meta-audits to evaluate auditor performance, and provide targeted coaching to uplift overall quality capabilities. A critical aspect of this role involves developing and maintaining LLM-as-a-Judge systems, including designing judge architectures, creating evaluation rubrics, and building machine learning models for automated quality assessment. The Applied Scientist will also set up the configuration of data collection workflows and communicate quality feedback to stakeholders. An Applied Scientist will also have a direct impact on enhancing customer experiences through high-quality training and evaluation data that powers state-of-the-art LLM products and services. A day in the life An Applied Scientist with the AGI team will support quality solution design, conduct root cause analysis on data quality issues, research new auditing methodologies, and find innovative ways of optimizing data quality while setting examples for the team on quality assurance best practices and standards. Besides theoretical analysis and quality framework development, an Applied Scientist will also work closely with talented engineers, domain experts, and vendor teams to put quality strategies and automated judging systems into practice.
US, MA, Boston
The Artificial General Intelligence (AGI) team is seeking a dedicated, skilled, and innovative Applied Scientist with a robust background in machine learning, statistics, quality assurance, auditing methodologies, and automated evaluation systems to ensure the highest standards of data quality, to build industry-leading technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As part of the AGI team, an Applied Scientist will collaborate closely with core scientist team developing Amazon Nova models. They will lead the development of comprehensive quality strategies and auditing frameworks that safeguard the integrity of data collection workflows. This includes designing auditing strategies with detailed SOPs, quality metrics, and sampling methodologies that help Nova improve performances on benchmarks. The Applied Scientist will perform expert-level manual audits, conduct meta-audits to evaluate auditor performance, and provide targeted coaching to uplift overall quality capabilities. A critical aspect of this role involves developing and maintaining LLM-as-a-Judge systems, including designing judge architectures, creating evaluation rubrics, and building machine learning models for automated quality assessment. The Applied Scientist will also set up the configuration of data collection workflows and communicate quality feedback to stakeholders. An Applied Scientist will also have a direct impact on enhancing customer experiences through high-quality training and evaluation data that powers state-of-the-art LLM products and services. A day in the life An Applied Scientist with the AGI team will support quality solution design, conduct root cause analysis on data quality issues, research new auditing methodologies, and find innovative ways of optimizing data quality while setting examples for the team on quality assurance best practices and standards. Besides theoretical analysis and quality framework development, an Applied Scientist will also work closely with talented engineers, domain experts, and vendor teams to put quality strategies and automated judging systems into practice.
US, MA, Boston
The Artificial General Intelligence (AGI) team is seeking a dedicated, skilled, and innovative Applied Scientist with a robust background in machine learning, statistics, quality assurance, auditing methodologies, and automated evaluation systems to ensure the highest standards of data quality, to build industry-leading technology with Large Language Models (LLMs) and multimodal systems. Key job responsibilities As part of the AGI team, an Applied Scientist will collaborate closely with core scientist team developing Amazon Nova models. They will lead the development of comprehensive quality strategies and auditing frameworks that safeguard the integrity of data collection workflows. This includes designing auditing strategies with detailed SOPs, quality metrics, and sampling methodologies that help Nova improve performances on benchmarks. The Applied Scientist will perform expert-level manual audits, conduct meta-audits to evaluate auditor performance, and provide targeted coaching to uplift overall quality capabilities. A critical aspect of this role involves developing and maintaining LLM-as-a-Judge systems, including designing judge architectures, creating evaluation rubrics, and building machine learning models for automated quality assessment. The Applied Scientist will also set up the configuration of data collection workflows and communicate quality feedback to stakeholders. An Applied Scientist will also have a direct impact on enhancing customer experiences through high-quality training and evaluation data that powers state-of-the-art LLM products and services. A day in the life An Applied Scientist with the AGI team will support quality solution design, conduct root cause analysis on data quality issues, research new auditing methodologies, and find innovative ways of optimizing data quality while setting examples for the team on quality assurance best practices and standards. Besides theoretical analysis and quality framework development, an Applied Scientist will also work closely with talented engineers, domain experts, and vendor teams to put quality strategies and automated judging systems into practice.
GB, London
We are looking for a Senior Economist to work on exciting and challenging business problems related to Amazon Retail’s worldwide product assortment. You will build innovative solutions based on econometrics, machine learning, and experimentation. You will be part of a interdisciplinary team of economists, product managers, engineers, and scientists, and your work will influence finance and business decisions affecting Amazon’s vast product assortment globally. If you have an entrepreneurial spirit, you know how to deliver results fast, and you have a deeply quantitative, highly innovative approach to solving problems, and long for the opportunity to build pioneering solutions to challenging problems, we want to talk to you. Key job responsibilities * Work on a challenging problem that has the potential to significantly impact Amazon’s business position * Develop econometric models and experiments to measure the customer and financial impact of Amazon’s product assortment * Collaborate with other scientists at Amazon to deliver measurable progress and change * Influence business leaders based on empirical findings
IN, KA, Bengaluru
Do you want to join an innovative team of scientists who use machine learning and statistical techniques to create state-of-the-art solutions for providing better value to Amazon’s customers? Do you want to build and deploy advanced algorithmic systems that help optimize millions of transactions every day? Are you excited by the prospect of analyzing and modeling terabytes of data to solve real world problems? Do you like to own end-to-end business problems/metrics and directly impact the profitability of the company? Do you like to innovate and simplify? If yes, then you may be a great fit to join the Machine Learning and Data Sciences team for India Consumer Businesses. If you have an entrepreneurial spirit, know how to deliver, love to work with data, are deeply technical, highly innovative and long for the opportunity to build solutions to challenging problems that directly impact the company's bottom-line, we want to talk to you. Major responsibilities - Use machine learning and analytical techniques to create scalable solutions for business problems - Analyze and extract relevant information from large amounts of Amazon’s historical business data to help automate and optimize key processes - Design, development, evaluate and deploy innovative and highly scalable models for predictive learning - Research and implement novel machine learning and statistical approaches - Work closely with software engineering teams to drive real-time model implementations and new feature creations - Work closely with business owners and operations staff to optimize various business operations - Establish scalable, efficient, automated processes for large scale data analyses, model development, model validation and model implementation - Mentor other scientists and engineers in the use of ML techniques Key job responsibilities Use machine learning and analytical techniques to create scalable solutions for business problems Analyze and extract relevant information from large amounts of Amazon’s historical business data to help automate and optimize key processes Design, develop, evaluate and deploy, innovative and highly scalable ML models Work closely with software engineering teams to drive real-time model implementations Work closely with business partners to identify problems and propose machine learning solutions Establish scalable, efficient, automated processes for large scale data analyses, model development, model validation and model maintenance Work proactively with engineering teams and product managers to evangelize new algorithms and drive the implementation of large-scale complex ML models in production Leading projects and mentoring other scientists, engineers in the use of ML techniques About the team International Machine Learning Team is responsible for building novel ML solutions that attack India first (and other Emerging Markets across MENA and LatAm) problems and impact the bottom-line and top-line of India business. Learn more about our team from https://www.amazon.science/working-at-amazon/how-rajeev-rastogis-machine-learning-team-in-india-develops-innovations-for-customers-worldwide
EG, Cairo
Are you a MS or PhD student interested in a 2026 internship in the field of machine learning, deep learning, generative AI, large language models and speech technology, robotics, computer vision, optimization, operations research, quantum computing, automated reasoning, or formal methods? If so, we want to hear from you! We are looking for students interested in using a variety of domain expertise to invent, design and implement state-of-the-art solutions for never-before-solved problems. You can find more information about the Amazon Science community as well as our interview process via the links below; https://www.amazon.science/ https://amazon.jobs/content/en/career-programs/university/science https://amazon.jobs/content/en/how-we-hire/university-roles/applied-science Key job responsibilities As an Applied Science Intern, you will own the design and development of end-to-end systems. You’ll have the opportunity to write technical white papers, create roadmaps and drive production level projects that will support Amazon Science. You will work closely with Amazon scientists and other science interns to develop solutions and deploy them into production. You will have the opportunity to design new algorithms, models, or other technical solutions whilst experiencing Amazon’s customer focused culture. The ideal intern must have the ability to work with diverse groups of people and cross-functional teams to solve complex business problems. A day in the life At Amazon, you will grow into the high impact person you know you’re ready to be. Every day will be filled with developing new skills and achieving personal growth. How often can you say that your work changes the world? At Amazon, you’ll say it often. Join us and define tomorrow. Some more benefits of an Amazon Science internship include; • All of our internships offer a competitive stipend/salary • Interns are paired with an experienced manager and mentor(s) • Interns receive invitations to different events such as intern program initiatives or site events • Interns can build their professional and personal network with other Amazon Scientists • Interns can potentially publish work at top tier conferences each year About the team Applicants will be reviewed on a rolling basis and are assigned to teams aligned with their research interests and experience prior to interviews. Start dates are available throughout the year and durations can vary in length from 3-6 months for full time internships. This role may available across multiple locations in the EMEA region (Austria, Estonia, France, Germany, Ireland, Israel, Italy, Jordan, Luxembourg, Netherlands, Poland, Romania, Spain, South Africa, UAE, and UK). Please note these are not remote internships.
US, CA, San Diego
We are looking for detail-oriented, organized, and responsible individuals who are eager to learn how to apply their macroeconomics and forecasting skillsets to solve real world problems. The intern will work in the area of forecasting, developing models to improve the success of new product launches in Private Brands. Our PhD Economist Internship Program offers hands-on experience in applied economics, supported by mentorship, structured feedback, and professional development. Interns work on real business and research problems, building skills that prepare them for full-time economist roles at Amazon and beyond. You will learn how to build data sets and perform applied econometric analysis collaborating with economists, scientists, and product managers. These skills will translate well into writing applied chapters in your dissertation and provide you with work experience that may help you with placement. These are full-time positions at 40 hours per week, with compensation being awarded on an hourly basis About the team The Amazon Private Brands Intelligence team applies Machine Learning, Statistics and Econometrics/economics to solve high-impact business problems, develop prototypes for Amazon-scale science solutions, and optimize key business functions of Amazon Private Brands and other Amazon orgs. We are an interdisciplinary team, using science and technology and leveraging the strengths of engineers and scientists to build solutions for some of the toughest business problems at Amazon, covering areas such as pricing, discovery, negotiation, forecasting, supply chain and product selection/development.