Problem & Build·Output·How to Use

BI CHATBOT PROTOTYPE

SNOWFLAKE CORTEX

Elena Alfonsi

Data Engineer

Berlin — June 2026 | Internal Knowledge Sharing

Problem & Build·Output·How to Use

THE PROBLEM

  • Non-technical stakeholders at Heydata cannot self-serve data insights without relying on analysts or waiting for dashboard updates
  • They ask recurring questions that are already answerable by existing data models — but the interface (dashboards, SQL) creates a bottleneck
  • No conversational layer sits on top of the data warehouse that allows business users to ask questions in plain language and get trusted, governed answers instantly

The challenge: How can we create a reliable conversational BI interface that is GDPR compliant — and also monitor its costs?

Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

WHAT WE BUILT — OVERVIEW

  • A new dbt schema with data models optimized for agentic use, with field-level documentation pushed to Snowflake
  • A new Snowflake schema for the semantic objects: 2 Cortex Analysts + 1 Cortex Agent
  • A dedicated warehouse for agent queries (cost isolation)
  • 2 new roles and 1 budget for access control and cost governance
  • Stored procedures that automatically block usage when the credit limit is reached

Effort: ~5–6 days — most of it spent figuring out the infrastructure needed to monitor and limit costs

Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

THE SEMANTIC LAYER

New dbt schema — optimized for agentic use:

  • Our reporting models are currently optimized for Metabase, which means they're not always the best fit for Cortex Analysts
  • The new models include field-level documentation that is directly brought to Snowflake — this makes it faster and easier to create Cortex Analysts on top of them

New Snowflake schema for semantic objects:

  • 🔹 Clients Analyst (Cortex Analyst / semantic view) — answers questions about clients and their history
  • 🔹 Deals Analyst (Cortex Analyst / semantic view) — answers questions about deals and sales/AM targets
  • 🤖 1 Cortex Agent — orchestrates both analysts to answer user questions
Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

COST GOVERNANCE & ACCESS CONTROL

Dedicated warehouse — used only by agent queries, makes cost monitoring straightforward

2 new roles:

  • CHATBOT_ACCESS_ROLE — grants the access needed to use the chatbot
  • CHATBOT_USER_ROLE — granted CHATBOT_ACCESS_ROLE by default; individual user roles (e.g. DEV_ELENA, DEV_DAVID) are granted CHATBOT_USER_ROLE

1 budget — monitors Cortex feature usage of tagged users:

  • ⚠️ Sends notification when budget is almost reached
  • 🛑 When budget is reached → stored procedure removes CHATBOT_ACCESS_ROLE from CHATBOT_USER_ROLE, blocking all chatbot access

⏱️ Important: Snowflake's standard budget monitor has an 8-hour lag for AI features — enabling low-latency budget reduces this to 2 hours (safer, but more expensive)

Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

THE OUTPUT

Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

SHOW THE OUTPUT


👉 ai.snowflake.com/mfcmbpo/xb39510/#/ai

Live demo time!

Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

HOW TO USE IT

Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

WHERE IT FITS

Can be used in:

  • 🟢 Sales
  • 🟠 Delivery

Use case: "Use this when you want to set up a BI chatbot with Snowflake Cortex"

Additional material: [LINK] (to be added)

Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

WHAT'S NEXT

Next quarter:

  • Selected Heydata users will test the tool so we can evaluate user experience and actual costs

Parallel exploration:

  • Build other chatbot MVPs using Bedrock + Metabase MCP and other options available since we set up Bedrock
  • Goal: select the best option based on:
    • 🎯 User experience
    • 💰 Cost
    • 🔒 Compliance
Gemma Analytics | BI Chatbot Prototype (Snowflake Cortex)
Problem & Build·Output·How to Use

THANKS!

QUESTIONS?

elena.alfonsi@gemmaanalytics.com

Hey everyone, I'm Elena and I want to walk you through the BI chatbot prototype we built on Snowflake Cortex — what problem it solves, how it works, and where we go next.

The core problem is simple: business users at Heydata have questions their data can already answer, but they can't get to the answers without going through an analyst or a dashboard. They need a conversational layer on top of the warehouse — but it has to be GDPR compliant and cost-controlled.

Here's the full picture of what we built. It's three layers: the data models, the semantic objects, and the cost governance infrastructure. Let me walk through each one.

First, the data layer. Our existing Metabase-optimized models weren't ideal for Cortex, so we created a separate dbt schema with models designed for agentic use. The key difference is field-level documentation that flows directly into Snowflake — Cortex Analysts use these descriptions to understand what each column means. On top of that, we created two Cortex Analysts as semantic views and one Cortex Agent that ties them together.

Now the cost governance piece, which is where most of the effort went. We created a dedicated warehouse just for agent queries so costs are easy to isolate. Two roles control access: CHATBOT_ACCESS_ROLE has the permissions, CHATBOT_USER_ROLE inherits it, and individual users are granted CHATBOT_USER_ROLE. The budget monitors Cortex usage and does two things: warns when you're close, and automatically revokes access when the limit is hit — via a stored procedure that removes CHATBOT_ACCESS_ROLE from the user role. One gotcha: Snowflake's standard budget monitor has an 8-hour lag for AI features. You can enable low-latency mode to get that down to 2 hours, but it costs more.

Let's look at the actual interface. This is the Snowflake AI portal — I'll walk through a few example questions live to show what the chatbot can do.

This fits both sales and delivery contexts. On the sales side, it's a concrete prototype we can show prospects. On the delivery side, it's a pattern we can replicate for clients who want conversational analytics on their Snowflake data.

Next quarter, selected Heydata users will start testing this to give us real data on UX and costs. In parallel, we'll build MVPs with Bedrock and Metabase MCP so we can compare approaches head-to-head across user experience, cost, and compliance. The idea is to pick the best tool for the job, not commit to one stack.

That's it — happy to answer questions about Cortex, the cost governance setup, or how this compares to other approaches we're exploring.