Prompt
What should I use for recommendations that update in real time?
Latest observation
If you want recommendations that update in real time, the best choice usually depends on what “real time” means for your product:
Common options
-
Collaborative filtering / matrix factorization
Good for standard recommendation systems, but usually not truly real-time unless you retrain or update embeddings frequently. -
Session-based recommenders
Best when recommendations should react immediately to the user’s current clicks/views/cart behavior.
Examples: GRU4Rec, SASRec, Transformer-based session models. -
Two-stage system with real-time candidate generation + ranking A practical production setup:
- Real-time event stream updates user features
- Candidate retrieval from precomputed embeddings or rules
- Real-time ranking model uses the latest behavior
-
Contextual bandits / reinforcement learning Useful if you want recommendations to adapt continuously based on feedback like clicks, purchases, or dwell time.
If you need fast updates right away
A strong architecture is:
- Event streaming: Kafka / Kinesis / PubSub
- Feature store: Feast / custom online feature store
- Online model serving: a ranking model that consumes fresh features
- Fallback rules: trending/popular items for cold start or sparse users
Rule of thumb
- E-commerce / content feeds: session-based + ranking works well
- Ads / personalization: contextual bandits are often a good fit
- Large-scale marketplace: hybrid system with batch retrieval + real-time ranking
If you want, I can recommend a specific approach based on your use case, like e-commerce, media feed, music, or ads.