← All guides

Guide

Collaborative, content-based or hybrid filtering: how to choose?

A recommendation system picks, from a whole catalog, the few items a person is most likely to enjoy. To get there, there are four main families of methods: content-based filtering, collaborative filtering, hybrid approaches and session-based recommendations. Each one answers a different situation, and none is enough on its own. Here is what each method does, where it excels and where it fails.

What is a content-based recommendation system?

Content-based filtering recommends items that resemble the ones a person is viewing or has liked. The resemblance is computed from what is known about the items themselves: title, description, category, brand, genre, technical attributes.

Technically, each item is turned into a vector. The classic method is TF-IDF, which weights the words of a description by how rare they are in the catalog. Recent approaches use semantic embeddings, produced by a language model: two descriptions that say the same thing in different words then get close vectors. The vectors are then compared, most often with cosine similarity.

  • Strengths: works from day one, without any history; also recommends new items; easy to explain (“because you are looking at this product”).
  • Limits: only suggests similar items, so little discovery; depends on the quality of the product pages; ignores what people actually buy together.

What is collaborative filtering?

Collaborative filtering ignores the content of the items. It starts from behavior: people who bought, viewed or rated the same items probably have similar tastes, so what one liked will interest the other. This is the logic of “customers who bought this also bought that”.

There are two families of collaborative filtering algorithms:

  • Neighborhood methods: you look for the closest users (user-based) or the items most often associated (item-based), then recommend from these neighbors.
  • Matrix factorization: all interactions go into a large users × items matrix, almost empty, which is decomposed into two sets of small vectors. The product of a user vector and an item vector estimates that person’s interest in that item. ALS (Alternating Least Squares) is the most widely used algorithm for implicit signals: views, clicks, purchases, rather than explicit ratings.
  • Strengths: reveals associations that no description contains (a cable bought with a console, a novel with another one by a different author); gets better with the volume of interactions.
  • Limits: can say nothing about a new item or a new user; needs a lot of data; tends to push items that are already popular.

What is the cold start problem?

The cold start covers every case where the system lacks history: a site that just opened, an item added this morning, a visitor arriving for the first time. Collaborative filtering is blind there, since it has no interaction to work with.

The usual answers are well known: rely on the content of the items, which exists as soon as they go online; use the behavior of the current session, even for an anonymous visitor; and, failing that, show the most popular items of the moment. A good system switches from one to the other depending on what it knows about the person.

What is a hybrid recommendation system?

A hybrid system combines several methods to make up for their limits. There are three common ways to do it:

  • Weighting: you compute a content score and a collaborative score, then blend them with an adjustable weight. A high weight on content sticks to what the person is looking at now; a high weight on collaborative reflects their past tastes.
  • Switching: you pick the method based on the context, for example content as long as a user has fewer than a few interactions, collaborative after that.
  • Cascade: one method preselects candidates, another one reranks them.

Hybrid is today the most widely used approach in production, precisely because no single method covers every case.

What about session-based recommendations?

Many visitors are not signed in. Session-based recommendations work only on the last items viewed during the current visit, giving more weight to the most recent ones. They need neither an account nor a long history, and they follow the intent of the moment: someone who views three trail running shoes in a row is probably looking for a trail running shoe, whatever they bought last year.

Which method should you choose?

  • New catalog or few interactions: content-based filtering, with popular items as a fallback.
  • Mostly anonymous visitors: session, complemented by the content of the item being viewed.
  • Identified customers with a purchase history: collaborative filtering, ideally blended with content (hybrid).
  • Editorial catalog (articles, movies, episodes): content and discovery matter as much as behavior.

In practice, a single site runs into all of these situations, sometimes on the same page. The real difficulty is therefore not choosing a method, but switching from one to the other at the right time, and maintaining them over time. We go into that cost in LIKYLY vs. building your own solution.

What LIKYLY simplifies

LIKYLY brings these four approaches together behind a single API, described on the product page:

  • Cold start: content similarity blended with semantic embeddings, from a product’s very first visit.
  • Session: recency-weighted recommendations from the last products viewed, with no sign-in and no third-party cookie.
  • Collaborative: collaborative filtering with implicit ALS, learned from your customers’ cross-purchases.
  • Hybrid: content and behavior blended with an adjustable weight.

You don’t have to choose the algorithm on every call: you send what you know (a user, a session, the product on screen) and LIKYLY picks the right strategy. To try it, the documentation presents the official SDKs, and the demo shows the approaches in action on a movie catalog.