RecSys & Searchintermediatemust-know5 min

Collaborative Filtering

People like you liked this. The oldest idea in recommendations.

Collaborative Filtering (CF) recommends items to users by leveraging preference patterns from a crowd of similar users or items. User-Based CF finds users with similar interaction histories; Item-Based CF finds items co-liked by the same users. Matrix Factorization (SVD / ALS) decomposes the sparse User-Item interaction matrix R (N × M) into low-rank user matrices U (N × k) and item matrices V (M × k), predicting unobserved ratings as R_ui ≈ u_i · v_j.

RecSys & Searchintermediatemust-know4 min

The Cold Start Problem

How to recommend items or personalize feeds when zero interaction history exists for new users or items.

The Cold-Start Problem occurs in recommender systems when a new user joins (User Cold Start) or a new item is uploaded (Item Cold Start), resulting in zero historical interaction logs. Because Collaborative Filtering relies on interaction history, pure CF models fail. Production solutions include Content-Based embeddings (extracting text/image features via Multimodal models), Hybrid Architectures, Active Learning onboarding surveys, and Multi-Armed Bandit exploration algorithms (Epsilon-Greedy, Thompson Sampling).

RecSys & Searchadvancedmust-know5 min

Two-Stage: Retrieval then Ranking

How apps pick your top ten from millions of items in a blink.

Production Recommender Systems (RecSys) use a multi-stage funnel architecture to balance latency and accuracy. Stage 1: Candidate Generation (Retrieval) filters millions of items down to top-100s in < 10ms using fast approximate vector search (ANN / Two-Tower models) or heuristics. Stage 2: Heavy Ranking scores and orders these 100s of candidates using complex multi-task deep learning models (DeepFM, DLRM). Stage 3: Re-ranking & Diversity applies business constraints, deduplication, position debiasing, and exploration.

RecSys & Searchadvancedmust-know5 min

Learning to Rank: Point, Pair, List

Getting the order right, not just the scores.

Learning to Rank (LTR) applies machine learning to construct optimal ranked lists of items for search queries or recommendation feeds. The three approaches differ in loss formulation: Pointwise predicts individual item relevance scores independently (Regression/BCE); Pairwise optimizes relative order between item pairs (RankNet, LambdaMART); Listwise optimizes metrics over the full ranked list simultaneously (ListNet, SoftRank). LambdaMART (Gradient Boosted Trees with Lambda gradients) remains the gold-standard algorithm for tabular ranking.

RecSys & Searchbeginner4 min

Content-Based Filtering

Recommending things similar to what you already liked.

Content-Based Filtering recommends items to a user by matching item feature attributes (genres, text tags, author, brand, TF-IDF vectors) against a user feature profile built from past interactions. Unlike Collaborative Filtering, Content-Based Filtering operates independently across users, enabling instant recommendations for new items with zero interaction history (solving Item Cold-Start). Disadvantages include lack of serendipity (filter bubble) and inability to leverage collective user wisdom.

RecSys & Searchintermediate5 min

Matrix Factorization & ALS

The recommender behind the Netflix Prize: hidden tastes from a mostly empty table.

Matrix factorisation is the classic recommender behind ideas like the Netflix Prize. Picture a huge table of users and items, mostly empty because each person has rated only a few things. The method learns a short list of numbers for every user and item, such that combining a user's list with an item's list predicts the rating. Those numbers end up capturing hidden tastes, like a liking for action films, and predicting the empty cells gives you recommendations.

RecSys & Searchintermediate5 min

NDCG, MRR & Ranking Metrics

How to score a ranked list when the top spots matter most.

Ranking Metrics measure the quality of ordered item lists produced by search engines and recommendation systems. Mean Reciprocal Rank (MRR) evaluates the reciprocal rank position of the first relevant item. Mean Average Precision (MAP) averages precision across multiple relevant item positions. Normalized Discounted Cumulative Gain (NDCG) measures multi level relevance quality, discounting item relevance logarithmically based on rank position.

RecSys & Searchintermediate5 min

Diversity, Novelty & Filter Bubbles

A feed that is only accurate gets boring. Here is how to mix it up.

Diversity, Novelty, and Serendipity are essential non-accuracy evaluation dimensions for industrial recommendation systems. Recommending only hyper similar items creates Filter Bubbles (Echo Chambers) and user fatigue. Inter-List Diversity measures distance across recommended items, Novelty measures item long tail obscurity, and Serendipity measures surprising yet relevant recommendations. Reranking algorithms like Maximal Marginal Relevance (MMR) trade top precision for item diversity.

RecSys & Searchintermediate5 min

Query Understanding & Expansion

Working out what someone means before you search for it.

Query Understanding processes short, ambiguous user search inputs before executing database retrieval. Raw user queries suffer from typos, acronyms, short token lengths, and vocabulary mismatch. Pipelines execute Query Spelling Correction, Intent Classification, Named Entity Recognition (NER), Synonym Expansion, and Query Rewriting to maximize downstream retrieval recall.

RecSys & Searchintermediate5 min

Semantic vs Lexical Search

Matching the exact words, or matching the meaning?

Semantic Search and Lexical Search represent the two fundamental retrieval paradigms in search systems. Lexical Search (BM25 / TF-IDF) matches exact sparse keyword tokens between query and document text. Semantic Search (Dense Vector Retrieval) maps text into continuous embedding spaces, capturing conceptual intent independent of exact word overlap. Hybrid Search combines both methods using Reciprocal Rank Fusion to maximize search recall and precision.

RecSys & Searchintermediate5 min

Personalization vs Privacy

Better recommendations need more data. Users want to share less.

Personalization vs Privacy represents a core ethical and technical trade-off in modern AI applications. Hyper personalized systems require tracking user interaction histories, demographics, and real-time context. Privacy regulations (GDPR, CCPA) and user expectations demand minimal data collection, zero third party tracking, and strict data rights. Solutions include On Device Inference, Federated Learning, Differential Privacy, and Local Anonymization.

RecSys & Searchadvanced5 min

Two-Tower Retrieval Models

How YouTube narrows millions of videos to a few hundred in milliseconds.

A two-tower model is how large apps like YouTube pick a few hundred candidates out of millions of items in milliseconds. One network turns the user and their history into a vector, and a second, separate network turns each item into a vector. A good match means the two vectors point the same way. Because the item side does not depend on the user, every item's vector can be computed in advance, so finding the best matches becomes a fast search through a pre-built index.

RecSys & Searchadvanced5 min

Wide & Deep, DeepFM

One part memorises past rules, one part generalises to new ones.

Wide and Deep, from Google, combines two kinds of learning in one recommender. The wide part is a simple linear model over specific feature combinations, so it memorises exact rules from history, like people who installed this app also installed that one. The deep part turns users and items into embeddings and feeds them through a neural network, so it can generalise to combinations it has never seen. DeepFM later learned those feature combinations automatically instead of having them hand-picked.

RecSys & Searchadvanced5 min

Sequential & Session-Based RecSys

What you clicked a minute ago says more than what you clicked last year.

Sequential and Session-Based Recommendation Systems predict a user's next item interaction based on their recent temporal action sequence. Standard matrix factorization ignores interaction order. Sequential systems model sequential dynamics using Recurrent Neural Networks (GRU4Rec), Convolutional Networks (Caser), and Self Attention Transformers (SASRec, BERT4Rec) to capture short-term user intent and long-term user preferences.

RecSys & Searchadvanced5 min

Negative Sampling Strategies

Which items to treat as not wanted, and why the choice matters so much.

Negative Sampling Strategies select un-interacted negative items to train dual-encoder recommendation and embedding models. In large catalog environments with millions of items, evaluating full Softmax denominators across all items is computationally impossible. Negative sampling methods range from Random Uniform Sampling to In-Batch Negatives, Popularity Biased Sampling, and Hard Negative Mining (DNS, Adversarial Sampling).

RecSys & Searchadvanced5 min

Position Bias & Debiasing Clicks

People click the top result because it is on top, not because it is best.

Position Bias describes the systemic user propensity to click items placed at top rank positions regardless of true relevance. Training click prediction models on raw click logs causes feedback loops where top-ranked items receive more clicks simply because of their visual position. Debiasing techniques include Inverse Propensity Scoring (IPS), Position Features during training with zeroed inference position, and examination probability models.

RecSys & Searchadvanced5 min

Feedback Loops in Recommenders

When a recommender learns from its own picks and narrows itself down.

Feedback Loops in Recommendation Systems occur when a model is continuously retrained on user interaction data generated by its own past predictions. This creates a self-reinforcing feedback loop: the model recommends popular items, users click them because they are visible, and the retrained model becomes increasingly convinced those items are the only relevant choices. Feedback loops cause Filter Bubbles, popularity bias amplification, and catalog collapse, requiring exploration strategies and casual debiasing.

RecSys & Searchadvanced5 min

Exploration vs Exploitation in Feeds

Show what you know they like, or risk something new to learn more?

Exploration vs Exploitation is a fundamental trade-off in recommendation feeds and ad placement engines. Exploitation serves items with high known historical engagement to maximize immediate metrics. Exploration serves un-tested or new items to discover true user preferences and estimate long-tail CTRs. Algorithms like Epsilon Greedy, Upper Confidence Bound (UCB), and Thompson Sampling optimize this trade-off dynamically.

RecSys & Searchadvanced5 min

Multi-Objective Ranking

Clicks, watch time, shares and purchases all want different things. Pick a balance.

Multi Objective Ranking optimizes recommendation systems across multiple competing business objectives simultaneously. Optimizing a single signal like Click Through Rate causes clickbait proliferation. Industrial systems predict multiple distinct targets (P(Click), P(Watch > 50%), P(Share), P(Purchase)) using Multi-Gate Mixture-of-Experts (MMoE) architectures, combining predicted probabilities into a unified utility score.

RecSys & Searchadvanced5 min

ANN Recall vs Latency Tradeoffs

Fast, accurate or cheap on memory: vector search lets you pick two.

Approximate Nearest Neighbor (ANN) search trade-offs govern production Vector Database configuration. ANN algorithms trade 100 percent exact recall accuracy to achieve sub-millisecond search latency across millions of high dimensional vectors. System parameters control the 3-way trade-off triangle between Recall (search precision), Latency (throughput QPS), and RAM Memory Footprint (hardware cost).

RecSys & Searchadvanced5 min

CTR Prediction & Calibration

Predicting clicks with probabilities honest enough to price ads on.

CTR Prediction estimates the probability pCTR = P(Click = 1 | User, Ad, Context) that a user will click an advertisement or item. In digital ad auctions, accurate Probability Calibration is as important as AUC ranking accuracy because ad bids multiply predicted CTR by cost per click (e.g. Expected Value = pCTR * CPC). Architectures include Factorization Machines, Deep & Cross Networks (DCNv2), and DIN (Deep Interest Network), evaluated via Log Loss and Expected Calibration Error (ECE).

RecSys & Searchadvanced5 min

Real-Time Features in Ranking

Using what a user did seconds ago, not just yesterday.

Real-Time Features in Ranking Systems incorporate sub second user interaction signals into real time scoring models. Batch features updated nightly miss immediate user session intent shifts (e.g. clicking 3 camera reviews 10 seconds ago). Streaming infrastructure (Apache Flink, Kafka, Redis, Feast Feature Store) computes streaming aggregates (clicks in last 5 minutes) to update inference model feature vectors in sub-100 millisecond speeds.

SCROLL · SAVE · TAP TO GO DEEPER