Problem
Spotify has more than 70,000 datasets and petabytes of data, and no single expert knows them all. Analysts waited for a domain expert on Slack, and demand grew faster than experts could answer. Putting all schemas into an LLM fails. Even a million-token window cannot hold the warehouse, and a schema does not say what "active user" means or which of several similar tables is right. Given many tables, a model picks the wrong one with confidence.
Example from the article: a column of type INT64 does not tell the model that values below 100 are legacy test data or how they differ from real data.
Solution in brief
Split the warehouse into "clusters", each owned by a named team of domain experts. A cluster holds datasets with profiling, expert-approved question-SQL pairs and business docs. The agent picks a cluster, writes SQL from that context, and a health score tells owners where the context has decayed.
Questions this case answers
- How to make a natural-language data assistant give correct answers when the data catalog is too large for the model's context window and column types do not carry business meaning
- How to keep expert-curated context for an LLM accurate while the underlying data keeps changing
- How to give a text-to-SQL assistant reliable domain knowledge when the warehouse has tens of thousands of datasets?
- How to decide which example queries are safe to show an LLM as few-shot examples?
Tools and methods
- Context clusters — domain-sized bundles of datasets, vetted pairs and docs, owned by a named expert team.
- Few-shot question-SQL pairs — examples approved by experts that teach the model query patterns and data semantics.
- ReAct loop — the agent reasons and acts in steps, adjusting after each tool call.
- Cluster health score — continuously computed signals that show where curation is needed.
- Slack bot, MCP server, web UI — where users meet the agent.
Google or a one-time email code. No password.