Inside the Archive: The Tech Behind Your 2025 Wrapped Highlights

This post details the technical implementation of the Wrapped Archive feature, which generates personalized LLM-driven narratives for Spotify Wrapped. It describes the process of identifying "remarkable days" using a priority-ordered set of heuristics, aggregating listening history data, and publishing it to a messaging queue. The post elaborates on prompt engineering strategies for consistency and safety, model distillation techniques to shrink model size and improve efficiency, and the architecture of the generation engine designed for high throughput and strict latency constraints. It also covers the data modeling approach for safe concurrent writes to a distributed key-value database and proactive scaling strategies for handling massive, spiky traffic. Finally, it outlines an automated evaluation framework using LLM-as-a-judge and a structured remediation loop to ensure report quality and address failures, including a specific example of a timezone bug in an upstream data pipeline affecting discovery day reports.
More from the AI-Assisted Developer Productivity Platform trail
- Why Spotify Is Not Using Bayesian A/B Testing | Spotify Engineering
- Portal by Spotify cut my Claude Code token usage by 90% | Spotify Engineering
- AI Changed How Spotify Builds. What We Learned (and Fixed) About Quality at Higher Velocity
- When Can LLMs Replace Humans in A/B Tests? | Spotify Engineering
- Coding Is No Longer the Constraint: Scaling Developer Experience to Teams and Agents at Spotify | Spotify Engineering