Problem
Amazon Health Services (AHS) added pharmacy, primary care and partner telehealth programs to Amazon.com. Product search was built for physical goods and does not link symptoms, conditions, treatments and services. A query like "back pain treatment" can mean a painkiller, a prescription muscle relaxant, a doctor visit or virtual physical therapy. Ranking tuned for goods could miss service offerings such as One Medical or Hinge Health. The team also had to turn medical vocabulary into the words laypeople type.
Example from the article: "atorvastatin 40 mg" is a precise prescription query, while "high blood pressure" is a broad query with unclear intent.
Solution in brief
Flag health queries with a classifier and an NER model, describe each offering with LLM-enriched health terms indexed for vector search, and judge relevance with mixed human and LLM labels. Enrichment and labeling run as Bedrock batch inference jobs.
Questions this case answers
- How to make a search engine tuned for one product type surface a new vertical of offerings with sparse metadata and no engagement history
- How to label query-item relevance at scale when human annotation is too expensive to cover the whole query set
- How to make a product search built for physical goods find services such as doctor visits and telehealth programs?
- How to detect that a search query has a health intent, and whether it is a specific drug or a broad condition?
Tools and methods
- Query classifier — detects specific drug queries from search engagement logs
- Named entity recognition (NER) — finds conditions, symptoms, treatments in broad queries
- LLM knowledge augmentation — adds health terms to each offering and to ontology concepts
- FAISS — similarity index over knowledge base embeddings
- Amazon Bedrock — batch LLM inference for enrichment and labeling
- Amazon SageMaker, Apache Spark on EMR, Athena — model training and log processing
- ESCI labels — exact, substitute, complement, irrelevant judgments of query-offering pairs
Google or a one-time email code. No password.