Embeddings in E-commerce: Better Search Without Large Models

Embeddings in E-commerce: Better Search Without Large Models
Embedding technology is revolutionizing product search and recommendations without the need for massive AI models. See how this method works.
Why Embeddings Are the Future of E-commerce
E-commerce today faces a paradox: we have more and more data about products and users, but search engines still don't understand buyer intent. A customer types "comfortable shoes for long walks," and the system shows them all shoes in the database – because traditional keyword-based search is blind to semantics. LLMs seem like a solution, but their infrastructure costs and latency mean not every store can afford them.
Embeddings are a compromise that works. Instead of maintaining GPT-4 or Claude for every query, you convert products and queries to numerical vectors once, then calculate cosine similarity in milliseconds[1]. The mechanism is simple: similar products generate similar vectors, allowing the system to identify semantic relationships without large models[2]. It's like switching from a paper map to GPS – you still reach your destination, but much faster and cheaper.
The numbers speak for themselves. Classic models like Word2Vec or FastText can reduce data dimensionality by 90% while maintaining precision, which translates to lower storage requirements and faster computations. Instead of full-text searching through millions of products, you operate on dense vectors of 128-512 dimensions. That's the difference between seconds and milliseconds of response time.
Practical implementation doesn't require an army of ML engineers. You use ready-made sentence-transformers models, generate embeddings for your product catalog overnight, save them in Pinecone or Weaviate, and have semantic search running in production. You don't need GPU clusters for inference – a decent CPU and vector database suffice. This is a level of complexity that an average dev team can handle in a sprint, not a quarter.
The key advantage is scalability without proportional cost increases. LLMs cost per API call, embeddings you generate once and use repeatedly. For a store with 100k products, that's the difference between thousands of dollars monthly and one-time catalog processing.
What Embeddings Are and How They Work in Practice
Embeddings are numerical vector representations of real-world objects – text, images, products – that allow processing abstract data using mathematical operations[1]. In e-commerce practice, this means every product in the catalog gets its unique "fingerprint" in the form of a number vector that encodes its semantic features.
The mechanism works simply: similar products generate similar vectors[2]. When a customer searches for "red sports shoes," the system doesn't need to understand natural language like GPT-4. It's enough to compare the query vector with product vectors in the database and return those with the smallest mathematical distance. It's like GPS – you don't need to know every street, just calculate the distance between points.
The key advantage is dimensionality reduction. Instead of storing full product descriptions with hundreds of attributes, you pack them into dense low-dimensional vectors – often 128 or 256 numbers[4]. The result? Lower memory usage, faster similarity calculations, better model precision. ASOS uses this approach for recommendation personalization, combining product embeddings with user behavioral data[4].
In practice, you generate embeddings using proven techniques: Word2Vec, GloVe, FastText for text, or BERT for semantic context[4]. You can also train your own models on product data – this doesn't require GPT-level computational power. Netflix has been doing this for years for content recommendations, and you can apply the identical mechanism to shoes or electronics[4].
The result? The system understands that "sneakers" and "running shoes" are similar concepts, even if there are no literal matches in product descriptions. This semantic similarity works without large language models – a well-trained encoder and efficient vector database are enough.
Proven Embedding Generation Techniques
Choosing an embedding technique is a matter of trade-offs between quality and complexity. In e-commerce, you don't need the latest model with 175 billion parameters – often proven solutions that work fast and cheap are sufficient.
Word2Vec, GloVe, and FastText are fundamentals that still work. Word2Vec learns word representations based on context – if "sneakers" and "sports shoes" appear in similar product descriptions, their vectors will be close. GloVe goes further, analyzing the global co-occurrence matrix. FastText handles spelling errors and variations better – in Polish e-commerce, this is a game-changer, because users write "adidasy," "adidasów," "adidas'y."
The difference? Word2Vec is a 300-dimensional vector trained on your product data in a few hours on CPU. BERT is 768 dimensions and GPU for several days. For a search engine with 50k products, Word2Vec is enough – I've seen stores with +12% conversion after implementing semantic search based on it.
BERT and GPT make sense when semantics are crucial. ASOS uses advanced NLP techniques to analyze product descriptions and social media trends, which allows better understanding of fashion context and customer preferences[4]. But beware – BERT inference is ~40ms vs 2ms for FastText. In real-time search at 10k queries/minute, that's the difference between 4 servers and one.
My rule: start with FastText for search, Word2Vec for recommendations. If you have complex natural language queries ("red dress for summer wedding") and infrastructure budget – test sentence-transformers (lightweight BERT versions). But first measure whether the problem lies in the model or data quality. I've seen companies investing in BERT when the real problem was lack of product name normalization.
Key lesson: embedding is a tool, not a goal. 80% of success is preprocessing and feature engineering, 20% is model selection.
Semantic Search in Online Stores
Traditional e-commerce search engines have a fundamental problem: they don't understand user intent. A customer types "summer dress for wedding," the system searches literally for those words in product descriptions. The result? Either no results or hundreds of irrelevant items. Embeddings solve this without needing to run heavy LLMs for every query.
The mechanism is simple: instead of matching words, we compare semantic vectors. User queries and product descriptions enter the same vector space, where "elegant dress" and "evening gown" lie close together – even if they don't share a single word. ASOS uses embeddings to analyze user behavior and personalize recommendations, combining data about viewed products with purchase history[4]. This allows them to handle natural language queries without needing to query GPT-4 every time.
The cost difference is brutal. Real-time LLM means hundreds of dollars daily even for a medium-sized store – every query is an API call, every call costs cents. Embeddings you generate once for the entire catalog, then it's just vector operations in memory. Similarity search on 100k products? Milliseconds, not seconds. Netflix and fashion e-commerce platforms use this approach for content personalization precisely because of cost efficiency[3].
Key advantage: you can use small, specialized models (Sentence-BERT, MiniLM) instead of GPT-4. Train them on your product data – names, descriptions, attributes, click histories. A 100MB model vs GPT's 175B parameters – the difference in inference time and cost is orders of thousands of percent. And quality? Often better, because the model understands your catalog's specifics: "oversized fit" in streetwear is different than in sportswear.
Implementation doesn't require an ML PhD. Vector database (Pinecone, Weaviate, even Postgres with pgvector), pre-trained embedding model, simple pipeline for index updates. Most teams launch an MVP in 2-3 weeks. Scaling? Linear – more products means more vectors, but computational cost grows slower than with traditional full-text search with thousands of business rules.
Embedding-Based Recommendation Systems
Embeddings are a game of vector matching – each product gets its numerical representation, and similar things land close together in multidimensional space. Sounds abstract? In practice, it's a mechanism that allows the system to recognize that "black leather jacket" and "men's biker jacket" are essentially the same purchase intent, even though the phrases differ.
Key advantage: you don't need to train GPT-4 on your catalog. A 100-500MB embedding model that converts product descriptions into 384-768 dimensional vectors is enough. Then it's simple math – cosine similarity between vectors and you have a similarity ranking. ASOS, the British fashion e-commerce giant, uses exactly this approach to map products in vector space[4]. Their data scientists build representations that combine visual attributes (color, cut) with textual ones (description, category), without needing to maintain billion-parameter models.
Personalization works similarly – you build user embeddings based on their interaction history. Someone clicks on minimalist watches and white sneakers? Their user vector will be close to products with similar aesthetics. The IMF in its report on AI in e-commerce notes that such embedding-based recommendation systems are becoming standard in payments and content discovery[2], because they're fast and scalable.
In fashion e-commerce, this is particularly important. Business of Fashion emphasizes that AI-driven content personalization is changing how platforms present products – instead of static categories, you get dynamic recommendations tailored to your style[3]. Embeddings are the engine here: each user session updates their vector, and the algorithm matches the offer in real-time.
Netflix and Spotify are classics, but in e-commerce the mechanics are identical – only instead of movies you have products, and instead of star ratings: clicks, time spent on product pages, cart additions. These signals build the user embedding, which you then match with product embeddings. Everything runs on CPU, you don't need GPU farms. That's exactly why medium-sized stores can implement such solutions without burning budget on infrastructure.
Business and Technical Benefits of Small Models
Small embedding models aren't a compromise - they're a conscious architectural decision that in e-commerce translates to measurable savings. Instead of paying for GPU-intensive infrastructure needed to serve large language models, a standard application server suffices. An embedding model of 100-300MB size runs on CPU, generating vectors in milliseconds, not seconds.
Infrastructure is one thing, but you see real savings in maintenance. You don't need a team of ML engineers to babysit the model 24/7. You don't waste time troubleshooting weird hallucinations or prompt engineering. Deploy, integrate with product feed, fine-tune on your own data - and it works. ASOS showed that this approach allows data science teams to focus on business impact instead of infrastructure firefighting[4].
Deployment speed is a killer feature for medium-sized e-commerce. Instead of a 6-month project integrating with OpenAI or Anthropic APIs, you have a working prototype in 2-3 weeks. A self-hosted model means full control over the pipeline - from preprocessing product descriptions to ranking results. You can A/B test different architectures, tweak weights, experiment with hybrid search (embedding + keyword) without API limits or throttling.
Compliance and privacy are arguments that close the discussion in the boardroom. Product data and user behaviors stay in your data center. No queries flying to external providers, no logs with customer data in someone's S3. For regulated industries (pharma, finance) or EU-operating companies under GDPR - this isn't a feature, it's a requirement. Small models give you this control out of the box, without negotiating DPAs with every AI vendor[1].
Practical Implementation Guide for Embeddings
Before you start experimenting with embeddings, you need to organize product data. This sounds banal, but 70% of search engine problems aren't the model, but garbage input data. You need clean product descriptions, consistent categories, and complete attributes. If you have "red shirt" in one place and "T-shirt red" in another – embeddings won't fix that. ASOS, implementing ML in their e-commerce, built an entire data cleaning pipeline before even touching models[4].
For a small team, tool selection is a balance between simplicity and performance. Start with sentence-transformers from HuggingFace – these are ready-made models you can deploy in a weekend. For storing vectors, open-source Qdrant or Weaviate is enough, both run on a single machine with 16GB RAM. You don't need Elasticsearch with custom plugins or Pinecone at $70/month to start. Deployment? FastAPI + Docker and you have a REST API for embeddings in 200 lines of code.
Metrics aren't Kaggle accuracy. Track click-through rate on search results (benchmark: 15-25% in fashion), conversion rate from recommendations (good result is 3-5%), and average position of clicked product (lower is better). ASOS also measures "null search rate" – percentage of queries with no results, which should drop below 5% after implementing semantic search[4]. Always compare with a simple baseline (keyword matching), not with the ideal.
Optimization is iteration. Start with embeddings of product titles only, then add descriptions, later images. Test each step with A/B testing on 10% of traffic for at least a week. If you have several hundred thousand products, batch processing embeddings once daily is enough – you don't need real-time. Cache popular queries and their results, this will reduce latency by 80%.
References
- TechHQ | Latest Tech Insights & Events
- IMF Report Highlights the Risks and Promises of Agentic AI in ...
- AI and the Future of Fashion E-Commerce Content | BoF
- A Look at ASOS's Fashionable Approach to Data Science
- ZTE CDO Cui Li at MWC Shanghai 2026: Unlocking Value and ...
- Chewy vs. Central Garden & Pet: Which Pet-Care Stock Has an Edge?
- Product updates – Docebo Help & Support
- Artificial Intelligence - arXiv