New: one score for how consistent your answers are. See more

Self-serve analytics with AI: a playbook for every data setup

How to let your team ask data questions in Claude or ChatGPT, whatever your data setup.

Updated

Jump to a section

Your team already uses Claude or ChatGPT. Most of them have already pasted a spreadsheet into it and asked a question. The step from there to "anyone can ask about the business and get the right number" depends less on the AI than on where your data lives today.

This playbook covers five starting points, from spreadsheets to a fully modeled warehouse. Find yours below, read that section, then read the part every setup shares. That shared part is where most setups go wrong.

Find your setup

Every setup needs the same five things before you hand an AI to the whole team: read-only access, the handful of tables that count, written definitions for your top ten questions, a rule for who sees what, and a way to see what people actually ask. The setups differ in how hard each one is to get.

Your data is in spreadsheets

Signups from the October campaign? answered in Claude or ChatGPT from files uploaded into the chat: Excel, Google Sheets, Airtable and a CRM export

What people will ask: "How many signups did we get from the October campaign?" "Which accounts in the CRM export haven't been contacted in 60 days?" "Total donations by region this quarter."

Before you give AI access: pick the one or two files people already treat as the source of truth, and write down what each column means. A column called status with values 1 to 4 is a guess for the AI unless someone says what 3 means.

The DIY version: people upload the file into Claude or ChatGPT and ask. It works for one person and one file. It breaks quietly in three ways. Each person uploads their own copy, so two people get two answers from two versions. The AI forgets the file and its definitions between conversations. And nobody can see what was asked or which file was used.

You've outgrown it when the same file gets re-uploaded every week, or two people bring different totals to the same meeting.

Further reading: Query a CSV with Claude, Connect Google Sheets to Claude, You don't need a data warehouse.

You have one production database

Which partners haven't submitted since September? answered in Claude or ChatGPT through a database MCP server and a read-only user, from a Postgres, MySQL or SQL Server app database

This is where many teams actually are: an app or operations database (Postgres, MySQL, SQL Server) that holds the real records, plus spreadsheets collected from the field, and dashboards that show a point in time. It's also where the stakes jump, because the AI is now touching a live system.

What people will ask: "How many active sites reported this month, compared with last year?" "Which partners haven't submitted data since September?" "Show the trend, not just this quarter's number."

Before you give AI access:

  1. A read-only login. Create a database user that can only SELECT, and if you can, point it at a read replica so a heavy question never slows the application. Never hand the AI the credentials the app uses. See Claude read-only database access for the exact grants.
  2. The tables that count. A production schema has hundreds of tables, most of them app plumbing. Pick the 10 to 20 that answer real questions, and if the raw tables are awkward, put a few views on top with friendly names.
  3. Who sees what. If some data is under a partner agreement or an NDA, decide now which people may query it, and keep it in its own schema or behind its own grants so the rule is enforceable rather than a request.
  4. Definitions for your ten most-asked questions. Pull them from the requests your team already answers by hand. "Active site" and "submitted" mean something specific to you, and the AI will invent a meaning if you don't write one down.
  5. A baseline. Count how many data requests reach your team each week before you start. If the goal is fewer requests, you need the before number to show the after.

The DIY version: an MCP server for your database (open-source ones exist for Postgres, MySQL and SQL Server) plus a read-only user gets one technical person asking questions in an afternoon. Rolling it out to a team is the bigger job: every person's laptop holds database credentials, there's no per-person access, definitions live in each person's prompt, and nothing records what was asked. Plan for weeks, not days, to get it to where non-technical people can use it safely.

What breaks after month one: the schema changes as new data arrives and the AI's picture of it goes stale. People who don't know which model to pick or how to phrase a question get a confident wrong answer and stop trusting it. Request volume doesn't drop, because the data person is now fielding "is this number right?" instead of "can you pull this?"

Start narrow. Pick one team and the five questions they ask most, recruit one champion in that team, and set up a shared place to log questions the AI got wrong. Expand only once that team's answers are right.

You've outgrown it when questions need data from more than one system (the database plus the field spreadsheets plus a funder report), or reporting queries start to compete with the application for the database.

Further reading: Analytics without a data team, Safe AI database access.

You have a warehouse, tables still raw

Which churned customers had open support tickets? answered in Claude or ChatGPT through a warehouse MCP server and a context file, from raw tables in BigQuery, Snowflake, Redshift or Databricks

Data from several systems lands in BigQuery, Snowflake, Redshift or Databricks, usually through a loader like Fivetran or Airbyte, but nobody has modeled it. The tables mirror the source systems.

What people will ask: cross-system questions, which is why you have a warehouse. "Which customers who churned last quarter had open support tickets?" "Revenue by acquisition channel."

Before you give AI access: the raw tables are the hard part. The same customer appears with three different IDs, deleted rows are still there with a flag, and timestamps are in UTC in one source and local time in another. Write those facts down per table. That context is what turns a plausible query into a correct one, and it's usually more valuable than building models first.

The DIY version: the warehouse vendor's MCP server or an open-source one, plus a context file the AI reads. The context file is the real work: describing every table that matters, the joins between sources and the gotchas, then keeping it current as loaders add columns. Expect it to be one person's part-time job.

You've outgrown it when the same join or the same metric gets re-derived in every conversation and comes out slightly different each time. That's the signal to write it down once as a definition or a model.

Further reading: Do you need a modeled warehouse?, Context engineering for analytics.

You have a warehouse, partly modeled

Revenue by acquisition channel? answered in Claude or ChatGPT through the dbt MCP server, from modeled and raw tables in BigQuery, Snowflake, Redshift or Databricks

You have dbt or something like it, a set of clean models for the core entities, and a few definitions everyone agrees on. Plenty of the warehouse is still raw.

What people will ask: the same questions as on a raw warehouse, but now some of them have an official answer. The risk shifts from "the AI can't find the data" to "the AI found the raw table instead of the model, and the number doesn't match the dashboard."

Before you give AI access: point the AI at the models first and the raw tables second. Turn your agreed definitions into something the AI reads every time, with the SQL that produces each one, so "revenue" means your revenue. Your dbt project already describes most of this: model descriptions, column docs and tests are ready-made context.

The DIY version: the dbt MCP server exposes models and metadata to the AI, and works well for the people who already know dbt. For a wider team you still need the pieces it doesn't cover: who sees which models, what people asked, and whether answers stay the same week to week. See what the dbt MCP server can do.

You've outgrown it when most questions hit modeled tables and the remaining arguments are about definitions, not data. That's a good place to be.

You have a fully modeled warehouse

Why did this dip in March? answered in Claude or ChatGPT through a semantic layer (LookML, dbt metrics or Cube), from a modeled warehouse in BigQuery, Snowflake, Redshift or Databricks

A warehouse, a semantic layer (LookML, dbt metrics, Cube, a BI tool's model) and dashboards people rely on.

What people will ask: follow-up questions the dashboards don't answer. "Why did this dip in March?" "Break that down by the segment that isn't on the dashboard."

Before you give AI access: your definitions exist; the question is whether the AI uses them. Make the governed metrics the first thing it reaches for, and make it say when it had to go outside them.

The DIY version: many BI and semantic-layer vendors now ship their own AI assistant or MCP server. They answer well inside the model and stop at its edge, and they usually mean one more tool with its own seats. The gap is the questions that need data or logic the model doesn't cover yet.

You've outgrown it when you haven't. The work here is keeping the AI and the model in step as both change.

Further reading: What is a semantic layer?, Evaluate your agentic analytics stack.

The layer every setup shares

Your setup changes how hard it is to reach the data. It doesn't change what has to sit between the person asking and the data. Whatever you have, a setup that works for a whole team has these six parts, and a DIY setup ends up building each of them by hand, again, every time the data setup grows.

PartWhat it doesWhat happens without it
ContextTells the AI what each table and column means, how sources join, and the gotchasPlausible SQL on the wrong table
DefinitionsOne agreed SQL answer for "revenue", "active", "churned"Three people, three numbers
AccessEach person queries only the tables they're allowed, enforced before the query runsSensitive or NDA data in the wrong chat
Query logEvery question, who asked it, and the SQL it ranNo idea what people ask or what went wrong
Feedback loopWrong answers and missing definitions get fixed where everyone benefitsThe same mistake made by every person, forever
EvalsThe common questions re-asked on a schedule, checked against a trusted answerA model update or schema change silently moves a number

The first two decide whether answers are right. The middle two decide whether you can safely hand it to the whole team. The last two decide whether it stays right after month one, which is where most setups quietly fail. Maintaining agentic analytics covers that part in depth, and How to make sure AI agents get data answers right covers evals.

Before rolling out, whatever your setup, run the team self-serve analytics checklist.

How Contextflo handles every setup

Contextflo is that shared layer, built once. You connect your data, your team asks in the Claude or ChatGPT they already use (or any agent that speaks MCP), and every question goes through the same context, definitions, access rules and log.

How it works, whatever your setup:

  1. Connect your data, read-only. Setup takes about 10 minutes per source.
  2. Context is generated, then reviewed. Contextflo writes table and column descriptions from your schema, a connected GitHub or GitLab repo, and your docs. Your team reviews it instead of writing it.
  3. Definitions live in one place. Metrics, business concepts and verified saved queries that the AI reuses instead of re-deriving.
  4. Access is per person. Users go into groups, groups get table-level rules, and each rule is enforced before the query reaches your data.
  5. Every question is logged with who asked it and the SQL it ran. A grounded answers view shows the share of conversations that used an approved definition, and lists the ones that didn't so you know what to define next.
  6. Evals run weekly. Your common questions are re-asked in several phrasings and checked against a trusted query, so drift shows up before an exec sees it.
  7. Answers become assets. Save a query, schedule a report, or turn an answer into a dashboard that re-runs its own SQL.

What day one looks like for each setup:

Your setupDay one with Contextflo
SpreadsheetsUpload CSV or Excel files, or connect Google Sheets tabs. Each becomes a table the whole team queries, kept in one place instead of re-uploaded per chat.
One production databaseConnect Postgres or MySQL with a read-only user, pick the tables that count, and set who sees what.
Warehouse, tables still rawConnect BigQuery, Snowflake, Redshift, Databricks or ClickHouse. Generated context covers the raw tables and their gotchas.
Warehouse, partly modeledConnect the dbt repo as a context source so model and column docs flow in, and turn agreed definitions into metrics.
Fully modeled warehouseWrite your governed metrics as Contextflo definitions pointing at your modeled tables, so the AI reaches for them first and grounded answers show when it didn't.

If you want to see it on your own setup, book a 15-minute walkthrough or start free with one user and one data source.