# The New Job of the Data Team Is Providing Context to AI — George Fraser, Fivetran

George Fraser, Fivetran

AI Engineer Code Summit 2026

[Talk page](https://ai.engineer/talks/jluFLznjXSo-new-job-data-team-is-providing-context) · [Video](https://www.youtube.com/watch?v=jluFLznjXSo)

## The New Job of the Data Team Is Providing Context to AI

George Fraser shows how to turn an existing data warehouse into the foundation for an AI analyst. His Formula 1 demo combines dbt models, a directory called AGENTS and vector search over press conference transcripts.

### What would make an AI’s sales advice worth taking?

[0:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=12s)

Imagine your head of sales opening an AI assistant and asking for its three best ideas for improving pipeline conversion. That is a perfectly reasonable question. It also leaves almost all the analytical work to the assistant. What does conversion mean at this company? Where are deals getting stuck? What evidence would justify recommending a change?

[George Fraser](https://www.fivetran.com/people/george-fraser), co-founder of Fivetran, thinks data teams should encourage questions this open-ended. Agents are already good at writing SQL and making charts. He jokes that dashboards have been renamed “artifacts,” then makes a more interesting prediction. Once dashboards become cheap to produce, companies should have more of them, and many should be short-lived.

The definitions behind those dashboards still need to be right. They matter even more when an autonomous agent asks its own questions and acts on the answers. That gives the data team a new job. It has to make what the company knows about its data available to any agent doing the analysis.

Fraser points to several companies using much the same design.

- **Ramp** connects an AI analyst to data modeled with dbt and stored in Snowflake.
- **Stripe** connects its internal knowledge agent to its data platform.
- **DoorDash** replicates and models its data before giving its analyst access to it.
- **OpenAI and Anthropic** have each built internal agents that use their existing data platforms.

In each case, AI becomes another consumer of the infrastructure originally built for business intelligence. Replicating records into one warehouse makes cross-system joins possible. Modeling simplifies the messy representations in the source applications and expresses the company’s own rules. An agent benefits from much the same work that makes a database usable by a new human analyst.

Where the agent changes the economics is reading. Suppose an analyst can identify a group of customers with certain characteristics. The agent could then read a thousand transcripts of calls with those customers. The familiar work of defining the group makes a previously impractical investigation possible.

![A chat illustration accompanies a request for three ideas to improve pipeline conversion. The slide asks whether a sales leader's AI assistant can provide a good answer.](https://ai.engineer/api/talk-essay-media/c7572908ab3f405dccb59bbc9dd0d668a44cd4b63f1527dc7c5689407f927fe8)

AI can already write SQL and build dashboards. Fraser proposes a harder test for data teams. When the head of sales asks for three ways to improve pipeline conversion, can the assistant ground its advice in the company’s own data?

### Why connecting an agent to every source application breaks down

[6:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=372s)

If the question concerns Salesforce, why not give the agent the Salesforce connector? Extend that reasoning across the company and you get what Fraser calls the MCP web. The assistant uses the Model Context Protocol to reach each system of record separately. A human analyst could work the same way, logging into one application after another and piecing together an answer. It would be slow and remarkably easy to get wrong.

The agent inherits three problems that the warehouse already solves.

- **Business rules.** Operational records can be a mess. Fraser considers Fivetran’s Salesforce instance especially messy, though he declines to claim the championship. The cleaned-up interpretation of those records already lives in the warehouse.
- **Query languages.** Salesforce exposes SOQL, Jira has JQL, and the Slack search tool in his example offers the terms you could type into the search bar. Each gives the analyst a different and limited way to query the data.
- **Joins.** None of those individual tools can issue a single join across all three systems. The agent has to reconcile the separate results itself.

Direct connections are still useful for taking an action or fetching a particular record that somebody just updated. Going to the source avoids waiting for the next replication. For a question about patterns across the business, the warehouse has a considerable advantage.

So where does MCP fit at Fivetran? A Slack data bot, **Claude** and an autonomous customer support agent all connect through an MCP server to BigQuery. The support agent can answer certain customer questions directly when it has high confidence. Behind all three clients sits the same dbt model that Fivetran has developed over roughly ten years to serve its BI tools.

The consequential design choice is what the server lets the agent query. MCP can expose a collection of isolated application searches. It can just as easily expose a database where somebody has already done the work of making those records fit together.

![An AI assistant connects separately to Salesforce, Jira, Slack and other app MCP servers. The slide highlights messy data, difficult query languages and the inability to join across sources.](https://ai.engineer/api/talk-essay-media/746b7dc2f52d00541ce1224c5a02d1176d42b523760d14fe507573d5adbc4f5f)

Fraser compares giving an AI assistant a separate MCP server for each app to asking an analyst to click through Salesforce, Jira, and Slack. The assistant still has to query messy data in each app’s own language and can’t join records across sources.

### Give the agent a map it can query with SQL

[10:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=643s)

Fivetran tried giving agents database access and letting them look around. The answers were disappointing. Even a well-modeled warehouse can be a dreadful place to start if you have no idea which tables to use or how they relate.

Fraser’s response to the growing market for context catalogs is that metadata is itself data. The database is quite a good place to keep it. Fivetran’s proposed [Agents Schema](https://fivetran.com/docs/context-layer/agents-schema) plays a role similar to an `AGENTS.md` file in a code repository. It gives the agent a known place to start discovering its surroundings.

Create a schema named `AGENTS`. Its entry point, `AGENTS.ROOT`, contains Markdown describing the other metadata tables available in that schema. What can a newly connected agent learn on its first query? The [documented directory lookup](https://fivetran.com/docs/context-layer/agents-schema) is small enough to remember.

```sql
SELECT provider, key, content
FROM AGENTS.ROOT
```

The returned descriptions tell the agent where to query next. The contents beyond that directory can vary considerably by company. Fivetran’s production metadata largely represents its Looker model because that was the best account of its business data available internally. A company with better documentation in another tool can publish that instead.

Fraser compares the agent to the protagonist of *Memento*, forever writing notes to himself. An agent can interpret an ambiguous question and explain a result in ordinary language, yet it is a poor place to entrust the company’s long-term memory. Keeping the business data and the notes explaining it in the warehouse gives every new session somewhere to look.

### Build an F1 analyst from telemetry and press conferences

[13:57](https://www.youtube.com/watch?v=jluFLznjXSo&t=837s)

The other addition to the warehouse is searchable text. A conventional dashboard has little use for a pile of press conference transcripts. An agent can read them, provided it can find the passages worth reading. Fraser prefers the warehouse’s built-in vector index for this job. Even if a specialist index does somewhat better at search, keeping everything together makes it much easier to combine a search by meaning with ordinary SQL conditions.

Formula 1 makes a useful test case because it has both kinds of data in abundance. You can understand the questions without first having to learn how Fivetran’s business works.

- **The OpenF1 API** supplies structured racing data, down to telemetry describing where each car is at different moments.
- **The F1 website** supplies the rules, a glossary of racing terminology and transcripts of post-race press conferences. The long documents can live in ordinary SQL text columns alongside the racing data.

Fraser had **Codex** write two connectors using the Python [Fivetran Connector SDK](https://fivetran.com/docs/connector-sdk). The SDK lets the developer supply the code that captures the data. Fivetran runs the connectors, which call the sources, interpret their responses and deliver rows to source tables in BigQuery. Fraser recommends giving the coding agent the Connector SDK skill to help it write that capture code.

The API’s representation is awkward to navigate directly. dbt reshapes the source tables into a normalized schema that the analyst can use. The same transformation pipeline incrementally generates vectors for the text, making the documents searchable inside BigQuery.

**Gemini** was a convenient choice of analyst given the Google Cloud setup. Its key system instruction is simply to start at `AGENTS.ROOT`. As the warehouse evolves, updating the directory and the metadata it points to lets the agent discover the changes without rewriting its system prompt. Another agent capable of querying the warehouse could follow the same instructions.

### Put embeddings in dbt and known answers in CI

[18:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1108s)

What does it take to turn the F1 glossary into something the agent can search by meaning? The example uses an ordinary dbt model. Most of the model is SQL. Jinja blocks give dbt additional instructions about how to run that SQL as part of a data pipeline.

There are two pieces to look for in the model. One generates an embedding, a numerical representation of the glossary text that allows comparison by similarity. The other asks the warehouse to create a vector index over the embeddings. Incremental processing lets the pipeline add searchable material as the underlying data changes.

The distinction matters when building the rest of the analyst. The pipeline prepares the searchable representations ahead of time. At question time, the agent can use the index to locate relevant text and read what it says.

A small Python evaluation suite runs in continuous integration. Each test asks a question with ten possible answers, one of them correct. That makes it straightforward to catch a regression when a change breaks a question the analyst used to answer. The format is deliberately narrow. Scoring a known answer is considerably easier than judging the quality of three open-ended recommendations for improving sales conversion.

### Find what people said about tire problems in 2025

[19:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1168s)

A question about tire problems sounds like a text search. It becomes more interesting when the analyst wants specifically what people said in **post-race press conferences during 2025**. Which parts of that request should the database answer by similarity, and which can it settle exactly?

The example query combines two kinds of conditions.

- **Topic.** BigQuery’s `VECTOR_SEARCH` finds transcript content related to tire problems. A passage can be relevant even if the speaker used different words.
- **Eligibility.** Ordinary SQL predicates restrict the transcripts to post-race sessions and the year 2025.

A good semantic match from the wrong year is still the wrong evidence. Keeping the vectors and the transcript metadata in one database lets a single query express both requirements. The agent can then read the matching material to work out what people actually said.

![A SQL query combines vector and keyword searches for tyre degradation, joins transcript and meeting records, and limits results to five passages from 2025 post-race conferences.](https://ai.engineer/api/talk-essay-media/639722d343fc5e82774cd18fbc5de060caa8e68d84ca6129c959afeec514af4a)

BigQuery combines vector and keyword search to find the top 100 passages about tyre degradation. SQL joins those matches to transcript and meeting records, filters for 2025 post-race conferences, and returns up to five passages with source URLs.

### How three metadata tables guide an agent through 30 data tables

[20:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1228s)

It helps to trace two paths through the F1 warehouse. How does a press conference become searchable, and how does a newly connected analyst find out where to search? The first path carries the actual records. The second supplies the instructions needed to query them.

The source schema holds what the connectors deliver. The normalized schema holds what dbt produces, including the embeddings and indexes. The `AGENTS` directory guides the analyst to three kinds of metadata about those normalized tables. One describes what each table contains, another explains its columns, and the third tells the agent how to join tables together.

Those three metadata tables give the agent a way into 30 normalized tables. Fraser is still experimenting with how much description to supply. The useful finding here is how far the agent gets with just tables, columns and joins.

Building the demo took Fraser about five hours. He spent roughly two hours getting the first version together without looking closely at the code. After giving the talk once, he went back, decided the project needed some architecture and spent another three hours cleaning it up. Most of the time went into that second pass.

Where the F1 query gets its data and its instructions
The connectors and dbt prepare the records. Separately, the agent follows the warehouse directory to learn how to query those records. The two paths meet when the agent writes and runs its analysis.
- OpenF1 API — Structured race records and telemetry.
- F1 website — Rules, glossary entries and press conference transcripts.
- BigQuery source schema — Rows delivered by the two connectors.
- Normalized schema — 30 modeled tables, with embeddings and vector indexes for searchable text.
- AGENTS.ROOT — The system prompt directs the agent here to discover available metadata.
- Tables, columns and joins — Three metadata tables explain what the normalized data means and how its tables connect.
- Agent-written BigQuery query — The tire example combines semantic search with restrictions on transcript type and year.
- OpenF1 API → BigQuery source schema (Connector replicates race records)
- F1 website → BigQuery source schema (Connector replicates documents)
- BigQuery source schema → Normalized schema (dbt normalizes records and indexes text)
- AGENTS.ROOT → Tables, columns and joins (Directory identifies metadata to read)
- Tables, columns and joins → Agent-written BigQuery query (Guides table, column and join choices)
- Normalized schema → Agent-written BigQuery query (Supplies searchable text and structured fields)

### Who is the most improved driver this year?

[22:01](https://www.youtube.com/watch?v=jluFLznjXSo&t=1321s)

After a brief encounter with the curse of live demos and a missing Wi-Fi connection, Fraser gets his F1 analyst running in Gemini. He asks who the most improved driver is this year. The question has much the same shape as the sales question that opened the talk. The words are clear enough. The metric is missing.

Gemini first consults the three metadata tables describing the 30 normalized tables. Then it runs a small exploratory query to see what the database contains. Fraser often sees agents make these preliminary probes. In this case the agent pauses to ask what improvement should mean. Fraser chooses **race positions gained**.

With the metric settled, Gemini writes a much longer query with numerous joins. Who comes out on top under that definition? The answer it returns is **Lance Stroll**.

Someone in the audience objects that Stroll is a poor driver. Fraser finds that entirely compatible with the result. Being the most improved driver can be a little like being the company’s fastest-growing product. It is a surprisingly ambiguous endorsement. Stroll’s ranking is the agent’s result under the chosen measure, with the precise aggregation and comparison period left unspecified.

Two earlier questions show how much the kind of evidence can vary.

- **Which corners are toughest this season?** The analyst can examine actual crash records alongside what drivers said in press conferences. That gives it observations about both incidents and the experience of driving those corners.
- **Who is the handsomest F1 driver?** The agent initially refused. After some persuasion it chose Charles Leclerc, a verdict Fraser was happy to endorse. No warehouse definition was going to settle that one.

### What the data team should own

[26:06](https://www.youtube.com/watch?v=jluFLznjXSo&t=1566s)

The revealing moment in the live demo was the clarification. The warehouse could tell Gemini what racing data existed and how to join it. The person asking the question still had to say what counted as improvement. Once those two pieces were in place, the agent could work out a fairly involved query for itself.

Fraser has found this arrangement works better as models get more capable. The agent has room to decide what to inspect, when to ask a question and how to assemble the analysis. An elaborate intermediary that prescribes every retrieval step can limit how much the system benefits from a better model.

His recommendation is to give the data team ownership of context. That team already knows how to reconcile source systems, simplify records and express the company’s definitions. Keep those definitions in code, publish them where a warehouse-connected agent can discover them, and use standard components so the choice of assistant can change. There is a further benefit to writing the definitions as code. The agents can help maintain the very models they rely on.

## Key takeaways

- Give analytical agents access to the modeled warehouse that already serves BI. Direct application tools remain useful for actions and freshly updated individual records.
- Use `AGENTS.ROOT` as a stable entry point to queryable metadata. In the F1 demo, descriptions of tables, columns and joins guide the agent through 30 normalized tables.
- Keeping text, embeddings and structured fields together lets one SQL query combine semantic relevance with precise restrictions such as session type and year.
- Known-answer evaluations help catch regressions. Open-ended analysis also requires deciding what the question means, as the live driver ranking demonstrated.
- The data team can keep business definitions in code and make them discoverable across assistants, leaving agents free to choose the queries each question requires.

## Resources

- [Fivetran Agents Schema documentation](https://fivetran.com/docs/context-layer/agents-schema) — Explains the AGENTS.ROOT directory, how agents discover metadata providers and how to connect an agent through SQL or MCP.
- [Agents Schema open-source repository](https://github.com/dbt-labs/agents_schema/tree/main) — Provides workflows for publishing existing metadata from tools including dbt and Looker into the warehouse. A practical starting point for building the database map.
- [Fivetran Connector SDK](https://fivetran.com/docs/connector-sdk) — The Python SDK Fraser used to build the two custom connectors that brought racing records and F1 website content into BigQuery. Includes guidance on developing, testing and deploying connectors.

## Slides

### The new job of the data team is providing context to AI

AI agents can already write SQL queries and make charts. George Fraser argues that as agents take on more of this work, data teams have a new job: giving AI the context to make sense of their data.

[0:51](https://www.youtube.com/watch?v=jluFLznjXSo&t=51s) [Opening slide with a portrait and speaker credit for George Fraser, CEO of Fivetran and dbt Labs, beside the talk title.](https://assets.ai.engineer/sites/aiecode2025/sha256/dc547ab3dd5b318e678cd030805139c1b2b1a19bb40099c1713416a5d26e76cf.webp)

The new job of the data team is providing context to AI

George Fraser
CEO, Fivetran + dbt Labs

01

Interface text:
AI Engineer
Code Summit
PRESENTED BY
Google DeepMind

NOVEMBER 10, 2026
Fighting Slop

### Business intelligence is dead. Long live context!

AI can already write SQL and build dashboards. Fraser proposes a harder test for data teams. When the head of sales asks for three ways to improve pipeline conversion, can the assistant ground its advice in the company’s own data?

[1:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=72s) [A chat illustration accompanies a request for three ideas to improve pipeline conversion. The slide asks whether a sales leader's AI assistant can provide a good answer.](https://assets.ai.engineer/sites/aiecode2025/sha256/c7572908ab3f405dccb59bbc9dd0d668a44cd4b63f1527dc7c5689407f927fe8.webp)

Business intelligence is dead.
Long live context!

“Give me your 3 best ideas for improving pipeline conversion.”

When your head of sales asks their AI assistant this question, can it give a good answer?

02

### Everyone is building data agents

Ramp Research draws business context from dbt, Looker and Snowflake. Stripe’s Kai brings company tools and expertise to where people work. DoorDash replicates and models its data before connecting Vera to it.

[3:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=223s) [Article excerpts introduce Ramp Research, Stripe Kai and DoorDash Vera. Their descriptions highlight business context, company expertise and modeled data.](https://assets.ai.engineer/sites/aiecode2025/sha256/39148b01682a6b0d946504aae387b38690d88c58c779ccc388729df27818d357.webp)

Everyone is building data agents

Ramp Research
Business context from dbt, Looker and Snowflake

September 18, 2025
Meet Ramp Research: Our Agentic Data Analyst
Faiz Hilaly   Cesar Duran   Jay Sobel

Stripe Kai
Company tools and expertise, available where people work

Meet Stripe’s Knowledge AI Platform

DoorDash Vera
Modeled data with business knowledge

Blog
Inside Vera, DoorDash’s Data Agent
September 16, 2026 | Ian Baldwin   Jacopo Himberg   Akshat Khandelwal

03

Interface text:
ramp | Builders Blog
Home   Subscribe   We’re hiring!
Engineering the future of AI

### Even the AI labs

OpenAI and Anthropic both connect their in-house agents to the data stack they built for business intelligence. OpenAI adds company context to warehouse queries. Anthropic gives Claude shared definitions and skills for self-service analytics.

[3:51](https://www.youtube.com/watch?v=jluFLznjXSo&t=231s) [Side-by-side examples describe OpenAI enriching warehouse queries with company context and Anthropic using data foundations, shared definitions and skills.](https://assets.ai.engineer/sites/aiecode2025/sha256/da68a34baac121658c49e94cef0bd3eb743270ffdfadc883ff2d587c2b7170eb.webp)

Even the AI labs

January 29, 2026    Engineering
Inside OpenAI’s in-house data agent
By Bonnie Xu, Aravind Suresh, and Emma Tang

OpenAI
Warehouse queries enriched with company context

How Anthropic enables self-service data analytics with Claude

Anthropic
Data foundations, shared definitions and skills

04

Interface text:
AI Engineer
Code Summit
PRESENTED BY
Google DeepMind
NOVEMBER 10, 2026
Fighting Slop

### AI is a new consumer of the data stack alongside business intelligence

AI agents can query the same warehouse or lakehouse that already serves business intelligence. Bringing data together lets agents join records across systems. The business-specific models that simplify messy data for people help agents navigate it, too.

[4:33](https://www.youtube.com/watch?v=jluFLznjXSo&t=273s) [Business systems feed a data warehouse or lakehouse, which supplies both business intelligence and AI agents. The slide asks how to help AI agents navigate the warehouse.](https://assets.ai.engineer/sites/aiecode2025/sha256/f82284b6d37da3931524d7daec4597ab50df1aecc5993f951b123b906b75a0f9.webp)

AI is a new consumer of the data stack

Business systems
Data warehouse or lakehouse
Business intelligence
AI agents

How do we help AI agents navigate the data warehouse?

05

[5:50](https://www.youtube.com/watch?v=jluFLznjXSo&t=350s) [Business systems feed a data warehouse or lakehouse that serves both business intelligence and AI agents. The slide asks how to help agents navigate the warehouse.](https://assets.ai.engineer/sites/aiecode2025/sha256/ae1bd87ae1b0d45414d9de98bec403a3e9daff49d5808abd28817e2ce3b606bd.webp)

AI is a new consumer of the data stack

Business systems
Data warehouse or lakehouse
Business intelligence
AI agents

How do we help AI agents navigate the data warehouse?

05

### The anti-pattern: an MCP server for every app

Fraser compares giving an AI assistant a separate MCP server for each app to asking an analyst to click through Salesforce, Jira, and Slack. The assistant still has to query messy data in each app’s own language and can’t join records across sources.

[6:35](https://www.youtube.com/watch?v=jluFLznjXSo&t=395s) [An AI assistant connects separately to Salesforce, Jira, Slack and other app MCP servers. The slide highlights messy data, difficult query languages and the inability to join across sources.](https://assets.ai.engineer/sites/aiecode2025/sha256/746b7dc2f52d00541ce1224c5a02d1176d42b523760d14fe507573d5adbc4f5f.webp)

The anti-pattern: an MCP server for every app

AI assistant

Salesforce MCP
Jira MCP
Slack MCP
Other app MCPs

• The data is messy
• The query “language” is terrible (SOQL, JQL, Slack Search)
• You can’t join across sources

Engineering the future of AI

### Database-native AI at Fivetran

Fivetran’s Slack bot, Claude, and support agent share one MCP server connected to the BigQuery warehouse that powers BI. Looker metadata in the AGENTS schema helps agents navigate the tables. Embeddings and indexes let them search unstructured data.

[9:03](https://www.youtube.com/watch?v=jluFLznjXSo&t=543s) [Slack, Claude and a support agent connect through MCP to a shared data warehouse. Looker supplies metadata to the AGENTS schema, and unstructured data feeds embeddings and search indexes.](https://assets.ai.engineer/sites/aiecode2025/sha256/0474353d040747d46f51b5358b00b69a09d0ebe8b9b4f0fe7887c2db0c6b1e74.webp)

Database-native AI at Fivetran

Conversational analytics and automated support use the same context.

Slack
Claude
Support agent

MCP

Data warehouse
Structured data
Unstructured data
AGENTS schema
Embeddings + search indexes

Metadata
Looker

07

### AGENTS schema

Fraser proposes storing the agent’s map of the database in the database itself. The root table holds Markdown descriptions of the other metadata tables. In this example, dbt_tables leads the agent to column definitions and joins.

[11:07](https://www.youtube.com/watch?v=jluFLznjXSo&t=667s) [A hierarchy connects root to dbt_tables, which branches to dbt_columns and dbt_joins through dashed lines.](https://assets.ai.engineer/sites/aiecode2025/sha256/89bbb7d1f669f4d253f31220b8dc99ed0cb5d6806c3be5a21eb5f370d4cf15e0.webp)

AGENTS schema

root

dbt_tables

dbt_columns    dbt_joins

### Agents and databases: Besties!

The high-five sums up the division of labor. An agent interprets open-ended questions and explains the answers. The database remembers the facts, runs repeatable calculations, and can even store a map of its own tables to guide the agent.

[13:16](https://www.youtube.com/watch?v=jluFLznjXSo&t=796s) [A cartoon robot and database high-five. Agents interpret questions, connect ideas and explain findings. Databases store facts, represent relationships and run repeatable calculations.](https://assets.ai.engineer/sites/aiecode2025/sha256/89e8676de36e41163b3b650e74eb839755d428e2cb4b8ce01c2bd7220d4f072d.webp)

Agents and databases: Besties!

Agents
Interprets open-ended questions
Connects ideas across sources
Explains findings in plain language

Databases
Stores facts over time
Makes relationships explicit
Runs repeatable calculations

### Database-native AI at Fivetran

Slack, Claude and Fivetran’s support agent share the same warehouse context through MCP. Looker supplies metadata to the AGENTS schema. Built-in search indexes let agents query unstructured text alongside structured data without a separate vector database.

[13:54](https://www.youtube.com/watch?v=jluFLznjXSo&t=834s) [Slack, Claude and a support agent connect through MCP to a data warehouse. Looker supplies metadata to the AGENTS schema, and unstructured data feeds embeddings and search indexes.](https://assets.ai.engineer/sites/aiecode2025/sha256/a4395ef39ab13ce80ab6d35c5e70257818af1d5f9a028bb3ce00cd0d04a646d6.webp)

Database-native AI at Fivetran

Conversational analytics and automated support use the same context.

Slack
Claude
Support agent

MCP

Data warehouse
Structured data
Unstructured data
AGENTS schema
Embeddings + search indexes

Metadata
Looker

07

### The complete system, from API to agent

Fivetran loads OpenF1 data and documents into BigQuery. dbt normalizes race data and indexes passages for search. F1 Analyst’s system prompt points to agents.root for current context. The team uses 100 questions with known answers to catch regressions.

[16:14](https://www.youtube.com/watch?v=jluFLznjXSo&t=974s) [Fivetran connectors load OpenF1 data and documents. A dbt workflow builds normalized models, agent context, passage embeddings and indexes for F1 Analyst. Results from 100 evaluation questions go to BigQuery.](https://assets.ai.engineer/sites/aiecode2025/sha256/e3cbf8342074cfbbc3cca08309f665478664579a80a3c95d6e6aab59bc1e97e4.webp)

The complete system, from API to agent

Sources
OpenF1 APIs
Races, laps, telemetry

Documents
Rules, glossary, transcripts

Fivetran
OpenF1 connector
Documents connector

dbt defines the data workflow
Source tables
Normalized models
AGENTS context
Incremental passages
Embeddings + indexes

Experience
F1 Analyst data agent
System prompt

Evals
100 questions

BigQuery eval results

11

### dbt: prepare passages for search

dbt keeps each F1 glossary passage separate. On incremental runs, it embeds only passages synced since the last recorded sync and merges them by document ID and position. A vector index makes the passages searchable.

[18:50](https://www.youtube.com/watch?v=jluFLznjXSo&t=1130s) [An incremental dbt SQL model preserves glossary passage boundaries, embeds newly synced text and merges rows by document and position.](https://assets.ai.engineer/sites/aiecode2025/sha256/9cfe1f12d8262cdc85292326634e1814d8b13889209f0a04b0b49944c3609c03.webp)

dbt: prepare passages for search

models/documents/glossary_sections.sql

{{ config(materialized='incremental',
    incremental_strategy='merge',
    unique_key=['document_id', 'position'],
    on_schema_change='append_new_columns',
    full_refresh=false,
    post_hook='{{ ensure_document_index() }}') }}

select
    document_id,
    position,
    text,
    section,
    _fivetran_synced,
    {{ function('embed_text') }}(text) as embedding
from {{ source('documents', 'glossary_sections') }}
{% if is_incremental() %}
where _fivetran_synced > (
    select coalesce(max(_fivetran_synced), timestamp('1970-01-01'))
    from {{ this }}
)
{% endif %}

Preserve passage boundaries. Embed new text. Merge by document and position.

Interface text:
AI Engineer
Code Summit
PRESENTED BY
Google DeepMind
NOVEMBER 10, 2026
Fighting Slop

### An eval: check a grounded racing answer

How many positions did Nico Hulkenberg gain in the 2025 British Grand Prix? The Python test runs in CI, shuffles ten choices and checks whether F1 Analyst returns the letter that corresponds to 16 positions.

[19:26](https://www.youtube.com/watch?v=jluFLznjXSo&t=1166s) [A Python evaluation asks how many positions Nico Hulkenberg gained in the 2025 British Grand Prix. The expected answer is 16. The choices are shuffled before checking the agent’s response.](https://assets.ai.engineer/sites/aiecode2025/sha256/5df47dec7fe147a736719af7e507ed8e827aba34544c29cff76607202dad01d4.webp)

An eval: check a grounded racing answer

evals/questions.py

{
    'id': '04_hulkenberg_gain',
    'category': 'structured',
    'question': (
        'How many positions did Nico Hulkenberg gain from his '
        'starting-grid position to his classified finish in the '
        '2025 British Grand Prix?'
    ),
    'choices': [
        '10', '11', '12', '13', '14',
        '15', '16', '17', '18', '19',
    ],
    'answer': '16',
}

Shuffle the choices, ask F1 Analyst, then check its returned letter.

Interface text:
AI Engineer
Code Summit
PRESENTED BY
Google DeepMind
NOVEMBER 10, 2026
Fighting Slop

### SQL and hybrid search

BigQuery combines vector and keyword search to find the top 100 passages about tyre degradation. SQL joins those matches to transcript and meeting records, filters for 2025 post-race conferences, and returns up to five passages with source URLs.

[19:47](https://www.youtube.com/watch?v=jluFLznjXSo&t=1187s) [A SQL query combines vector and keyword searches for tyre degradation, joins transcript and meeting records, and limits results to five passages from 2025 post-race conferences.](https://assets.ai.engineer/sites/aiecode2025/sha256/639722d343fc5e82774cd18fbc5de060caa8e68d84ca6129c959afeec514af4a.webp)

SQL and hybrid search
2025 post-race comments about tyre degradation

select
    m.meeting_name, t.title, t.source_url,
    p.base.text
from vector_search(
    table `f1.transcript_passages`, 'embedding',
    query_value => ai.embed(
        'tyre degradation',
        connection_id => 'us.f1_document_embeddings',
        endpoint => 'gemini-embedding-2').result,
    lexical_search_columns => ['text'],
    lexical_search_query_value => 'tyre degradation',
    top_k => 100, distance_type => 'COSINE'
) as p
join `f1.transcripts` as t
    on p.base.document_id = t.document_id
join `f1.meetings` as m
    on t.meeting_key = m.meeting_key
where t.conference_type = 'post-race'
    and m.year = 2025
order by p.distance, t.document_id, p.base.position
limit 5;

Interface text:
AI Engineer
Code Summit
PRESENTED BY
Google DeepMind
NOVEMBER 10, 2026
Fighting Slop

### The same system, seen as tables

The source data links racing records to drivers. dbt normalizes those records around session entries, connecting laps, stints and team radio. Three tables tell the agent what the normalized tables and columns contain and how to join them.

[20:41](https://www.youtube.com/watch?v=jluFLznjXSo&t=1241s) [Three side-by-side database diagrams compare source racing data, normalized tables and agent metadata describing tables, columns and joins.](https://assets.ai.engineer/sites/aiecode2025/sha256/0a69b9541c8c1e5e33e063d44ea99ff6213c2abc2df1196d65785ad234a426e9.webp)

The same system, seen as tables

SOURCE
f1_openf1 + f1_documents
[illegible]ertakes
drivers
laps
location
pit
position
race_control
session_result
stints

NORMALIZED
f1
session_entries
session_result
stints
intervals
team_radio
laps
car_data

AGENTS
agents

dbt_tables
string  table_name
string  description
array   primary_key
string  row_filter

dbt_columns
string  table_name
string  column_na[illegible]
string  description

dbt_joins
string  join_name
string  from_table
string  to_table
string  join_type
string  sql_express[illegible]
[illegible]

Relationship labels:
from_table
to_table

### Let's ask some questions!

George Fraser switches to Google Gemini’s standard chat interface to ask his F1 analyst agent questions about racing data.

[21:48](https://www.youtube.com/watch?v=jluFLznjXSo&t=1308s) [Blue slide with the heading “Let's ask some questions!” and an underlined link below.](https://assets.ai.engineer/sites/aiecode2025/sha256/0fbc499ba3589c679ed6a26d59e83b03d6e68d92bea5b3569b2a02a2fa4713fb.webp)

Let's ask some questions!

link

## Full transcript

[0:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=12s) I'm gonna talk to you about the data team. Uh, so Fivetran serves data teams, Fivetran and dbt Labs. Uh, if you're in the data world, you probably heard earlier this year that, uh, these two companies merged. A match made in heaven. Uh, now we can move your data and transform it. Uh, and we do it for thousands of companies. We've been doing it for over ten years. Uh, this is almost the only job I've ever had. It's the only job after I was a scientist.  Um, so we've been doing this for a while. Um, but this, like many, uh, worlds, is in an era of rapid

[0:42](https://www.youtube.com/watch?v=jluFLznjXSo&t=42s) change. And it's an era of rapid change for us as vendors, but it is also, uh, a era of rapid change for engineers who work with data in any way and for data teams in particular. Uh, AI agents are really good at writing SQL queries and making charts, and a lot of the activities of the data team are things that AIs, uh, can do.  But there is good news, which is that data teams have a new job, which is to connect that AI to context.

[1:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=72s) Um, so their old job was business intelligence, but business intelligence is dead. Uh, we have artifacts now instead of dashboards. Don't call them dashboards. They're artifacts.  Uh, and, um, but this is not just a vacuous marketing speak. Uh, something really has changed. Um, it's, uh, a lot of the dashboard work that used to be done by humans really can and should be done by AIs now, and we should probably have more, uh, dashboards that are shorter-lived, uh, because they

[1:42](https://www.youtube.com/watch?v=jluFLznjXSo&t=102s) are so fast to make, uh, now. But, um, those dashboards need to give correct answers. And not only do we need to build dashboards, but we want to connect autonomous AI agents to, um, to data. Uh, and those autonomous AI agents have questions as well that they need data-grounded answers to. And so we have to ask, how do we make this possible? How do we make it so that your head of sales, uh, when he goes into, uh, their AI assistant,

[2:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=132s) Claude or ChatGPT or, uh, Slack and asks, uh, "Give me your three best ideas for improving pipeline conversion." Uh, people love asking very open-ended questions of AI agents. And actually, that's a good pattern. That's a practice you want to encourage.  Um, how do we make sure that it will actually give real, uh, high-quality answers to these kinds of questions? Well, uh, in the last six months, a pattern has started to emerge of how to do this well.  Uh, and we've seen it in a bunch of

[2:42](https://www.youtube.com/watch?v=jluFLznjXSo&t=162s) different tech-forward companies. So here are some examples. Uh, uh, Ramp, a company a lot of you probably know. They make corporate credit cards and tools connected to that. Uh, they have been out ahead on this area for a while. They started doing this, uh, last year. Um, what they did is they made an agentic data analyst that is connected to their data in-- which they, uh,  they model with dbt, uh, and, uh, they store in Snowflake. Um, they made a agentic data analyst that connects to that data.

[3:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=192s) Um, Stripe, uh, has done something similar. People like to give their analysts fun names. They call it Kai, uh, and it's their knowledge AI agent. You know, I just realized that Kai is an acronym, uh, five seconds ago, I put that together. Um,  so, uh, Kai, similar to Ramp, it connects to their data in Stripe's data platform. Uh, DoorDash has one they call Vera, uh, which again, connects to modeled data. Uh, DoorDash is actually a big Fivetran customer, Fivetran and dbt.

[3:42](https://www.youtube.com/watch?v=jluFLznjXSo&t=222s) Uh, they replicate their data, they model it, and then they connect AI to that modeled data. Um, and it's not just, uh, startups. The AI, AI labs are doing the same thing. Um, so, uh, OpenAI and Anthropic, both longtime Fivetran customers, uh, since they set up their first data stack. Uh, they have both built in-house data agents, uh, that connect to their data platforms. Uh, and, uh, what all of these... And they've written about it on their blog, and I encourage you to go read about it

[4:13](https://www.youtube.com/watch?v=jluFLznjXSo&t=253s) as a way to learn about best practices. Um, what all of these have in common is that they are connecting their AIs to the same data stack that they built for serving business intelligence. So the same data stack that has been serving humans for years at these companies, they are using as the source of truth for AI agents who have questions about data. It looks kind of like this. Um, AI is, from this point of view, a new consumer of the data stack. You have all of your business

[4:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=283s) systems. You replicate the data into a data warehouse or data lake, and you used to connect your business intelligence tools to that data warehouse. You still do for a little while longer. Uh, and, uh, now you connect your AI agents to that same data stack. And this turns out to work extremely well. One of the funny things about AIs is they are so anthropomorphic. Uh, they act a lot like people. And so the very same things that make data, uh, work well for people,

[5:13](https://www.youtube.com/watch?v=jluFLznjXSo&t=313s) make data work well for AIs. You have to take the data from all the sys- the business systems. Um, you want to put it in one database so that you can do joins across systems. Uh, you want to model that data. You want to model that data in a way that is specific to your business. And modeling is fundamentally an exercise of simplification. You're presenting a simplified view of what is probably some very messy and complicated data that lives in the systems of record. So all of the investments that you've been making

[5:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=343s) to organize your data estate for humans for years are the exact same ones that you want to build on for AIs. There are some new things you want to do. AIs can traverse domains that, uh, previously were difficult for people. Uh, the big one is unstructured data. You can actually do meaningful things with unstructured data with AI, um, because their ability to, uh, speed read is so extraordinary. Uh, that they can actually go and read like a thousand transcripts of calls with customers who meet certain characteristics and

[6:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=372s) things like that. Um, so there's, there's some new things that you need to do, but there's a lot of existing patterns that work well, uh, that you should build on when you wanna connect AI to data. Now, what you should not do, and what none of these companies that I just mentioned are doing,  is, uh, the MCP web approach, where you connect your AI assistant via MCP connections to all of your different systems of record. This is a little counterintuitive. You

[6:42](https://www.youtube.com/watch?v=jluFLznjXSo&t=402s) might ask, "If I wanna connect my AI agent to my Salesforce data, shouldn't I connect it to the Salesforce connector?" That would seem... That sounds like a good idea. I agree. Uh, this does not work well. Uh, and the reason it does not work well, uh, think about a person.  If you told an analyst, "I want you to answer a question about what's happening in our business, and I want you to do it by just logging into all these different systems and clicking around." They could do it. It would take them, like, a year,  and they would make a lot of mistakes. Uh, it's a very

[7:12](https://www.youtube.com/watch?v=jluFLznjXSo&t=432s) error-prone process. Uh, trying to answer questions about data through MCP tools is kind of like that. Um, you run into these problems. The data is very messy in these source systems. If you do not have a messy Salesforce, get the hell out of here. Uh, I am mad at you if you do not have a messy Salesforce.  We have an especially messy Salesforce, but I would not claim to be the champion because that is a contest which has a champion. Uh, so the data is very messy. The data in the data warehouse has been cleaned up and organized, uh,

[7:42](https://www.youtube.com/watch?v=jluFLznjXSo&t=462s) according to the rules of your business. That's why we have data warehouses. But it is not that way in the systems of record. Also, the query languages are terrible.  If you ask questions about data to an agent, and that agent is connected to these MCP servers, it's gonna have to run SOQL queries, which is, uh, Salesforce's dumb dialect of SQL. It's gonna have to run JQL queries, which is so dumb it's not even a dialect of SQL. Um, if you know JQL, I'm sorry. I know JQL 'cause I wrote our original Jira connector long ago. Um,

[8:13](https://www.youtube.com/watch?v=jluFLznjXSo&t=493s) a- or, y- you know, if you connect to the Slack MCP server, all you have is the search, uh, terms that you type in the Slack bar. That's your tool for searching through the data. Uh, imagine trying to answer a data question with those query languages. And you can't even do joins across sources, right? The data all lives in different systems. So even though it sounds like a good idea to use MCP to solve this problem of getting context for your AI agents, it's actually a terrible idea because it fails in practice. MCP tools are still useful. They're useful for taking action,

[8:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=523s) uh, or for retrieving individual records, uh, that have just been updated. MCPs are federated, so they have no latency. Um, so they have a role to play in the system, but they are not the way that you should gather context about the world and your business for your AI agents. You should build it on your data stack, like all those companies I just mentioned do.  Uh, and this is how we do it at Fivetran. We've been doing it this way for a couple years. So this is a little diagram of how this actually looks at Fivetran. Um, we have several

[9:13](https://www.youtube.com/watch?v=jluFLznjXSo&t=553s) different, uh, clients that read the data. Um, we have Slack, actually. We have a data bot in Slack, like a lot of those companies I mentioned earlier. We have Claude connected directly, uh, so you can ask questions of Claude. I asked a question of Claude on the train on the way over here. Um, and, uh, I-- it's still working on it, and I don't know the answer yet.  Uh, and, and we-- you can connect autonomous agents to the same infrastructure. So at Fivetran, our, uh, autonomous support agent, uh,

[9:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=583s) which will answer some of your questions. If you're a Fivetran user and you ask the right kind of question where the s- the agent, uh, can be highly confident that it knows, uh, the right answer, um, it will just go ahead and answer your question. Uh, and the way it does that is it connects to this very same data stack. The same data stack we originally built to serve BI now supports an autonomous support agent, and it works great. They all connect through an MCP server, uh, 'cause MCP is, at its bottom, a protocol that you just use for connecting external tools of any kind.

[10:13](https://www.youtube.com/watch?v=jluFLznjXSo&t=613s) There's nothing good or bad about MCP, even though I just said, "Don't rely on MCP servers," in the previous slide. It's not actually MCP that's the problem there. It's the, the tools. Uh, and they connect to our BigQuery data warehouse, um, which has inside of it a giant dbt model that has been gradually evolved over the last ten years. Uh, that, again, is the same one that supports our BI tools. Um, there are a couple of problems you have to find solutions to in order to, uh, bring in the unstructured domain

[10:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=643s) and in order to give the agent a map of the database. You do not just wanna connect the agent, uh, to the database and then say, "Go look around and see what you find." You will not get good answers. We have tried it.  Uh, you'll get better answers than you did six months ago 'cause they are getting better at that. But in general, that is not, uh, a good approach. You have to give it some kind of map of the database. So, uh, the way that we so- recommend that you solve this, there are a lot of, of vendors that will sell you tools to give you some kind of

[11:13](https://www.youtube.com/watch?v=jluFLznjXSo&t=673s) c- context catalog, uh, to put in front of your database. And I am here to tell you that you do not need any of them. Uh, it is a database. Metadata is a kind of data. Do you know where you could put that metadata about what's in your database? Also in your database. Uh, and this is our modest proposal for solving it. It has a website. It's a standard. It's the world's simplest standard. Uh,  kind of like it's AGENTS.md, but for databases. We suggest

[11:44](https://www.youtube.com/watch?v=jluFLznjXSo&t=704s) that a great way to solve this problem, the way that we solve this problem, is you make a special schema in your database called AGENTS, and then you put in it a table called Root, which literally has a column of Markdown blobs, uh, that describe the rest of the tables in, in the AGENTS schema. And the rest of the tables are gonna be user-dependent. I'm gonna show you a demo here where it looks like this. But the Fivetran production instance actually has a bunch of metadata from Looker in it. So the, the tables after the root table are Uh, are a representation

[12:14](https://www.youtube.com/watch?v=jluFLznjXSo&t=734s) of the Looker model because that's the best source of metadata at Fivetran right now. Um, and, uh, this, uh, this pattern works extremely well because agents and databases are just like this, perfect combination.  They have, uh, exactly the mirror image of each other's strengths and weaknesses. Um, so agents, uh, they are kinda crazy if you're used to deterministic software. They can interpret open-ended questions, which is not really a thing that any other kind of software can do. Um, they,

[12:44](https://www.youtube.com/watch?v=jluFLznjXSo&t=764s) they can actually exhibit some kind of comprehension of ideas,  uh, and they can explain answers back to you in plain language. Um, those are amazing attributes. However, they cannot remember literally anything.  They're like the guy in "Memento" who has to write notes for himself. I don't know if you ever saw that movie. If you haven't, great movie. Uh, uh, who has to write notes for him. It's kinda the one that made Christopher Nolan famous. Um, there's probably some Christopher Nolan fan here who's like, "That is not the one. There was this other movie before it."

[13:15](https://www.youtube.com/watch?v=jluFLznjXSo&t=795s) So, um, the, the agents can't remember anything, uh, and they are very nondeterministic. Um, databases are like the exact opposite. They only remember things. They can't do anything else. Uh, and so they represent this perfect marriage, uh, to agents. You can store the data about your business in there, and then you can also store in a bunch of little tables in a special schema, a map of the rest of the database that acts as a guide for that agent. Um, and you haven't even had to buy anything you didn't already have if you're a user of the

[13:45](https://www.youtube.com/watch?v=jluFLznjXSo&t=825s) modern data stack. Uh, so I'm gonna show you a little demo of... Oh, and one last thing about unstructured data, which I showed you in this previous slide. Um,

[13:57](https://www.youtube.com/watch?v=jluFLznjXSo&t=837s) uh, the unstructured domain, which is kinda new, uh, in the world of analytics. Usually, we didn't really bother with unstructured data if we're just building dashboards 'cause dashboards can't really do anything with unstructured data. But now you can. Agents can just read it. Uh, you need a way to make that unstructured data searchable. Uh, and another thing that you do not need to buy, uh, is a separate vector database, uh, because all of the major data platforms are now offering built-in vector indexes. Uh, and they also work great.  Uh,

[14:27](https://www.youtube.com/watch?v=jluFLznjXSo&t=867s) and it's really convenient to have everything in one database, a theme I will return to again and again. Um, even, even if there are other vector indexes that are slightly better, having it all in a single system where you can write hybrid queries, uh, is really helpful, as you will see.  So use the vector indexes of the database. Uh, so I'm gonna give you a little demo of how, uh, we can actually put this together. And, uh, the-- we need a, we need a use case. I'm not actually gonna show you

[14:57](https://www.youtube.com/watch?v=jluFLznjXSo&t=897s) Fivetran's internal data, which is al- very large, uh, and would take a long time to explain. I'd have to onboard you to the company first. Um, instead, I'm gonna give a demo of some data from F1. Um, hopefully, there's some F1 fans in the audience who can ask questions.  There we go. There's always a couple. Um, and an F1 data set is really nice because, uh, first of all, there's a great public, uh, data portal that has all of the F1 data. Uh, it's very detailed. It has even things like telemetry of where each car is at e-each moment in

[15:27](https://www.youtube.com/watch?v=jluFLznjXSo&t=927s) time. Um, so it's a size... It's like a meaty structured data set, uh, but then it also has an unstructured domain. So there's the, um, the rules, uh, of F1 and the glossary of all the terminology, um, which is on the F1 website, which we're also gonna ingest to the database. Uh, fun fact, you can put unstructured text in SQL databases, uh, unless you are in 1975 and you're using Oracle, uh, from 1975, um, you can put giant blobs of text in databases. They are great at that now. Sometimes people

[15:57](https://www.youtube.com/watch?v=jluFLznjXSo&t=957s) seem to think that they need to, like, anytime you have a file, a, a long string of text, you gotta put it over in S3 or something. Not so. Text columns work great. Um, so we're gonna put that unstructured data right in the same database. Um, and we also have the transcripts of the press conferences. Uh, so it's a nice meaty data set, um, but it's something everyone knows something about. Everyone knows what cars are and what races are.  Um, so our sources are there on the left. Uh, we, uh, we have the OpenF1 API, which has all the structured data.

[16:27](https://www.youtube.com/watch?v=jluFLznjXSo&t=987s) Uh, we have the, uh, F1 website, uh, which has all of the unstructured domain and all the transcripts of all the post-match press conferences. Uh, and then we're gonna use Fivetran, uh, to, uh, write and run a couple of connectors that replicate all this data.  So I, and by I, I mean my friend Codex, uh, made, uh, two connectors using the Fivetran Connector SDK, which is a way to write the, the capture portion of a Fivetran connector that you can then run on the Fivetran platform.

[16:58](https://www.youtube.com/watch?v=jluFLznjXSo&t=1018s) Um, it reflects all the lessons that we've learned over the years about how to make great connectors in a nice Python API. And, um, I recommend that you don't use it. I recommend that you just have your AI agent use it with our Connector SDK skill, and it will write you beautiful connectors to any data source you desire. Um, and that lands all the data in, uh, BigQuery. In this demo, I used BigQuery, uh, and a bunch of source tables, and then we used dbt, uh, to model that data. Uh, the data, it comes out of the API in a little bit of a funky format. APIs are often

[17:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1048s) kinda funky, and so we have to normalize, uh, the data, uh, some, uh, to make it easy for the agent to navigate and understand. And that's where we do our vectorization. Um, so we just use a regular dbt model in the data warehouse, uh, to incrementally, uh, vectorize the unstructured domain so that we can search it. Uh, and then we're gonna use, um, a Gemini agent, just 'cause it was convenient when I set this up, uh, to set it up in Google Cloud, but you could use anything. It could be your

[17:58](https://www.youtube.com/watch?v=jluFLznjXSo&t=1078s) own agent, it could be Claude, it could be ChatGPT. None of these components are really proprietary. This is really just a pattern of how you put these things together. And the system prompt of that agent just says, "Go look at agents.root, and you'll find out everything else you need to know there." Um, so as the data in the database evolves, the agent is automatically gonna pick up those changes 'cause its, its system prompt is like this long. Uh, and then we're, we have a bunch of evals All agentic systems need evals. They're the equivalent of performance benchmarks. These are just questions that have known

[18:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1108s) correct answers that you use to make sure you don't break it  after you build it in the first place. Um, so a quick whirlwind tour of what these pieces look like. This is a little snippet of the connector. You know, it calls the APIs, it extracts the-- it, it interprets the responses, it sticks the rows into the destination. Um, this is an example of what a dbt model looks like. Um, if you are not a dbt user, dbt models are basically just SQL queries, um, with some little, uh, sort of, uh, pragmas

[18:58](https://www.youtube.com/watch?v=jluFLznjXSo&t=1138s) in, in, uh, Jinja blocks that tell it things like how to turn this into a data pipeline. Uh, and you can see that what we're basically saying here is, "I want to, uh, vectorize, uh, the text of the, um..." This is of the, uh, F1 glossary. Uh, I wanna vectorize it into embeddings, and then another part of the dbt model says, "Please create a vector index so that I can search this thing." Uh, and then the evals look

[19:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1168s) like this. Uh, they're just a bunch of questions, uh, in a Python, uh, in a simple, uh, bit of Python code that runs in CI, uh, that, uh, have correct answers. I set it up as, like, a ten options, and then one of them is correct. There's multiple ways people do evals, um, but this works well for this demonstration. And then the agent is gonna write queries that look like this. Um, so, uh, the queries, this is a fun example of a query because we're, we're trying to find out, uh, what did people say about tire

[19:58](https://www.youtube.com/watch?v=jluFLznjXSo&t=1198s) problems in twenty twenty-five? And like a lot of queries, it's hybrid. It has both structured and unstructured elements. A lot of the questions that people ask and agents ask end up, they have got one predicate that's like a, a, a unstructured search looking for content about a topic, and that's what you see, uh, higher up there, um, in, uh, the VECTOR_SEARCH function, which is just the BigQuery function for doing, uh, vector search, and all of the major data platforms have this now. Uh, and, uh,

[20:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1228s) then at the bottom, it says, "Okay, I want post, post-race transcripts, and I want them from twenty twenty-five." So that's a structured predicate, and that's a very common pattern. And one of the advantages of putting everything in one database, it's very easy to do stuff like this. This is what it looks like, uh, as tables. The schemas are, are reasonably large, so this is kind of a zoomed-in view of pieces of the schemas. But basically, you've got a source schema. That's what comes out of the connectors. You've got a normalized schema. That's what dbt produces. That's the one that has the, um,

[20:58](https://www.youtube.com/watch?v=jluFLznjXSo&t=1258s) vectorization and indexes on it. And then you have AGENTS schema, which is just three tables in this example. Uh, it's just tables, joins, and columns, which is basically just descriptions of what's in the tables. This is the normalized tables that get described. Uh, descriptions of what's in the columns, uh, and how to join these things together. If you tell the agent those three things, it will take you a long way. We're still experimenting with what is, like, the best amount of information to give the agent in order to make this work well. It's still kind of an open question,

[21:28](https://www.youtube.com/watch?v=jluFLznjXSo&t=1288s) but it doesn't take much.  Um, and I think I spent about five hours in total building this thing. Um, I, uh, spent about two hours building it without really looking at it, and then I gave the talk once, and then I went back and looked at the code, and I was like, "Oh, man, this needs a little architecture." Uh, and I spent about another three hours cleaning it up. Uh, so let's, let's ask some questions of our friend, the data agent here. Uh, where's my cursor?

[22:01](https://www.youtube.com/watch?v=jluFLznjXSo&t=1321s) So this is what it looks like in Gemini. This is just, uh, Google, uh, Google Gemini's basic interface. Like I said, you could do this with any, uh... Whoops. Come here. This is my little F1 analyst agent. And

[22:21](https://www.youtube.com/watch?v=jluFLznjXSo&t=1341s) why?

[22:27](https://www.youtube.com/watch?v=jluFLznjXSo&t=1347s) It's disappeared.

[22:30](https://www.youtube.com/watch?v=jluFLznjXSo&t=1350s) The curse of demos.

[22:34](https://www.youtube.com/watch?v=jluFLznjXSo&t=1354s) Oh, I'm not on the Wi-Fi. That's why. Slight problem. Um, all right, we're gonna use my iPhone as a hotspot here.

[22:51](https://www.youtube.com/watch?v=jluFLznjXSo&t=1371s) Is there conference Wi-Fi here? What is it? On the sign to your right. Right there. To your right. AI. Your iPhone. Oh, you know what? Uh, oh, it's right there. Okay, cool. I think, I think my phone might be getting the job done here. Yeah, yeah. For some reason, uh, BigQuery, uh, F1, uh, sorry, Gemini has been giving me error messages today, but it, it is working. So, uh, let's say, uh, who is most

[23:21](https://www.youtube.com/watch?v=jluFLznjXSo&t=1401s) improved driver this year? All right. Let's see what it's got. So you can see the thinking trace of this thing. Um, and the first thing it does, because this is what we told it to do, is it goes and looks at those 30 tables. Uh, it, it-- well, it looks at the, the three tables in AGENTS schema, and that tells us about-- tells it about the 30 tables in the normalized schema. And then it's thinking about how to interpret that. Uh, it does a little reconnaissance query to understand what's in the database. That's what that was, uh, which is a

[23:51](https://www.youtube.com/watch?v=jluFLznjXSo&t=1431s) common thing for it to do. It'll often do these little queries to kind of probe and find out what's in there. Um, and, uh, let's say it wants us to clarify the question. Uh, let's say it's race positions gained. All right.

[24:09](https://www.youtube.com/watch?v=jluFLznjXSo&t=1449s) And it's thinking again, and it's gonna write probably a more complicated query this time.

[24:21](https://www.youtube.com/watch?v=jluFLznjXSo&t=1461s) And Uh, there's our longer query. Lots of joins in there. These look a lot like the queries that human analysts write. Um, that's what happens when you have a big schema. Uh, and let's see.

[24:43](https://www.youtube.com/watch?v=jluFLznjXSo&t=1483s) There we go. Uh, so the most improved driver by this metric is Lance Stroll. I'm not an F1 nerd, so I don't actually know a lot about F1. I chose this 'cause it's such a good data set. Like the worst driver. Huh? He's like the worst driver. Is he?

[25:07](https://www.youtube.com/watch?v=jluFLznjXSo&t=1507s) But, but most improved, right? Like that often is the worst. It's like your fastest-growing product, right? Is always kind of a questionable endorsement, right?  Uh, and, uh, that poor guy has gone way down. Um, and I've got zillions more examples of questions here I asked recently. Uh, so, you know, I asked it, like, uh, "What are the toughest corners this season?" And it'll go, and it'll look at the actual crash data and the press conference

[25:36](https://www.youtube.com/watch?v=jluFLznjXSo&t=1536s) transcripts and say, "Which are the hardest corners?" Um, and, uh, I asked it who the handsomest F1 driver was. Very important question. Uh, at first it refused to answer, which I think is AI safety run amok. Uh, and then I really had to push it, uh, and it said Charles Leclerc, which we all know is the correct answer. Uh, so you can see it has structured data, it has unstructured data. Uh, it's ultimately a very simple

[26:06](https://www.youtube.com/watch?v=jluFLznjXSo&t=1566s) pattern, and as the AI models have gotten smarter, uh, this, uh, pattern has worked better and better. This is, uh, this way of connecting AI to data works better the smarter the models get, um, because you're really putting them in charge, um, rather than trying to hamstring them with some elaborate, uh, over-engineered, uh, context assistant. And my takeaway for you is that you should really think about this as a responsibility of your data team. Uh, the data team should

[26:36](https://www.youtube.com/watch?v=jluFLznjXSo&t=1596s) own your context. The exact same skills that made them good at delivering analytics are gonna make them good at delivering context. Um, and keep-- use standard components to do this. Don't get locked into anyone's walled garden. Um, agents and databases are really all you need. Uh, you can go a long way with that pattern. Um, and keep, keep your definitions in code, 'cause then the agents can write the code for you. And that's it. Uh, and we're at time. Thank you very much.
