Search, Recommendation & NLP Systems
The applied-ML systems most product companies actually run: embeddings and representation learning, text classification and extraction, the modern recommender stack (multi-task ranking, sequential and generative recommenders), graph ML, entity resolution, and the labeling and data programs that feed them. Reuses the existing ranking, bandit and vector-search subjects and closes with search, recommendation, fraud and content-moderation cases.
Who it's for
Built for anyone who wants a structured, ordered path through Search, Recommendation & NLP Systems — 13 subjects, free to start, at your own pace.
Sign up free to save your progress through this path.
What you'll learn
-
1
Embeddings & Representation Learning
Understand how embeddings are learned, compared and judged, and defend each choice in an interview: what an embedding is and the geometry of similarity (cosine vs dot product vs Euclidean distance, when they give the same ranking, normalization, anisotropy and hubness, both measured), classical word embeddings (skip-gram with negative sampling, the unigram^0.75 noise distribution, why SGNS is implicit factorization of a shifted PMI matrix, verified on a toy corpus; GloVe; item2vec and prod2vec for sessions), supervised embeddings (the penultimate layer, sampled and hierarchical softmax for million-class outputs, embedding tables and the hashing trick with collision arithmetic), contrastive learning (InfoNCE with temperature, in-batch negatives, hard and false negatives, batch-size dependence, SimCLR, CLIP and zero-shot classification, SBERT, triplet and margin losses, and why collapse needs negatives, stop-gradient or variance regularizers, with a measured collapse experiment), two-tower retrieval models (dot-product scoring, ANN serving, the log-Q sampling-bias correction verified by simulation, why cross features cannot enter the towers, content features for cold start), self-supervised pretext tasks (MLM, next-token, masked autoencoders) and the pretrain-finetune paradigm, multilingual and multimodal spaces with the modality gap, evaluation (neighbour sanity checks, recall@k, MRR, NDCG, linear probes, MTEB-style benchmarks, the offline-online gap), operating embeddings (dimension and storage arithmetic, Matryoshka embeddings with a measured experiment, versioning and why vectors from two model versions are not comparable, drift), and a worked example with hand-computed InfoNCE at two temperatures, a log-Q corrected two-tower score and recall/NDCG on a ranked list.
Pro Start → -
2
Classical NLP & Text Classification
Build and defend a text classification or extraction system end to end, with numbers you can reproduce: the text pipeline and when normalization, stopword removal and stemming hurt (removing stop words cost 2.8 macro-F1 points on a bigram model in a measured test), representations (bag of words, TF-IDF with sklearn's exact smooth-idf formula hand-checked to zero difference on a four-document corpus, sublinear tf, character n-grams, the hashing trick with measured collision rates that match the closed-form 1-(1-1/m)^(V-1) estimate), linear baselines (logistic regression, linear SVM, complement Naive Bayes on a 28-class imbalanced ticket corpus, macro-F1 versus accuracy, calibration and ECE, multi-label one-vs-rest with tuned thresholds), fine-tuned encoders (BERT, RoBERTa and DeBERTa heads, learning-rate warmup, head-plus-tail truncation, sliding windows for 5,000-token documents, distilled and multilingual models), sequence labeling (NER as token classification, BIO tagging, CRF layers, subword alignment, entity-level versus token-level F1 computed by hand with seqeval-style scoring, nested entities, PII detection), other tasks (sentiment and aspect-based sentiment, intent and out-of-scope detection, LDA versus BERTopic, keyword extraction, near-duplicate detection with MinHash and LSH checked against exact Jaccard), LLMs versus small models (zero and few-shot classification, LLM-as-labeler to bootstrap a small model with a simulated silver-label experiment, structured output, an explicit assumption-based cost and latency table, and when an LLM is the wrong choice), evaluation (macro versus micro F1, per-class confusion, calibration, Cohen's kappa for annotator agreement, error analysis, vocabulary drift), production (batching, max length, caching, monitoring, multilingual coverage), and a worked support-ticket routing example including a deduplication-leakage demonstration where a random split inflated macro-F1 by 5.6 to 13 points.
Pro Start → -
3
Ranking & Recommendation System Architecture
Learn the multi-stage recommendation architecture: candidate generation with two-tower models and ANN search, pointwise/pairwise/listwise rankers, multi-task value formulas, position debiasing, cold start, re-ranking policy, and how offline metrics relate to online A/B results.
Pro Start → -
4
Modern Recommender Architectures
Learn what changed inside the ranking and retrieval models of a recommender after about 2016 and defend each choice in an interview: feature-interaction models (Wide and Deep, DeepFM, DCN and DCN-v2 cross layers with the degree-of-interaction claim verified numerically, embedding tables, optimizer-state memory and hashing collisions with the closed-form collision rate checked by simulation), multi-task ranking (shared-bottom versus MMoE versus PLE, a hand-computed MMoE gating pass, task weighting, fusion formulas and a measured cliff when one weight moves by 2.5x, and an honest null result for MMoE on a toy), user sequence modeling (GRU4Rec, SASRec, BERT4Rec, target attention in DIN and DIEN, SIM and ETA for 10,000-event histories, cost arithmetic for each), generative recommenders (action-as-token formulation in the style of HSTU, semantic IDs from RQ-VAE and generative retrieval in the style of TIGER, tradeoffs against two-tower plus ANN, all labeled as not measured here), LLMs in recommender systems (features, reranking, conversation, cost, where they do not help), retrieval improvements (multi-interest, mixed and cross-batch negatives, the logQ correction measured in a retrieval experiment where recall@10 moves from 0.019 to 0.214), debiasing and feedback loops (exposure and popularity bias, inverse propensity weighting in training, diversity and calibration re-ranking), training systems (streaming training, feature freshness, embedding staleness, sharded tables), evaluation (recall@k, NDCG, AUC versus GAUC measured on users with different base rates, sampled metrics, counterfactual replay, interleaving, A/B tests, long-term holdouts and a time-leakage experiment), and a worked example of a short-video ranker.
Pro Start → -
5
Contextual Bandits for Personalization
Learn how contextual bandits extend multi-armed bandits by conditioning the policy on features of the user and situation: the LinUCB algorithm and why a linear reward model gives closed-form confidence bounds, neural/deep contextual bandits for richer reward functions, action features vs. arm identity for scaling to large or changing catalogues, and position bias in bandit-served lists.
Pro Start → -
6
Vector Databases and Hybrid Search
A systems-level treatment of the retrieval layer for RAG: pgvector vs dedicated vector databases (Pinecone, Weaviate, Chroma, Milvus) with a comparison table and a 'when Postgres is enough' decision rule; HNSW vs IVF ANN indexing and their recall/latency trade-offs; pre-filter vs post-filter vs filtered-ANN and why naive post-filtering silently starves results; hybrid dense+BM25 search with reciprocal rank fusion (RRF) worked by hand; and cross-encoder re-ranking with its O(k) cost model.
Pro Start → -
7
Graph ML & Graph Neural Networks
Learn when and how to learn on graphs and defend each choice in an interview: the three task types (node, link, graph level) and the homophily check, with the trap that edge homophily of 0.920 on a graph with 5 percent fraud is barely above the 0.905 expected by chance, computed on a synthetic transaction graph; classic graph features (degree, PageRank, triangle and clustering counts, Louvain community size and density) fed to a gradient-boosted model, which in the worked example lifted time-split PR-AUC from 0.113 to 0.484; node embeddings (DeepWalk and node2vec with a hand-verified p and q transition, the matrix-factorization view, and a measured transductive limit where embeddings from two snapshots do not line up and add nothing); message passing (GCN with a hand-checked symmetric normalization, GraphSAGE mean aggregation and inductive use, GAT attention, over-smoothing measured as a 480-fold fall in Dirichlet energy over 8 propagation steps and as PR-AUC versus depth, heterogeneous R-GCN and metapath graphs, temporal graphs in brief); scaling (neighbor sampling arithmetic of 1 + 15 + 150 = 166 nodes per target, the measured cost of sampling at inference, sampling variance verified against the finite-population formula, Cluster-GCN, PinSage lessons from memory, precomputation and graph feature stores); link prediction and recommendation (LightGCN propagation by hand, negatives, evaluation, and a measured random-edge-split leak where 29.1 percent of test pairs already appear in training versus 9.1 percent under a time split); fraud and anomaly detection on graphs (neighbor-label leakage measured as PR-AUC 0.508 as-of versus 0.912 leaked, rings, temporal splits); knowledge graphs (triples, TransE scored by hand, ComplEx, R-GCN, GraphRAG in one paragraph, all labeled not measured); evaluation and leakage; when not to use a GNN (serving latency arithmetic with explicit assumptions); and a worked example comparing tabular, graph-feature, neighbor-aggregate and GraphSAGE models under a time-aware split with honest reporting of which won.
Pro Start → -
8
Entity Resolution & Record Linkage
Learn to design and defend an entity resolution system end to end, with numbers you can reproduce: problem variants (deduplication, cross-source linkage, identity resolution, company and product matching) and why 'same entity' is a business definition; the pipeline (standardization, blocking, comparison, classification, clustering, survivorship) and blocking quality measured as pair completeness, reduction ratio and pair quality, with the arithmetic that 110,538 records already mean 6.1 billion candidate pairs and 1 million records mean 500 billion; similarity features (Jaro-Winkler, Levenshtein and Soundex hand-checked on martha/marhta, nickname tables, date and numeric tolerances, missing-value levels); models (hand rules, Fellegi-Sunter m and u probabilities fitted by EM, with a measured failure when u is taken from random pairs, a per-field match-weight breakdown for one pair that adds up to 7.220 bits and a posterior of 0.9933, and a gradient-boosted pair classifier); clustering (the chaining problem with the a-times-b false-pair arithmetic, transitive closure versus pivot versus average-linkage clustering measured on B-cubed); evaluation (pairwise versus B-cubed and CEAF, recall estimation by clerical sampling and by capture-recapture, and why capture-recapture overestimated recall here); scale (n(n-1)/2, MinHash and LSH banding tuned against an empirical S-curve, Spark patterns from memory); privacy and governance (PII, Bloom-filter privacy-preserving linkage as a toy, auditability, review queues); an assumption-based LLM-matcher cost and benefit estimate; and a worked example on a synthetic 110,538-record customer table with fixed seeds, honest about which results are weak or surprising.
Pro Start → -
9
Data Labeling, Active Learning & Weak Supervision
Learn to design a labeling program with numbers you can reproduce, on a synthetic 100,000-message support inbox with ten imbalanced classes and a 2,000-label budget: why labels set the ceiling (a 20 percent symmetric flip rate cost 0.083 macro-F1 and a class-conditional one 0.127, and a noisy test set misreports even a clean model); agreement statistics implemented by hand and checked against a hand-computed example (Cohen kappa 0.4, Fleiss kappa 1/3, Krippendorff alpha 7/18) with annotators of 85, 80 and 75 percent accuracy reaching only kappa 0.56 to 0.65, honeypot detection power, and a budget in which a USD 0.30 sticker price became USD 1.00 per usable label; pool-based active learning where margin, entropy, uncertainty and a margin-plus-k-means hybrid reached random sampling's 2,000-label macro-F1 with roughly half the labels while pure k-center diversity lost to random, uncertainty sampling bought 35 percent no-signal messages, and evaluating on the AL-selected slice read accuracy 0.432 against 0.664 on a random test set; weak supervision with twelve labeling functions, coverage, precision and conflict tables, majority vote against a Dawid-Skene style label model fitted by EM (similar accuracy, 0.522 versus 0.641 macro-F1), and a correlated-LF failure where four copies of a weak rule drove label-model confidence to 1.000 at 0.218 accuracy; pseudo-labelling and confirmation bias (every threshold failed to beat the supervised baseline here, and rare-class recall fell from 0.160 to 0.033); an explicitly assumption-based LLM-labeling cost table, a simulated distillation and the LLM-labeled-test-set hazard; synthetic data and a measured toy model-collapse demonstration; confident learning by hand with detection precision and recall for injected errors; and versioning, lineage and datasheets. Every measured number comes from fixed-seed scripts on synthetic data; prices and LLM accuracies are labelled placeholders.
Pro Start → -
10
Case Study: Search Ranking (Airbnb / E-commerce Marketplace Search)
Model interview answer for marketplace search ranking: two-sided objectives, retrieval vs learned ranking, position-bias-corrected labels, LambdaMART vs neural rankers, NDCG worked example, cold start, diversity re-ranking, serving architecture and monitoring.
Pro Start → -
11
Case Study: Video Recommendation (YouTube / Netflix-style Homepage)
Walk through a model ML system design interview answer for a video recommendation homepage: objectives, implicit-feedback labels, two-tower retrieval, multi-task ranking, position bias, cold start, evaluation, A/B testing, serving at scale, and monitoring.
Pro Start → -
12
Case Study: Real-Time Payment Fraud Detection (Stripe / PayPal-style)
Model interview answer for real-time payment fraud detection: sub-100 ms decisions, 0.1 % positives with asymmetric costs, delayed chargeback labels, point-in-time features and velocity counters, GBDT plus graph signals, PR-AUC and dollar-weighted evaluation, cost-based decision policy and a streaming serving architecture.
Pro Start → -
13
Case Study: Content Moderation System
Model interview answer for a user-generated-content moderation system (5 million posts a day, about 0.5 percent harmful across four policy categories with severity tiers): turn policy into labels and a cost matrix, derive closed-form allow/review/remove thresholds, build a cheap TF-IDF tier, a stronger simulated embedding/LLM tier and a human queue, route by expected loss instead of raw score and compare the routers at equal strong-tier budget, size reviewers and queues with Little's law and Erlang C, measure recall by stratified prevalence sampling of the allowed bucket (naive versus stratified, with sample-size arithmetic), measure precision at enforcement and the appeal overturn rate (and why it is not 1 minus precision), watch adversarial obfuscation drift and recovery by normalisation, audit dialect false-positive disparity at the enforcement threshold, trade pre- against post-publication latency, control LLM-tier cost with explicit assumptions, and close with retraining cadence, dashboards, hedged regulatory notes and reviewer wellbeing. All numbers come from a fixed-seed synthetic simulation with abstract pseudo-word 'harm'.
Pro Start →