Encoding Your Domain Expert: The Context Layer Behind Spotify's Data Assistant
- Source
- engineering.atspotify.com
- Publisher
- Spotify
- Author
- Spotify Engineering
- Date

Context
Spotify's data assistant depends on experts teaching it what company data means. Each subject area has curated table information, approved question-and-query examples, and business definitions. The assistant selects that , writes and executes a database query, and returns the answer with its query and sources. Spotify's engineering account explains how this makes expert knowledge reusable.
Curation proved selective: experts accepted only 12.5% of examples proposed from historical queries. Rejected examples included and one-off exploration, as well as misleading patterns. That percentage measures suitability as teaching material, not the accuracy of employees' queries. A query can answer one person's immediate question while being a poor template for future answers.
- Context and context window — Context is the information available for a generation; the context window is the capacity available to hold it.
- Debugging — Following a failure back along the data path to the place where the data first goes wrong.
- Schema — A written description of a data format: which fields exist, what kind of value each holds and which are required.
articleWhen Can You Ship on Offline Evals Alone?
articleAI Changed How Spotify Builds. What We Learned (and Fixed) About Quality at Higher Velocity- articleSpotify’s Backstage Portal cut my Claude Code token usage by 90%
articleCoding Is No Longer the Constraint: Scaling Developer Experience to Teams and Agents at Spotify

