Skip to content
GenAI Learn/AI Design Case Studies
Browsing as a guest. Sign in to save your progress and earn XP as you complete chapters.

Case Study: Music Discovery

5 min read

You'll learn to

  • -Design a recommender whose catalog gets new items every day
  • -Combine collaborative, content-based, and editorial candidate sources
  • -Show with a simulation why a system that never explores gets stuck
  • -Add a natural-language layer on top of the recommender

A music service has tens of millions of tracks, and thousands of new ones arrive every day. Users want songs they will love and the occasional surprise. This case study applies the recommendation funnel from the classic designs to a catalog that never stops changing, and focuses on the part that is hardest for new items: how a system learns about a track nobody has heard yet.

An Analogy: The Record Store Clerk

A good record store clerk knows what regulars like, and when a new album arrives they do not wait for sales data. They listen, place it next to similar records, and mention it to a few customers to see who reacts. Both halves matter: knowing your customers, and getting new things in front of a few of them.

Requirements and Signals

  • -Goal: more listening that users value, and more discovery of new artists, without losing the songs people love.
  • -Signals: full listens, skips and how early, saves, playlist adds, repeats, and shares. A skip in the first 10 seconds is a strong negative, and a save is a strong positive.
  • -Content: audio embeddings computed from the sound itself, tags, genre, tempo, and lyrics.
  • -Context: time of day, device, activity, and what has just been played.

Candidate Sources

  • -Collaborative: tracks that people with similar listening histories play, learned from embeddings of users and tracks.
  • -Content-based: tracks that sound like ones you love, from audio embeddings. These work for a track on its first day, with no listening history at all.
  • -Sequence: what usually plays next after the current track.
  • -Editorial and popular: curated and trending lists for the user's region.

A ranker then scores the merged candidates for the user, with satisfaction signals as the target, such as the chance of a full listen or a save, balanced against the chance of a skip. A re-ranking step enforces variety: not three tracks from one artist in a row, and a share of new artists.

The Cold Start Problem for Tracks

A new track has no plays, so collaborative signals are empty. Content-based candidates can introduce it, but the system still has to learn how people respond. That means showing it to some listeners even though its predicted value is uncertain. This is the exploration versus exploitation trade-off, which researchers study as the multi-armed bandit problem. The code simulates five new tracks with hidden true like rates. In each round, the system shows one track to a listener, and a strategy decides whether to pick the track that looks best so far or a random one. Press Run, and compare three strategies.

Press Run: never exploring locks onto a lesser track, and a little exploration finds the best one

Track C is the best, with a true like rate of 12%, so knowing it from the start would earn about 600 likes. The strategy that never explores earns only 186 and gives track C 0% of the impressions. It locked onto whichever track got a lucky early like and never looked back. Exploring 5% of the time earns 469 likes and sends 51% of impressions to track C. Exploring 20% earns 499, slightly more here, but only 37% of impressions reach track C, because so many go to weaker tracks. This is one random run, so read the shape, not the exact numbers. Real systems use smarter methods, such as Thompson sampling or upper confidence bounds, that explore more when they are uncertain and less once they know.

Evaluation

  • -Offline: ranking metrics on time-split listening logs, and recall of the candidate stage.
  • -Online: A/B tests on listening time and next-week retention, with discovery measures, such as the share of listens to artists the user had not played before, and guardrails such as skip rate.
  • -Slices: new users, new tracks, small artists, and each region and language.

A Language Layer

A user types "rainy day jazz with female vocals." An LLM can turn that into structured constraints, like genre, mood, and vocal type, and an embedding for the vibe, then the same retrieval and ranking system answers it. The model can also write a short explanation of why a track was suggested. Keep it grounded: the recommender still decides what plays, and the language model translates and explains.

Failure Modes

  • -Feedback loops and popularity bias: tracks that get played get more data, so popular music crowds out the rest. Keep exploration and boost new content on purpose.
  • -Echo chambers: users get a narrower and narrower set of tastes. Measure diversity and sometimes inject variety.
  • -Fairness to artists: a small share of artists getting most plays is a business and ethical concern, not only a metric.
  • -Gaming: fake streams inflate a track's signals. Filter them.

Interview Signal is part of Pro

See a real weak answer next to a real strong one for this exact topic.

Quiz is part of Pro

Test what you just read with a short quiz, and bank the XP.

Discussion0

Join the Discussion

Sign in to leave comments, reply to others, or like insights.

Sign In to ScaleDojo

No comments yet. Be the first to start the thread!