African Daisey
African Daisey (an e-commerce/marketplace app — e.g., connecting African artisans and small businesses with buyers, selling things like textiles, jewelry, home goods, beauty products.)
The business case:
African Daisey just launched. Two cold-start problems hit immediately:
Problem 1: New users (no purchase history) A first-time visitor lands on the app. There's no data on what they like — collaborative filtering can't work because there's nothing to collaborate on.
Business impact: if the homepage shows random or irrelevant items, the user bounces before ever seeing the product-market fit. First impressions determine retention.
Problem 2: New items (no interaction data) An artisan just listed a new set of hand-woven baskets. Zero clicks, zero purchases. A pure collaborative-filtering model will never surface it — it's invisible, even if it's exactly what shoppers want, so it gets stuck in a "no data → no exposure → no data" trap.
Business impact: if new sellers' products never get discovered, sellers churn off the platform — a two-sided marketplace problem, not just a user experience one.
How to solve it (what you'd say in an interview):
-
New user cold start:
- Onboarding questionnaire: "What are you shopping for? (home decor, jewelry, fashion, beauty)" → seeds an initial preference vector
- Fall back to popularity-based recommendations within their selected category
- Use contextual signals available even without history: location (e.g., trending items in their region), device, referral source (did they click an Instagram ad for jewelry?)
-
New item cold start:
- Use content-based features instead of interaction data: product images (via a vision model), text description, category, price, seller reputation
- Manually boost exploration: guarantee new items a small amount of "free" impressions (e.g., 5% of homepage slots reserved for new/underexposed items) so the system can start collecting signal
- Multi-armed bandit approach: treat it as an explore/exploit tradeoff — spend a small budget of traffic exploring new items to gather data, rather than purely exploiting what's already known to work
-
Two-sided marketplace nuance (good thing to mention — shows deeper thinking):
- Cold start isn't just a user experience problem here — it's also a seller retention problem. If new artisans get zero visibility, they leave the platform, which shrinks the catalog, which hurts the user experience too. It's a feedback loop, so cold-start handling directly protects the marketplace's supply side, not just demand.
- New item: % of new items getting at least N impressions/clicks within first 7 days
- New user: Day-7 retention rate compared between cold-start-treated vs. control users (A/B test)
Let's turn the design into an actual implementation plan — tech stack, steps, and what you'd build in what order. I'll structure it like you're actually building this as a portfolio project or answering a "how would you build it" interview question.
1. Data layer (foundation)
- Database: PostgreSQL for transactional data (users, products, orders); a document store (MongoDB) or S3 for unstructured content (images, descriptions)
- Event tracking: log every click, view, add-to-cart, purchase — this is your training data. Use something like Kafka or even a simple event table to start
- Feature store (optional at small scale): Feast, if you want train/serve consistency from day one
2. Candidate generation (offline, batch)
- Compute user embeddings and item embeddings using a two-tower neural network (implement in PyTorch or TensorFlow)
- For new items with no interaction data: generate embeddings from content features — run product images through a pretrained vision model (e.g., CLIP) and descriptions through a text embedding model
- Store embeddings in a vector database — FAISS (self-hosted) or Pinecone/Weaviate (managed) for fast approximate nearest neighbor search
3. Ranking model
- Train a gradient-boosted tree model (XGBoost/LightGBM) or a small neural ranker on interaction features (user features, item features, context)
- This runs online — takes the ~200 candidates from step 2 and scores them fast
4. Cold-start logic (the piece we designed)
- Onboarding questionnaire → stored as initial user preference vector
- Bandit algorithm (e.g., Thompson Sampling or epsilon-greedy) — implement as a simple service that decides, per request, whether to show a "safe" popular item or an "exploration" new item
5. Serving layer
- Wrap ranking + candidate generation in an API (FastAPI or Flask for Python, or a Node/Express service)
- Deploy as containers on OpenShift/Kubernetes — one pod for candidate generation service, one for ranking service, autoscaled based on traffic
- Cache frequent queries (Redis) to cut latency
6. Monitoring & retraining
- Track offline metrics (precision@k, NDCG) and online metrics (CTR, conversion) via dashboards (Grafana)
- Set up scheduled retraining (e.g., nightly batch job via Airflow or a Kubernetes CronJob) as new interaction data comes in
- Watch for feature/data drift
Suggested build order if this is a project (not just an interview answer):
- Data schema + event logging
- Simple popularity-based recommender (baseline)
- Add collaborative filtering / embeddings
- Add cold-start logic (questionnaire + content-based fallback)
- Add ranking model
- Deploy + add monitoring
Why start with a popularity baseline instead of building the fancy model first?r:
it gives us a working system and a benchmark to measure improvement against ,we always want a dumb baseline before justifying complexity.