Full talk · edited transcript

Building Query Expert MCP: Using RAG to Build an Analytics Agent That Goes Beyond Text-to-SQL

Daniel Gole, Philip Azar18 Jun 2026

Speakers: Phil Azar (machine learning engineer, Applied AI, Block) and Daniel (Dan) Gole (product data scientist, Block)

Query Expert is an internal data agent at Block used by over half the company to self-serve insights. This article covers why it was built and how it is built on Databricks: automated documentation of tables at scale, mining query history for domain-specific query patterns, a human-in-the-loop update flow, and RAG-based retrieval that scales to a 12,000-person organization while supporting domain scoping for individual teams.

Phil has been at Block for four and a half years in various data roles and for 16 months has worked on internal AI tools for data scientists. Dan is a product data scientist who still does product data science as his day job, took part in early prototyping and building narrower versions of the tools, and has been an early super user and alpha tester.

Continue reading — it's free

Google or a one-time email code. No password.