Recommender system
Рекомендательная система
A recommender system suggests items a person might find useful or interesting, such as songs, products, or jobs. It can use what the person has done before, what the items are like, or how other people interact with them.
Also known as: коллаборативная фильтрация
What a recommender does
A recommender chooses what to show from a catalog and in what order. Think of the shows on a streaming service’s home screen: you didn’t type a query, but the service still has to decide what goes in the first row. The list can be personalized, but it doesn’t have to be. Trending shows are a reasonable starting point for a visitor with no watch history.
Where the suggestions come from
Collaborative filtering uses patterns in interactions across users. If many listeners who save track A also save track B, saving A is evidence that B might be worth suggesting. The method doesn’t need to know that the songs share a genre. Collaborative filtering is one way to build a recommender, not a synonym for the whole system.
Content-based filtering uses item attributes, such as an artist, genre, or description, to find items that match a user’s interests. A newly released track can be eligible even before anyone plays it. A hybrid system can draw from both sources rather than relying on either one alone.
Example: building a listening queue
Suppose a music app has ten million tracks and needs to suggest twenty. Scoring the entire catalog for every request may be too slow, so the app breaks the job into stages:
- Candidate retrieval finds a few hundred plausible tracks, perhaps from songs often saved together and new releases by artists the listener follows.
- Ranking scores those candidates for this listener, for example by estimating how likely they are to save each track.
- Final adjustments remove unavailable tracks and can keep one artist from taking up most of the queue.
That separation matters: a ranker can reorder the candidates, but it can’t rescue a great track that retrieval left out.
Common mistakes and how to measure quality
A new listener or a new track has little or no interaction history. This is the cold-start problem. An app might ask new listeners to pick a few artists and use catalog metadata to surface new tracks. Another mistake is treating a missing click as a dislike: an item might never have been shown, or it might have been buried below the fold. Log which items were displayed and where, not just what got clicked.
For offline evaluation, train on earlier events and test on later ones. A metric such as NDCG@10 rewards placing relevant items near the top of the first ten results. That tells you how the ranking performs against recorded behavior, not how people will respond to a new list. Use an A/B test for that, with a product outcome such as completed listens and a guardrail such as the skip rate.
What comes up in interviews
If asked to design “Recommended for you,” first clarify what a useful recommendation means for that product. Propose a baseline, such as popular items within the user’s preferred categories. Then explain where candidates come from, how you’ll rank them within the latency budget, and what you’ll show when there’s no history or the ranking service is unavailable.