Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 38 ยท Getting Started

What Is a Recommender System?

Understand what recommender systems do, where you meet them every day, what problem they solve, and how a tiny recommender works in Python.

Every time a video app suggests what to watch next, a shop shows "customers also bought", or a music service builds you a weekly playlist, a recommender system is at work. Its job is simple to state: from a huge catalog of items, pick the few that a particular person is most likely to find useful, interesting or worth buying, and show them in a sensible order.

This course teaches you how those systems work, from a ten-line popularity list to matrix factorization, neural models, evaluation and production concerns. Everything runs in your browser with real Python (NumPy, pandas, scikit-learn) on small synthetic data. That keeps every example honest and reproducible, but note one limit up front: production systems work with millions of users and items, use distributed infrastructure, and cannot be run on this site. We show the ideas on small data and explain what changes at scale.

The problem in one sentence

Given what we know about users, items and the interactions between them (ratings, clicks, purchases, watch time), predict which items each user will like among the ones they have not interacted with yet.

Two things make this different from ordinary search:

  • There is no query. The user did not type anything. The system must guess the need from history and context.
  • The catalog is far bigger than a screen. Out of 100,000 items you show maybe ten. Ranking quality matters more than raw accuracy.

Where you meet recommenders

Streaming Next video or movie
Shopping Related products
Music Playlists and radio
News and feeds What to read next

Same problem, different items.

1 / 2

Why companies build them

A recommender is rarely a nice-to-have. It changes business numbers:

  • Discovery. Users cannot browse a million items. Recommendations surface the useful ones.
  • Engagement. Relevant suggestions keep people watching, reading or listening.
  • Revenue. Cross-selling and upselling grow basket size.
  • The long tail. Good systems expose niche items that would never reach a "top 10" page.

They also carry risks you will meet later in this course: filter bubbles, popularity bias, unfairness to new creators, and privacy concerns.

A tiny recommender, by hand

Let us build the smallest thing that deserves the name. We have four people and their ratings of five films. We want to recommend something to Dana.

Python Recommend by similar taste

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The logic is "people who agree with you on things you both rated probably agree on the rest". That is collaborative filtering in miniature, and you will build real versions in chapter 4.

Two views of the same task

You can phrase the problem in two ways, and the choice shapes everything else.

  1. Rating prediction. Predict the exact rating a user would give: "Dana would give Star Quest 4.7". Evaluated with errors such as RMSE.
  2. Top-N ranking. Produce an ordered list of N items. Evaluated with ranking metrics such as precision@k and NDCG.

Modern practice leans strongly toward the second view. A user does not care whether the prediction was 4.7 or 4.2; they care whether the list in front of them is good. We cover both in evaluation later; for now remember that the final product is a list.

Python From scores to a top-N list

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Notice the filter: a real system never recommends something the user already consumed (unless re-watching or re-buying makes sense, like groceries).

What goes wrong without care

  • Popularity trap. Recommending only what is already popular is easy and often accurate, but useless for discovery.
  • Feedback loops. The system shows items, users click them, the system learns they are popular, and shows them even more.
  • Cold start. New users and new items have no history. Chapter 8 returns to this.
  • Wrong objective. Optimizing clicks can promote clickbait; optimizing watch time can promote addiction. Metrics encode values.

Throughout this course, "item" means whatever you recommend: movies, songs, products, articles, jobs, people, courses. The math does not care.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the main difference between a recommender system and a search engine?

    Search starts from a typed query. A recommender infers what the user might want from history and context.
  2. 2. Which output matters most to users of a modern recommender?

    Users see a ranked list. Ranking quality is what they experience, even when the model internally predicts ratings.
  3. 3. Why should a recommendation list usually exclude items the user already consumed?

    Space is scarce; surfacing new, relevant items is the point. Exceptions exist where repeat consumption is natural.
  4. 4. Which problem describes the system repeatedly boosting items only because it showed them before?

    Shown items collect more clicks, which makes them look more popular, which gets them shown more: a feedback loop.

Summary

  • A recommender picks and ranks items a user is likely to value, usually without a query.
  • Inputs are users, items and interactions; the output is a top-N list.
  • Rating prediction and top-N ranking are two framings; ranking matches the user experience.
  • Popularity bias, feedback loops and cold start are the classic hazards.
  • The examples here run on small synthetic data; production systems add scale and infrastructure.

Next: Types of Recommender Systems