Prompt
I'm building product recommendations with embeddings, what should I use?
Latest observation
For product recommendations with embeddings, the best choice usually depends on what you’re recommending from and what data you have. In practice, most teams use a hybrid approach:
Good default
Use two towers / dual-encoder embeddings for retrieval:
- one embedding for the user/query context
- one embedding for the product/item
- then retrieve similar items with nearest-neighbor search
This is a strong starting point because it scales well and works for:
- “users like this”
- “similar products”
- “recommended for you”
- search-to-product matching
What to use for item embeddings
A product embedding should combine:
- title
- description
- category / taxonomy
- brand
- attributes (size, color, material, etc.)
- maybe image embedding if visuals matter
Common options:
-
Text embeddings for product metadata
- easiest and often enough to start
- works well if titles/descriptions are rich
-
Multimodal embeddings
- combine text + image
- better for fashion, furniture, home goods, etc.
-
Learned collaborative embeddings
- from user-item interactions
- good when you have lots of click/purchase data
Best recommendation setup
A strong production architecture is:
-
Candidate generation
- use embeddings + ANN index (FAISS, ScaNN, Pinecone, Weaviate, Milvus, etc.)
- fetch top 100–1000 candidates fast
-
Ranking
- use a separate ranker with more features:
- price
- availability
- popularity
- user affinity
- recency
- business rules
- often a gradient-boosted model or neural ranker
- use a separate ranker with more features:
If you have limited data
Start with:
- pretrained text embeddings for products
- average user embeddings from clicked/bought items
- ANN retrieval
- simple re-ranking
This gives a fast baseline.
If you have lots of interaction data
Train:
- matrix factorization / collaborative filtering embeddings
- or a two-tower retrieval model
- optionally fine-tune with content features
This usually beats pure content embeddings for personalization.
My practical recommendation
If you’re unsure, start with:
- product text embeddings
- user embedding = average of recently clicked/purchased product embeddings
- ANN search for retrieval
- then add behavioral/collaborative training later
That’s simple, scalable, and usually good enough to launch.
If you want, I can recommend a concrete stack based on your case:
- e-commerce catalog size
- whether you have click/purchase data
- text only vs image + text
- real-time vs batch recommendations