For the 2025 Wrapped Archive, Spotify picked up to five remarkable days from each eligible listener's year and gave each one an LLM-written story. About…
// the short version
For the 2025 Wrapped Archive, Spotify picked up to five remarkable days from each eligible listener's year and gave each one an LLM-written story. About 350 million users meant roughly 1.4 billion reports, and every one was generated before launch day. That matters because Wrapped launches everywhere at one moment, and Spotify says reactive auto-scaling doesn't move fast enough for that spike.
// what to take away
- For the 2025 Wrapped Archive, Spotify picked up to five remarkable days from each eligible listener's year and wrote a short LLM-generated story about each one: about 350 million users and roughly 1.4 billion reports, all generated before launch day in a four-day initial run plus regeneration of the problem reports. To make that affordable, a smaller model was fine-tuned on reviewed outputs of a frontier model, then refined with Direct Preference Optimization.
- Each user's reports were written concurrently into one row of a column-oriented key-value database. A single "done" list updated by read-modify-write would lose updates when two writers raced, so each day got its own column qualifier named by its date (20250315), and writes for different days land in different cells with no locks. The report is written first and the "done" mark second, so a reader never finds a mark pointing at a missing story.
- Wrapped launches everywhere at one moment, and Spotify says reactive auto-scaling does not move fast enough for that spike. Hours before launch it pre-scaled compute pods and database nodes and ran synthetic load tests in every region to warm connection pools and caches. Larger models acting as judges graded a sample of about 165,000 reports, and bad reports found across the corpus were deleted and regenerated.
What Wrapped Archive was
Wrapped Archive was part of Spotify's 2025 Wrapped. For each eligible listener, Spotify picked up to five "remarkable days" from their 2025 listening and wrote a short, personalized story about each one with a language model, grounded in that day's actual listening. Everything below is how Spotify says the 2025 Archive was built. It says nothing about how the 2026 Wrapped works.
The days came from a priority-ordered set of heuristics. Some were simple totals: the biggest music day and the biggest podcast day by minutes, the biggest discovery day by first-time artists, the day spent most with a favorite artist or one genre. Others were harder: a most nostalgic day (a spike in older catalog), a most unusual day (furthest from the listener's usual taste), and anchors like a birthday or New Year's Day. Candidates were ranked by narrative potential and statistical strength, and the top five or fewer were kept.
Why the stories were written before launch
Wrapped launches globally at a single moment, with no gradual rollout. Spotify describes the service as idle one second and hit by millions of users the next. Auto-scaling reacts to load it has already observed, and Spotify says reactive scaling does not move fast enough for a spike like that. Spotify's answer to the spike was to pre-scale and pre-warm its infrastructure (below). The stories themselves were all generated ahead of time: about 350 million eligible users, up to five reports each, roughly 1.4 billion reports, all before launch day. The link between the two is our reading, not Spotify's: with every report already written, launch traffic only has to fetch stories, not wait on a model call each. Spotify's own stated reason for generating everything in one initial batch was the capacity it had available.
The generation pipeline
- A distributed data pipeline computed each user's candidate days and stored the days and the relevant listening data in object storage.
- When generation started, those snapshots were published to a pub/sub message queue, so the generation stage consumed them asynchronously.
- Reports for a user were generated one at a time, so earlier reports could be passed into the prompt for later ones and the stories would not repeat each other. (The storage section of the same post says a user's reports were generated independently and written concurrently; the post does not explain how the two fit together.)
- The run had to sustain thousands of model requests per second. Spotify processed everything as one initial batch, and the engine ran for four days without pause, with dashboards tracking progress, reliability and projected completion. After that pass the team checked for missing or inconsistent reports and regenerated the problem ones.
Making a billion LLM calls affordable: distillation
Spotify says its high-end models were excellent for prototyping but economically unfeasible for more than a billion reports. So it distilled: a frontier model produced high-quality reference outputs, the team curated a tightly reviewed "gold" dataset from them, and a smaller, faster production model was fine-tuned on that set. It then applied Direct Preference Optimization (DPO) using a small, carefully built preference dataset from A/B-tested human evaluations. Spotify reports the fine-tuned model reached strong preference parity with the original baseline.
The prompt had two layers. The system prompt set the rules: every claim traceable to real listening, a witty and sincere tone, and safety defaults such as no references to drugs, alcohol, sex or violence. The user prompt carried the day's detailed listening log, a precomputed stats block (because, as Spotify puts it, LLMs are bad at math), the listener's overall Wrapped data, the category of day, previously generated reports, and the listener's country for spelling and vocabulary.
The storage design that made parallel writes safe
Reports were stored in a distributed, column-oriented key-value database built for high-throughput writes. Each user's data lived in one row keyed by the user ID, and each user's reports were generated independently and written concurrently, so several writes for the same row could land at nearly the same moment.
The obvious schema would track completed days as a serialized list in one cell. Updating it is a read-modify-write: read the list, add your day, write the list back. Two writers that both read the list before either writes will each write back a list missing the other's day, and one update is silently lost. Spotify notes that this approach would have been vulnerable to race conditions and lost updates, and designed it out:
- Each day got its own column qualifier inside a dedicated column family, named by the date in
YYYYMMDDform. March 15 becomes20250315, June 22 becomes20250622. - Writes for different days therefore touch different cells in the same row. There is no shared value to read first, no lock and no coordination.
- The report text itself lived in a separate table keyed by user and date.
- Writes happen in a fixed order: the report content first, then the lightweight metadata entry that marks the day complete. A reader can never find a "done" mark pointing at a report that was not written.
row key: <user id> column family "days": 20250315 -> done 20250622 -> done ... reports table: (<user id>, 20250315) -> report text
(The layout above is a sketch of what Spotify describes, not its actual schema.)
Getting ready for the launch second
Hours before launch, Spotify pre-scaled compute pods and database node capacity and coordinated capacity with its model provider. It then ran synthetic load tests in every region where the service is hosted, timed to start after pre-scaling and before real traffic, and long enough to cover the launch window. On the compute side that warmed connection pools and caches; on the storage side, database nodes distributed their tablet assignments and warmed their block caches. In Spotify's words, when real traffic arrived, nothing was cold.
Checking 1.4 billion stories
Human review of every report was impossible, and Spotify points out that even a 0.1% failure rate would mean millions of broken stories. Reports went into an evaluation warehouse, and larger models acting as judges graded a random sample of about 165,000 reports on accuracy, safety, tone and formatting. Instead of one large judging prompt, they used several small rule-based queries per report and required the judge to give its reasoning before its score, which made grading more consistent.
Failures fed a remediation loop: model-based evaluators and targeted human review found bad reports, SQL and regex searches found structurally similar ones across the corpus, and affected reports were deleted in bulk and regenerated. One example: some Biggest Discovery Day stories celebrated the wrong number of artists because a subtle timezone bug upstream occasionally picked the wrong day. Because report IDs were logged with full metadata, the team traced it to the source, measured how common it was, fixed the pipeline, and replayed the affected reports.
Terms
- Read-modify-write
- Updating a value by reading it, changing it in your own code, and writing the whole thing back. Unsafe when two writers can do it at once.
- Lost update
- The race where two writers read the same value and the second write erases the first writer's change.
- Column-oriented key-value database
- A store where each row is found by a key and holds many named cells grouped into column families; writes to different cells of one row do not conflict.
- Column qualifier
- The name of an individual cell within a column family. Here, a date such as
20250315. - Distillation
- Training a smaller model on outputs of a larger one so it keeps much of the quality at a fraction of the cost.
- DPO (Direct Preference Optimization)
- Fine-tuning a model directly on pairs of preferred and rejected outputs.
- LLM as a judge
- Using a language model to grade another model's outputs against a rubric.
- Pre-scaling
- Adding capacity before expected load arrives instead of waiting for auto-scaling to react.
- Synthetic load test
- Generated traffic sent to a system to warm it up or measure it before real users arrive.
Questions
How does Spotify Wrapped get made so fast?
For the 2025 Wrapped Archive, Spotify generated the stories ahead of time, roughly 1.4 billion reports for about 350 million eligible users, in a four-day initial run plus regeneration of the problem reports, all before launch day, and pre-scaled and pre-warmed its servers and database hours before launch.
Did Spotify use AI to write Wrapped?
For the 2025 Wrapped Archive stories, yes: a smaller model fine-tuned on reviewed outputs of a frontier model wrote each report from the listener's real data, and larger models graded a sample of about 165,000 for accuracy, safety, tone and formatting.
What is a lost update?
Two writers read the same value, each changes its own copy, and each writes it back. The second write replaces the first, so the first writer's change disappears without an error.
How do you avoid race conditions without locks?
Give each concurrent writer its own place to write. Spotify stored each day's "done" flag in its own column named by the date, so parallel writes for different days never touch the same cell.
// further reading
- Inside the Archive: The Tech Behind Your 2025 Wrapped Highlights ↗: Spotify's full write-up, including the prompts, the evaluation framework and its lessons
// transcript
Last year, Spotify wrote 1.4 billion Wrapped stories before anyone opened one. They were Wrapped Archive in 2025, stories about up to five remarkable days in each eligible listener's year, and every one was finished before launch day. That matters, because Wrapped doesn't roll out slowly. It launches everywhere at one moment: one second the service is idle, and the next, millions of people are opening it. Auto-scaling only reacts once load arrives, and every story written on demand would be a model call in that rush. Here's how they did the slow part first. About 350 million eligible users, with up to five stories each, came to roughly 1.4 billion reports. A frontier model was too expensive at that size, so they fine-tuned a smaller model on a reviewed set of its outputs. Then it ran for four days straight, at thousands of requests a second. That's where a classic bug could creep in, because the writes landed in parallel, and a user's reports could hit the same row of a column-oriented database at nearly the same moment. The obvious way to track which days are done is a list: read it, add your day, write it back. But two writers can read the same list at once, and whichever writes second wipes out the other's day. That's a lost update. Instead, every day got its own column, named by its date: March fifteenth becomes 20250315. Two writers for two different days touch two different cells, with nothing to lock and nothing to read first. Each write also goes in order, the story first, then a mark saying the day is done, so nobody sees a link to a missing story. Hours before launch, they scaled up servers and database nodes and ran synthetic traffic in every region, so caches and connection pools were warm. When the rush came, nothing was cold, and the stories only had to be fetched, not written. Spotify's own takeaway is that concurrency problems are often data modeling problems. The fix for the race wasn't a lock. It was giving each writer its own place to write.
// source
This explainer is based on Inside the Archive: The Tech Behind Your 2025 Wrapped Highlights by Spotify ↗. The original reporting and technical work belong to its publisher.