Prompt
vector database for product recommendations
Latest observation
Oct 7, 2026
OpenAI APIWeb search: off
A vector database can be a strong fit for product recommendations, especially when you want to recommend items based on similarity rather than only exact filters or category rules.
Why use a vector database for recommendations?
It stores embeddings — numeric representations of products, users, or behavior — so you can find “nearby” items in semantic space.
Good use cases
- “More like this” product suggestions
- Personalized recommendations based on browsing/purchase history
- Cold start recommendations using product descriptions, images, or metadata
- Semantic search over your catalog
- Hybrid retrieval: combine similarity + filters like price, brand, availability
How it works
- Convert each product into an embedding
- from title, description, images, reviews, attributes, etc.
- Optionally create a user embedding
- based on clicks, purchases, wishlists, carts
- Store embeddings in a vector DB
- Query for nearest neighbors
- “find products similar to this product”
- “find products similar to this user’s taste”
Popular vector databases
- Pinecone — managed, scalable, easy to use
- Weaviate — open source + managed, supports hybrid search
- Milvus — open source, strong at large scale
- Qdrant — open source, good filtering support
- FAISS — library, not a full DB, good for prototypes
Recommendation architecture options
1. Item-to-item recommendations
Use the product embedding of the currently viewed item:
- Input: product A
- Output: similar products B, C, D
Good for:
- product detail pages
- “Customers also viewed”
2. User-to-item recommendations
Create a user profile embedding from recent activity:
- Input: user embedding
- Output: nearest products
Good for:
- home page personalization
- email recommendations
3. Hybrid recommendations
Combine:
- vector similarity
- business rules
- popularity
- inventory / margin / category filters
This is often the best real-world setup.
Benefits
- Captures semantic similarity better than keyword matching
- Works well with unstructured data
- Fast approximate nearest-neighbor search
- Useful when explicit ratings are sparse
Limitations
- Needs good embedding quality
- Can be less interpretable than rule-based systems
- Usually best as part of a hybrid recommender, not the only signal
- Requires tuning for ranking, diversity, and freshness
Example workflow
- Embed products with a model like OpenAI embeddings, Sentence Transformers, or multimodal embeddings
- Store vectors in Qdrant/Pinecone/Weaviate
- On page view, query for top-k nearest products
- Re-rank with rules:
- in stock
- same language/region
- exclude already purchased
- boost profitable items
If you want, I can also give you:
- a system design for a recommendation engine using a vector DB,
- a sample schema, or
- which vector DB to choose based on your scale and stack.