liveBook · Manning

Four-stage recommender system

As explained in AI Recommender Systems

A four-stage recommender system is an architecture that organizes recommendation processing into candidate retrieval, eligibility filtering, scoring, and final ordering stages.

A four-stage recommender system progressively turns a large item pool into a small, usable recommendation list. Retrieval generates many candidates quickly; filtering removes ineligible items; scoring estimates detailed affinity; ordering produces the final presentation. Separating these jobs keeps speed, business rules, model quality, and ranking logic independently tunable. section 1.4.1 section 2.6

A practical pipeline assigns one primary responsibility to each stage:

  • Retrieval finds hundreds or thousands of candidates with fast database queries or approximate nearest-neighbor search. section 1.4.1
  • Filtering applies eligibility rules, such as excluding consumed, unavailable, or inappropriate items. section 1.4.1
  • Scoring adds detailed relevance or affinity estimates to the remaining candidates. section 1.4.1
  • Ordering combines scores and business objectives such as diversity, fairness, freshness, or popularity before selecting the final results. section 1.4.1

Personalized popular-content carousel

A streaming service can retrieve titles with high recent view counts, filter out watched or otherwise ineligible content, score the survivors against a user's taste, and order them into a personalized carousel. Users therefore receive different results from the same popular-content surface. section 1.4.1

Listing 2.14 Four-stage recommender
def recommend_for_user(user_id, k=10):
  candidates = retrieve_candidates_for_user(user_id) #A
  candidates = apply_filters(candidates, user_id) #B
  candidates = add_additional_scores(candidates) #C
  recommendations = rank_and_select_top_k(candidates, k) #D
  return recommendations
 

Use the compact implementation to trace how candidates flow through retrieval, filtering, scoring, and final selection. section 2.2.8

The pattern supports interchangeable implementations: teams can replace retrieval without rewriting scoring or filtering, test stages independently, cache retrieval, batch scoring, parallelize ranking, and centralize logging, monitoring, error handling, fallbacks, and experiments in a reusable framework. section 2.2.8

How AI Recommender Systems covers it

How deep it goes
Defines all four stages, demonstrates an end-to-end carousel, and shows implementation modularity, but does not detail stage-specific algorithms.
Examples
Uses a personalized popular-content carousel, an ItemKNN pipeline, history filtering, popularity scoring, and weighted ranking.
What you can do after
Build it from scratch as a modular pipeline and independently test, optimize, replace, cache, or monitor its stages.
How it connects
Connects candidate retrieval, filtering, scoring, ranking, collaborative filtering, content-based recommendation, hybrid recommendation, and popularity-based fallback.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI Recommender Systems. The section links point to the parts of the book it draws on.