Spotify
Spotify fine-tunes Llama to explain recommendations and write AI DJ commentary
Spotify uses fine-tuned versions of Meta's open-weight Llama models to write short explanations of why a track or creator is recommended, and commentary for its AI DJ in English and Spanish. Spotify reports that in some online tests, users were up to four times as likely to click on recommendations that came with an explanation.
Key figures
Copied exactly from the sources. Copy any figure with its citation.
Up to four times more likely
Chance of a click on a recommendation shown with an explanation, in some cases, especially niche content1
Four times more likely
Engagement with a creator's content when users were given context about why it was recommended (as relayed by Meta)2
Up to 14%
Gain on Spotify-specific tasks from adapting Llama to 10 tasks, compared with out-of-the-box Llama1
What it took
Cost, team size and timeline were not disclosed in the sources.
The problem
Spotify's listeners decide what to play from cover art and what they already know. Spotify wanted to add context that works like a friend's tip, so people would try new artists, podcasts and audiobooks. Spotify saw large language models as a way to scale this kind of personal narrative.
What they built
Spotify used Meta's Llama models, whose files are published openly so a company can adapt them, to write two things. The first is a short explanation of why an item is recommended. The second is spoken commentary for its AI DJ, a personalised guide that picks songs and talks about them, in English and Spanish. Fine-tuning means training a model further on a company's own examples so it fits a specific job.
How they did it
Spotify first tried Llama with plain prompts and found the output needed tighter control. Expert editors wrote model examples and kept giving feedback on errors in artist names, tone and facts. The team added instruction tuning, prompt work and tests that try to provoke bad output. For the DJ, Spotify compared outside and open models and found that fine-tuned smaller Llama models gave commentary on a par with leading models at lower cost and delay. It also served models with the vLLM inference engine. Separately, after Llama 3.1 8B performed competitively in tests, it adapted Llama to 10 internal tasks.
Results
Spotify reports that in online tests, users were in some cases up to four times as likely to click on a recommendation that came with an explanation, especially for niche content. Meta's post describes it as users being four times as likely to engage with content from a creator when told why it was recommended. Adapting Llama to Spotify's tasks improved results by up to 14% over the stock model, with little loss in general ability. For the DJ, Spotify says listeners were more willing to play songs they might otherwise skip.
Lessons for your project
Put subject experts in the loop. Spotify's music editors supplied model examples and kept correcting errors in artist names, tone and facts.
Test a small tuned model against bigger ones. Spotify found fine-tuned smaller Llama models matched top models on DJ commentary while cutting cost and delay.
Guard general ability when tuning for your own tasks. Spotify tracked a general benchmark to check the model had not lost broad skills.
Plan for safety and accuracy before launch. Spotify named style consistency, harmful output and made-up facts as the main risks.
Caveats
- All figures come from Spotify's own research post and from Meta's post relaying Spotify's results. No independent source confirms them.
- The click figure is described as 'up to' and 'in some cases'. Neither post gives the sample size, markets, test length or the number for typical content.
- The 14% gain applies to a separate multi-task adaptation of Llama across 10 Spotify tasks, not to the explanations or DJ commentary directly. The posts do not state which Llama size that adaptation used.
- The Spotify post names Llama 3.1 8B only in connection with that multi-task work (as competitive in zero-shot tests). It does not say which Llama version powers the explanations or the DJ commentary.
- The AI DJ launched in 2023 per Spotify, with no month given. The deployed date shown is the date of the post.
- The Meta post says engagement. The Spotify post says clicks. The two wordings are kept as each source gives them.
Sources
- Contextualized Recommendations Through Personalized Narratives using LLMs
Spotify Research · 2024-12-18 · Company blog · research.atspotify.com
- How Spotify is using Llama to create personalized recommendations and enhance content discovery
Meta AI · 2024-12-18 · Vendor case study · ai.meta.com
Summarized in our own words from the sources above. Spotted an error? See corrections.