Design: Hashtag Recommendations in the News Feed
Context
You are adding hashtag recommendations alongside posts in a large social app’s News Feed. The goal is to increase useful engagement (e.g., hashtag taps and downstream value) without harming core feed health. Design the system end‑to‑end, be precise, and justify trade‑offs.
Tasks
-
Problem framing
-
Define the exact prediction target Y and the unit of observation (e.g., user–post–hashtag impression within a time window).
-
Specify how positives/negatives are labeled from logs.
-
Explain how you will construct additional negatives (e.g., downsampled unclicked exposures or unexposed candidates) while avoiding selection bias.
-
Candidate generation
-
Propose at least three complementary sources (e.g., personalized affinity, content‑based from post text/media, trending/recency).
-
Explain caps/diversification to avoid popularity bias and ensure coverage.
-
Features for a logistic‑regression ranker
-
List at least 10 concrete features spanning: user–hashtag affinity, post–hashtag semantic relevance, temporal/popularity signals, and platform/locale.
-
For each feature, describe expected sign/shape and how you will bucket/normalize it.
-
Model and training
-
Justify starting with a calibrated logistic regression versus deeper models.
-
Detail regularization (L1/L2), handling class imbalance, negative sampling ratio/weights, time‑based splits, and leakage prevention (e.g., pre‑impression feature snapshots, exclude post‑publication features).
-
Calibration and thresholds
-
Describe how you will check and correct calibration (e.g., Platt or isotonic) and set display thresholds by user cohort/surface.
-
Propose an exploration strategy/rate for new hashtags.
-
Offline evaluation
-
Define primary metrics (e.g., log loss, AUC‑PR), calibration plots.
-
Describe counterfactual estimation for top‑k ranking (e.g., IPS/propensity weighting) to mitigate position bias from historical data.
-
Online experimentation
-
Specify randomization unit, guardrails (e.g., feed time, session exits, complaint rate), primary outcomes (hashtag CTR, downstream dwell, creator engagement), novelty‑effect detection, ramp plan, and stopping criteria.
-
Cold start and freshness
-
Strategies for unseen hashtags/users and concept drift detection; include decay factors and automated retires for stale tags.
-
Safety and policy
-
Identify risks (e.g., sensitive or crisis‑related tags, misinformation) and propose real‑time blocks/filters and fairness checks across languages/regions.
-
Interpretability
-
Explain how to translate key logistic‑regression coefficients into actionable product insights (e.g., diminishing returns of showing >2 tags, language mismatch penalties).