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, Seattle
This role will contribute to developing the Economics and Science products and services in the Fee domain, with specialization in supply chain systems and fees. Through the lens of economics, you will develop causal links for how Amazon, Sellers and Customers interact. You will be a key and senior scientist, advising Amazon leaders how to price our services. You will work on developing frameworks and scalable, repeatable models supporting optimal pricing and policy in the two-sided marketplace that is central to Amazon's business. The pricing for Amazon services is complex. You will partner with science and technology teams across Amazon including Advertising, Supply Chain, Operations, Prime, Consumer Pricing, and Finance. We are looking for an experienced Economist to improve our understanding of seller Economics, enhance our ability to estimate the causal impact of fees, and work with partner teams to design pricing policy changes. In this role, you will provide guidance to scientists to develop econometric models to influence our fee pricing worldwide. You will lead the development of causal models to help isolate the impact of fee and policy changes from other business actions, using experiments when possible, or observational data when not. Key job responsibilities The ideal candidate will have extensive Economics knowledge, demonstrated strength in practical and policy relevant structural econometrics, strong collaboration skills, proven ability to lead highly ambiguous and large projects, and a drive to deliver results. They will work closely with Economists, Data / Applied Scientists, Strategy Analysts, Data Engineers, and Product leads to integrate economic insights into policy and systems production. Familiarity with systems and services that constitute seller supply chains is a plus but not required. About the team The Stores Economics and Sciences team is a central science team that supports Amazon's Retail and Supply Chain leadership. We tackle some of Amazon's most challenging economics and machine learning problems, where our mandate is to impact the business on massive scale.
US, WA, Seattle
WW Amazon Stores Finance Science (ASFS) works to leverage science and economics to drive improved financial results, foster data backed decisions, and embed science within Finance. ASFS is focused on developing products that empower controllership, improve business decisions and financial planning by understanding financial drivers, and innovate science capabilities for efficiency and scale. We are looking for a data scientist to lead high visibility initiatives for forecasting Amazon Stores' financials. You will develop new science-based forecasting methodologies and build scalable models to improve financial decision making and planning for senior leadership up to VP and SVP level. You will build new ML and statistical models from the ground up that aim to transform financial planning for Amazon Stores. We prize creative problem solvers with the ability to draw on an expansive methodological toolkit to transform financial decision-making with science. The ideal candidate combines data-science acumen with strong business judgment. You have versatile modeling skills and are comfortable owning and extracting insights from data. You are excited to learn from and alongside seasoned scientists, engineers, and business leaders. You are an excellent communicator and effectively translate technical findings into business action. Key job responsibilities Demonstrating thorough technical knowledge, effective exploratory data analysis, and model building using industry standard ML models Working with technical and non-technical stakeholders across every step of science project life cycle Collaborating with finance, product, data engineering, and software engineering teams to create production implementations for large-scale ML models Innovating by adapting new modeling techniques and procedures Presenting research results to our internal research community
IN, KA, Bengaluru
RBS (Retail Business Services) Tech team works towards enhancing the customer experience (CX) and their trust in product data by providing technologies to find and fix Amazon CX defects at scale. Our platforms help in improving the CX in all phases of customer journey, including selection, discoverability & fulfilment, buying experience and post-buying experience (product quality and customer returns). The team also develops GenAI platforms for automation of Amazon Stores Operations. As a Sciences team in RBS Tech, we focus on foundational ML research and develop scalable state-of-the-art ML solutions to solve the problems covering customer experience (CX) and Selling partner experience (SPX). We work to solve problems related to multi-modal understanding (text and images), task automation through multi-modal LLM Agents, supervised and unsupervised techniques, multi-task learning, multi-label classification, aspect and topic extraction for Customer Anecdote Mining, image and text similarity and retrieval using NLP and Computer Vision for product groupings and identifying duplicate listings in product search results. Key job responsibilities As an Research Scientist, you will be responsible to design and deploy scalable GenAI, NLP and Computer Vision solutions that will impact the content visible to millions of customer and solve key customer experience issues. You will develop novel LLM, deep learning and statistical techniques for task automation, text processing, image processing, pattern recognition, and anomaly detection problems. You will define the research and experiments strategy with an iterative execution approach to develop AI/ML models and progressively improve the results over time. You will partner with business and engineering teams to identify and solve large and significantly complex problems that require scientific innovation. You will help the team leverage your expertise, by coaching and mentoring. You will contribute to the professional development of colleagues, improving their technical knowledge and the engineering practices. You will independently as well as guide team to file for patents and/or publish research work where opportunities arise. The RBS org deals with problems that are directly related to the selling partners and end customers and the ML team drives resolution to organization level problems. Therefore, the Research Scientist role will impact the large product strategy, identifies new business opportunities and provides strategic direction which is very exciting.
US, WA, Bellevue
We are looking for detail-oriented, organized, and responsible individuals who are eager to learn how to apply their causal inference and/or structural econometrics skillsets to solve real world problems. The intern will work in the area of Economics Intelligence in Amazon Returns and Recommerce Technology and Innovation and develop new, data-driven solutions to support the most critical components of this rapidly scaling team. 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 WWRR Economics Intelligence (RREI) team brings together Economists, Data Scientists, and Business Intelligence Engineers experts to delivers economic solutions focused on forecasting, causality, attribution, customer behavior for returns, recommerce, and sustainability domains.
US, WA, Bellevue
We are looking for detail-oriented, organized, and responsible individuals who are eager to learn how to apply their causal inference and/or structural econometrics skillsets to solve real world problems. The intern will work in the area of Economics Intelligence in Amazon Returns and Recommerce Technology and Innovation and develop new, data-driven solutions to support the most critical components of this rapidly scaling team. 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 WWRR Economics Intelligence (RREI) team brings together Economists, Data Scientists, and Business Intelligence Engineers experts to delivers economic solutions focused on forecasting, causality, attribution, customer behavior for returns, recommerce, and sustainability domains.
US, WA, Seattle
Amazon has co-founded and signed The Climate Pledge, a commitment to reach net zero carbon by 2040. As a team, we leverage GenAI, sensors, smart home devices, cloud services, material science, and Alexa to build products that have a meaningful impact for customers and the climate. In alignment with this bold corporate goal, the Amazon Devices & Services organization is looking for a passionate, talented, and inventive Senior Applied Scientist to help build revolutionary products with potential for major societal impact. Great candidates for this position will have expertise in the areas of agentic AI applications, deep learning, time series analysis, LLMs, and multimodal systems. This includes experience designing autonomous AI agents that can reason, plan, and execute multi-step tasks, building tool-augmented LLM systems with access to external APIs and data sources, implementing multi-agent orchestration, and developing RAG architectures that combine LLMs with domain-specific knowledge bases. You will strive for simplicity and creativity, demonstrating high judgment backed by statistical proof. Key job responsibilities As a Senior Applied Scientist on the Energy Science team, you'll design and deploy agentic AI systems that autonomously analyze data, plan solutions, and execute recommendations. You'll build multi-agent architectures where specialized AI agents coordinate to solve complex optimization problems, and develop tool-augmented LLM applications that integrate with external data sources and APIs to deliver context-aware insights. Your work involves creating multimodal AI systems that synthesize diverse data streams, while implementing RAG pipelines that ground large language models in domain-specific knowledge bases. You'll apply advanced machine learning and deep learning techniques to time series analysis, forecasting, and pattern recognition. Beyond technical innovation, you'll drive end-to-end product development from research through production deployment, collaborating with cross-functional teams to translate AI capabilities into customer experiences. You'll establish rigorous experimentation frameworks to validate model performance and measure business impact, building AI-driven products with potential for major societal impact.
US, WA, Seattle
Innovators wanted! Are you an entrepreneur? A builder? A dreamer? This role is part of an Amazon Special Projects team that takes the company’s Think Big leadership principle to the next level. We focus on creating entirely new products and services with a goal of positively impacting the lives of our customers. No industries or subject areas are out of bounds. If you’re interested in innovating at scale to address big challenges in the world, this is the team for you. As a Research Scientist, you will work with a unique and gifted team developing exciting products for consumers and collaborate with cross-functional teams. Our team rewards intellectual curiosity while maintaining a laser-focus in bringing products to market. Competitive candidates are responsive, flexible, and able to succeed within an open, collaborative, entrepreneurial, startup-like environment. At the intersection of both academic and applied research in this product area, you have the opportunity to work together with some of the most talented scientists, engineers, and product managers. Here at Amazon, we embrace our differences. We are committed to furthering our culture of inclusion. We have thirteen employee-led affinity groups, reaching 40,000 employees in over 190 chapters globally. We are constantly learning through programs that are local, regional, and global. Amazon’s culture of inclusion is reinforced within our 16 Leadership Principles, which remind team members to seek diverse perspectives, learn and be curious, and earn trust. Our team highly values work-life balance, mentorship and career growth. We believe striking the right balance between your personal and professional life is critical to life-long happiness and fulfillment. We care about your career growth and strive to assign projects and offer training that will challenge you to become your best.
US, CA, San Francisco
Amazon launched the AGI Lab to develop foundational capabilities for useful AI agents. We built Nova Act - a new AI model trained to perform actions within a web browser. The team builds AI/ML infrastructure that powers our production systems to run performantly at high scale. We’re also enabling practical AI to make our customers more productive, empowered, and fulfilled. In particular, our work combines large language models (LLMs) with reinforcement learning (RL) to solve reasoning, planning, and world modeling in both virtual and physical environments. Our lab is a small, talent-dense team with the resources and scale of Amazon. Each team in the lab has the autonomy to move fast and the long-term commitment to pursue high-risk, high-payoff research. We’re entering an exciting new era where agents can redefine what AI makes possible. We’d love for you to join our lab and build it from the ground up! Key job responsibilities This role will lead a team of SDEs building AI agents infrastructure from launch to scale. The role requires the ability to span across ML/AI system architecture and infrastructure. You will work closely with application developers and scientists to have a impact on the Agentic AI industry. We're looking for a Software Development Manager who is energized by building high performance systems, making an impact and thrives in fast-paced, collaborative environments. About the team Check out the Nova Act tools our team built on on nova.amazon.com/act
US, WA, Seattle
MULTIPLE POSITIONS AVAILABLE Employer: AMAZON WEB SERVICES, INC. Offered Position: Applied Scientist III Job Location: Seattle, Washington Job Number: AMZ9674037 Position Responsibilities: Participate in the design, development, evaluation, deployment and updating of data-driven models and analytical solutions for machine learning (ML) and/or natural language (NL) applications. Develop and/or apply statistical modeling techniques (e.g. Bayesian models and deep neural networks), optimization methods, and other ML techniques to different applications in business and engineering. Routinely build and deploy ML models on available data, and run and analyze experiments in a production environment. Identify new opportunities for research in order to meet business goals. Research and implement novel ML and statistical approaches to add value to the business. Mentor junior engineers and scientists. Position Requirements: Master’s degree or foreign equivalent degree in Computer Science, Machine Learning, Engineering, or a related field and two years of research or work experience in the job offered, or as a Research Scientist, Research Assistant, Software Engineer, or a related occupation. Employer will accept a Bachelor’s degree or foreign equivalent degree in Computer Science, Machine Learning, Engineering, or a related field and five years of progressive post-baccalaureate research or work experience in the job offered or a related occupation as equivalent to the Master’s degree and two years of research or work experience. Must have one year of research or work experience in the following skill(s): (1) programming in Java, C++, Python, or equivalent programming language; and (2) conducting the analysis and development of various supervised and unsupervised machine learning models for moderately complex projects in business, science, or engineering. Amazon.com is an Equal Opportunity-Affirmative Action Employer – Minority / Female / Disability / Veteran / Gender Identity / Sexual Orientation. 40 hours / week, 8:00am-5:00pm, Salary Range $167,100/year to $226,100/year. Amazon is a total compensation company. Dependent on the position offered, equity, sign-on payments, and other forms of compensation may be provided as part of a total compensation package, in addition to a full range of medical, financial, and/or other benefits. For more information, visit: https://www.aboutamazon.com/workplace/employee-benefits.#0000
IN, KA, Bengaluru
Amazon Health Services (One Medical) About Us: At Health AI, we're revolutionizing healthcare delivery through innovative AI-enabled solutions. As part of Amazon Health Services and One Medical, we're on a mission to make quality healthcare more accessible while improving patient outcomes. Our work directly impacts millions of lives by empowering patients and enabling healthcare providers to deliver more meaningful care. Role Overview: We're seeking an Applied Scientist to join our dynamic team in building state of the art AI/ML solutions for healthcare. This role offers a unique opportunity to work at the intersection of artificial intelligence and healthcare, developing solutions that will shape the future of medical services delivery. Key job responsibilities • Lead end-to-end development of AI/ML solutions for Amazon Health organization, including Amazon Pharmacy and One Medical • Research, design, and implement state-of-the-art machine learning models, with a focus on Large Language Models (LLMs) and Visual Language Models (VLMs) • Optimize and fine-tune models for production deployment, including model distillation for improved latency • Drive scientific innovation while maintaining a strong focus on practical business outcomes • Collaborate with cross-functional teams to translate complex technical solutions into tangible customer benefits • Contribute to the broader Amazon Health scientific community and help shape our technical roadmap