Ecommerce ops · Production

Amazon Health Services improves healthcare discovery on Amazon.com using AWS ML and generative AI

The problem

Healthcare queries on Amazon.com involve complex relationships between symptoms, conditions, treatments, and services that traditional ecommerce product search was not designed to handle, requiring sophisticated medical terminology understanding to connect customers with relevant healthcare offerings.

First attempt

Existing search algorithms optimized for physical products could miss service-based healthcare offerings, potentially failing to surface One Medical primary care or virtual physical therapy results for health condition searches.

Workflow diagram · grounded in source
1
Customer submits health search query
trigger
“When a customer search query arrived”
2
Pharmacy classifier identifies drug queries
ai_action
“the pharmacy classifier predicts that "atorvastatin 40 mg" is a query with intent for a prescription drug and triggers a custom search experience geared towards AHS products”
3
NER model identifies health entities
ai_action
“we trained a named entity recognition (NER) model to annotate search keywords at a medical terminology level. To build this capability, we used a corpus of health ontology data sources to identify concepts such as health conditions, dise…”
4
LLM augments product knowledge base
ai_action
“we used a large language model (LLM) with a fine-tuned prompt and few-shot examples to layer in additional relevant health conditions, symptoms, and treatment-related keywords for each product or service. We did this using the Amazon Bed…”
5
FAISS vector search matches query to products
ai_action
“we converted it to an embedding and used it as a search key for matching against our index. This similarity search used FAISS with matching criteria based on the threshold against the similarity score”
6
Human labeling establishes ground truth
human_review
“we worked with a human labeling team to establish ground truth on a substantial sample size, creating a reliable benchmark for our system's performance using this scheme. The labeling team was given guidance based on the ESCI framework a…”
7
LLM-based ESCI labeling at scale
ai_action
“we implemented LLM-based labeling using Amazon Bedrock and batch jobs. After matches were found in the previous step, we retrieved the top products and used them as prompt context for our generative model. We included few-shot examples o…”
8
Customers see vetted healthcare offerings
output
“customers searching for health solutions on Amazon—whether for acute conditions like acne, strep throat, and fever or chronic conditions such as arthritis, high blood pressure, and diabetes—will begin to see medically vetted and relevant…”
Reported outcome

The solution now runs daily for health-related search queries, connecting customers with medically vetted healthcare offerings alongside other products.
Building at scale with generative AI avoided costs that otherwise would have required orders of magnitude more financial budget.

Reported metrics
Manual scaling cost avoidedorders of magnitude more financial budget
Reported stack
Amazon SageMakerAmazon BedrockAmazon EMRAmazon AthenaFAISSAmazon S3PySpark
Source
https://aws.amazon.com/blogs/machine-learning/learn-how-amazon-health-services-improved-discovery-in-amazon-search-using-aws-ml-and-gen-ai?tag=soumet-20
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The solution now runs daily for health-related search queries, connecting customers with medically vetted healthcare offerings alongside other products.

What tools did this team use?

Amazon SageMaker, Amazon Bedrock, Amazon EMR, Amazon Athena, FAISS, Amazon S3, PySpark.

What results were reported?

Manual scaling cost avoided: orders of magnitude more financial budget (source-reported, not independently verified).

What failed first in this deployment?

Existing search algorithms optimized for physical products could miss service-based healthcare offerings, potentially failing to surface One Medical primary care or virtual physical therapy results for health conditio…

How is this ecommerce ops AI workflow structured?

Customer submits health search query → Pharmacy classifier identifies drug queries → NER model identifies health entities → LLM augments product knowledge base → FAISS vector search matches query to products → Human labeling establishes ground truth → LLM-based ESCI labeling at scale → Customers see vetted healthcare offerings.