Amazon's search team built COSMO, a commonsense knowledge graph powered by LLMs, to bridge the semantic gap between customer search queries and product listings. Traditional keyword-matching systems fail when intent requires human reasoning (e.g., 'shoes for pregnant women' → slip-resistant shoes). COSMO uses OPT-175B to generate millions of candidate commonsense explanations from query-purchase and co-purchase behavior pairs, then filters them through rule-based, similarity, and human-annotated classifiers (DeBERTa-large) to produce a graph of 6.3M nodes and 29M edges. A smaller instruction-tuned model (COSMO-LM, based on LLaMA 7B/13B) handles new queries in production at lower cost. Deployed via a two-tier caching architecture on SageMaker, COSMO powers search relevance, session-based recommendations, and navigation. A/B tests on ~10% of U.S. traffic showed a 0.7% relative sales increase and 8% navigation engagement lift, translating to hundreds of millions in additional annual revenue.

14m read timeFrom blog.bytebytego.com
Post cover image
Table of contents
Your agent isn’t broken. Your context is. (Sponsored)The Gap Between What You Search and What You MeanAsking the LLM (and Why the Answers Fell Short)Building the FilterCOSMO-LM, the Smaller ModelServing Commonsense at Amazon ScaleCOSMO’s ImpactConclusion
1 Comment

Sort: