Improving E-commerce Search with Category-Aligned Retrieval
Rauf Aliev
TL;DR
The paper tackles the challenge of aligning short, ambiguous user queries with a product catalog by introducing Category-Aligned Retrieval with Trainable Category Prototypes, learned from query embeddings and blended with category-name embeddings using a fixed interpolation weight of $\alpha=0.85$. It evaluates two embedding models—all-MiniLM-L6-v2 and OpenAI's text-embedding-ada-002—on the Amazon ESCI dataset, achieving up to $83.2\%$ Top-3 category accuracy offline for the OpenAI model and $89.6\%$ Top-5. Despite strong offline accuracy, online end-to-end simulations reveal that naive boosting based on predicted categories can degrade search relevance metrics such as $\text{nDCG@10}$ and Reciprocal Rank, underscoring the need for confidence-aware and adaptive integration strategies. The work highlights a critical distinction between offline prediction quality and practical online performance, offering future directions in adaptive boosting, ambiguity detection, and hybrid ranking to translate offline gains into real-world retrieval improvements.
Abstract
Traditional e-commerce search systems often struggle with the semantic gap between user queries and product catalogs. In this paper, we propose a Category-Aligned Retrieval System (CARS) that improves search relevance by first predicting the product category from a user's query and then boosting products within that category. We introduce a novel method for creating "Trainable Category Prototypes" from query embeddings. We evaluate this method with two models: a lightweight all-MiniLM-L6-v2 and OpenAI's text-embedding-ada-002. Our offline evaluation shows this method is highly effective, with the OpenAI model increasing Top-3 category prediction accuracy from a zero-shot baseline of 43.8% to 83.2% after training. The end-to-end simulation, however, highlights the limitations of blindly applying category boosts in a complex retrieval pipeline: while accuracy is high, naive integration can negatively affect search relevance metrics such as nDCG@10. We argue that this is partly due to dataset-specific ambiguities (e.g., polysemous queries in the Amazon ESCI corpus) and partly due to the sensitivity of retrieval systems to over-constraining filters. Crucially, these results do not diminish the value of the approach; rather, they emphasize the need for confidence-aware and adaptive integration strategies.
