Candidate generation 2026-11-05
Candidate generation produces a manageable set of possible answers before a more expensive scoring or verification stage. In a recommender system, retrieving a few hundred items from millions lets a detailed ranking model examine each candidate. Candidates may come from several retrieval rules; their union can combine recent, popular and personally relevant items.[ref]
One mechanism represents a query by a vector and each item by a vector , then retrieves large inner products using nearest neighbor search. If the vectors have unit Euclidean norm, maximizing also minimizes . Without normalization those rankings need not agree. A candidate omitted here cannot be restored by a later stage that only reorders the retrieved set, so retrieval coverage and computational cost must be assessed together.
Nearest neighbor search 2026-11-05
Nearest neighbor search retrieves an element of a stored set minimizing its distance from a query. For a finite set in a metric space with distance , the exact task is to return satisfying
For example, among , and , the nearest point to in Euclidean distance is , at distance . Scanning all points in dimensions takes arithmetic work; a useful index eliminates candidates while preserving the required guarantee.
In a recommender system, stored items and queries can be vectors learned by machine learning. The comparison rule matters: minimizing Euclidean distance and maximizing dot product need not rank items identically. For unit vectors, , so those two rankings coincide.[ref]
Recommender system 2026-11-05
A recommender system selects or ranks items for a particular user or context, such as choosing books from a large catalogue. Its prediction target may be a rating, a click or a purchase; these targets need not coincide with what a user ultimately values. A common architecture first retrieves a manageable candidate set, then scores and reranks it.
Content-based filtering uses similarities between items; collaborative filtering uses patterns of interactions between users and items. If two readers overlap strongly in their previous choices, a book enjoyed by one can become a candidate for the other even without matching its description. Learned vectors make this retrieval a nearest neighbor search or related similarity search. A dot product also depends on vector length, so normalizing the vectors can change rankings.[ref]