Making a for you page in Algolia

Chuck Meyer30 Jun 2025

Problem

A product with a large audio or video catalog wants a «For You» feed, like Spotify or Pandora. The files themselves (.mp3, .mp4) do not encode what listeners care about, such as mood or theme, so a search engine has nothing meaningful to match. Queries and item descriptions must also share one vocabulary.

Example from the article: a small music app where each song carries three mood tags, and the next song comes from the tags of songs already played.

Solution in brief

Give every item a consistent set of descriptive tags, index the records in a search engine, and build the query from the tags that occur most often in the user's history. The search engine matches the tags fuzzily, skips items already played, and returns the next item. This is a small version of Pandora's Music Genome approach.

Questions this case answers
  • How to recommend the next item from a user's consumption history when items carry consistent descriptive tags and only a search index is available
  • How to make unstructured media items searchable and comparable when their raw content does not encode meaning
  • How to build a «For You» feed from a catalog of songs or videos when you already run a search engine?
  • How to turn raw audio or video files into searchable data that matches what users care about?

Tools and methods

  • Content-based recommendation by tags — match the tags of items the user played against the tags of other items.
  • Algolia search with optionalWords — return records that contain at least some of the query words, ranking multiple matches higher.
  • MTG-Jamendo dataset — consistent music tags plus PyTorch scripts to train your own tagger.
  • PyTorch — framework of those training scripts.
Continue reading — it's free

Google or a one-time email code. No password.