Scaling a Shared-Playlist Idea Beyond the Family Plan

Blend, Spotify’s opt-in shared playlist for any two users, grew directly out of two earlier products: Family Mix and Duo Mix. Those created shared playlists for listeners on the same Family or Duo plan, and their popularity made a version for arbitrary pairs of users an obvious next step. But moving from a closed group to the open user base introduced problems that the earlier products never had to face, both in how the playlist content is generated and in how the invitation flow works.

The difficulty of supporting any pair of users comes down to scale. The core algorithm has to handle two users who listen to largely the same music and two users with almost no listening history in common, and any change to the algorithm has to be evaluated against that full range of possibilities.

Balancing Four Playlist Attributes

Before any code was written, the team had to decide what a good Blend actually is. Most Spotify playlists optimize for a single dominant attribute, like discovery in Discover Weekly or familiarity and coherency in Daily Mix. A two-user playlist, though, has to juggle four competing criteria:

  • Relevance: Does each track reflect a user’s genuine taste, not just a song they happened to stream once? This is especially important because Blend puts a profile image next to each song, so attribution must feel accurate to the user being credited.
  • Coherence: Does the resulting playlist flow, or do tracks clash?
  • Equality: Are both users represented in the final mix?
  • Democratic: Do songs that both users like surface to the top?

The central design question was whether to “minimize the misery” or “maximize the joy.” Minimizing misery would mean selecting tracks everyone tolerates, which biases toward democratic and coherent playlists at the expense of personal relevance. Maximizing joy does the opposite, prioritizing the most personally relevant songs per user even if the other user might not love them. Spotify chose the “maximize the joy” approach, relying on feedback from employees and its Data Curation team.

Hot Spots in the Code Meant Hot Latency

Generating a Blend is a heavy operation: fetching listening data for both users and then sequencing tracks to balance all four attributes. During the algorithm-design phase, latency wasn’t a concern. Once quality was acceptable and scaling began, it became clear the service had become seriously slow.

Profiling showed that some code paths ran more than 50 times per Blend generation while others ran only once. Optimizing rarely executed sections had almost no effect on overall latency, but improvements in the hot spots were dramatic. The single biggest win came from swapping the order of two function calls inside an if statement, exploiting Java’s short-circuit evaluation. That one-line change cut latency to one-tenth of what it had been.

Quality Checks: From Self-Testing to Scorecards

Playlist quality was improved through both qualitative and quantitative methods. The team relies on testing its own generated playlists when making changes, but for Blend that had to cover multiple scenarios, including high taste-overlap and low taste-overlap pairs. Offline metrics were created to measure how well each attribute was being met.

The Data Curation team—Spotify’s “humans in the loop”—plays a central role in evaluating recommendation quality. When the team wanted to test a change intended to improve coherence, for example, the process followed a three-stage path:

  • Employees used the altered Blend for about a month to get a subjective feel for whether the change was an improvement.
  • A heuristic review was performed, during which the Data Curation team looked at a variety of Blends across different taste-overlap scores. This surfaced usability and comprehensibility issues tied to content quality and user experience.
  • The review used a “Content Recommendation Scorecard,” scoring each track against attributes like relevance and coherence. The scorecard showed that the new approach more consistently met the team’s quality criteria, giving enough confidence to roll the change out to all users.

Shared Playlists Need Shared Context

A social playlist also needs ways to talk about the shared taste that produced it. That requirement led to Blend Data Stories, which display information like the artist that connects the two users and a numerical taste match score. For the 2021 Wrapped campaign, these stories were adapted to pull from Wrapped data, showing year-end mutual top artists and mutual top genres instead of the standard ongoing stats.

Further development continues on Blend, with the focus on deepening the social experience and keeping users connected through music.