Prompt
I'm building product recommendations from user embeddings and item vectors
Latest observation
Oct 7, 2026
OpenAI APIWeb search: off
Great — a standard setup for recommendation systems.
At a high level, if you have:
- a user embedding (u \in \mathbb{R}^d)
- an item vector (v_i \in \mathbb{R}^d)
then the simplest recommendation score is usually:
[ \text{score}(u, v_i) = u^\top v_i ]
Higher dot product = more relevant item.
Common ways to use user/item embeddings
1) Dot product ranking
- Compute scores for all candidate items
- Rank descending
- Works well if embeddings were trained to make dot product meaningful
2) Cosine similarity
[ \frac{u^\top v_i}{|u||v_i|} ] Useful if vector norms should not affect ranking.
3) Two-tower retrieval
If your embeddings come from a two-tower model:
- user tower produces user vector
- item tower produces item vector
- train with sampled negatives / in-batch negatives
- retrieve nearest items with ANN search
4) Feed embeddings into a downstream ranker
Use:
- dot product
- elementwise product
- absolute difference
- concatenation
- metadata features
Then train a learned ranking model.
Practical recommendation pipeline
- Precompute all item vectors.
- Encode each user request into a user embedding.
- Score items by dot product or ANN similarity.
- Filter unavailable items.
- Optionally rerank top-K with a richer model.
Important considerations
- Normalization: if you use dot product, vector norms matter a lot.
- Negative sampling: crucial if training embeddings.
- Cold start: new users/items need content features or defaults.
- Latency: ANN indexes like FAISS, ScaNN, or HNSW are often needed for large catalogs.
- Evaluation: use Recall@K, NDCG@K, MAP, hit rate, and offline/online A/B tests.
If you want, I can help with any of these next:
- designing the scoring function
- training objective for embeddings
- FAISS / ANN retrieval
- Python code for recommendations
- handling cold start and ranking metrics