Skip to content

Diogo TravassosData leadership · Analytics · Decision-making

Synthetic dataPublic data

What an AI needs from company data

Business definitions raised every AI model's score on data questions written alongside them, most to near the ceiling, where the test can no longer rank the models

All 12 per-model tests on single questions went up with the definitions, though in 4 the gain could still be zero. Two results do not fit: one model's single run through a semantic layer came out even with its own SQL, 46 against 45 of 55, a loss on simple questions cancelling a win on joins; and on multi-step trip tasks one model did worse with the definitions.

Main limitation The questions and their right answers were written alongside the definitions they test, and the third study reuses the first two studies' questions byte for byte, so these results describe those questions; how often real questions need definitions is untested.

The question

An AI assistant that answers questions from company data turns each question into a database query, and a wrong query still returns a clean, plausible number. So what must it be given first: only table and column names, or the business definitions too? The data are synthetic bank tables and a public sample of Chicago ride-hail trips, so no customer data is shared.

Model
The AI system that turns the question into a query.
Data mart
Tables prepared for analysis, such as one row per account per day.
Documentation
Written definitions: what one row stands for, which date counts, which values a column can hold, which joins are safe.
Semantic layer
Also called a metric layer: each business metric defined once. The model asks for a metric by name and the layer writes the query.
Interval
How far a gain moves when the questions are resampled; one that reaches zero could be no gain.
Near the ceiling
Scores close to 100%, where a test is too easy to tell models apart.

What the three studies found

With the definitions every model scored higher on single questions, and most finished near 100%.

Share of questions answered correctly, one row per model in each study, mean of the runs shown.

Without definitions: table names only, or the model writes its own SQLWith definitions: written documentation, or a semantic layer

Part 1, bank tables, 40 questionsGPT-4.1 mini, part 1, bank tables, 40 questions, one run: 27 of 40 without definitions, 33 of 40 with them; gain +15.0 points, interval 0.0 to +30.0 pointsGPT-4.1 minione runClaude Sonnet 5.5, part 1, bank tables, 40 questions, three runs: 35 of 40 without definitions, 39.7 of 40 with them; gain +11.7 points, interval +2.5 to +21.7 pointsClaude Sonnet 5.5three runsClaude Opus 5.5, part 1, bank tables, 40 questions, three runs: 36 of 40 without definitions, 40 of 40 with them; gain +10.0 points, interval +4.2 to +17.5 pointsClaude Opus 5.5three runsPart 2, trip sample, 55 questions,free-form answersGPT-4.1 mini, part 2, trip sample, 55 questions, free-form answers, one run: 45 of 55 (82%) without definitions, 46 of 55 (84%) with them; gain +1.8 points, interval −12.7 to +16.4 pointsGPT-4.1 minione runPart 3, bank tables, 36 questionsClaude Haiku 5.5, part 3, bank tables, 36 questions, three runs: 29.3 of 36 (81.5%) without definitions, 35.0 of 36 (97.2%) with them; gain +15.7 points, interval +3.6 to +30.3 pointsClaude Haiku 5.5three runsGPT-4.1 mini, part 3, bank tables, 36 questions, three runs: 28.7 of 36 (79.6%) without definitions, 35.3 of 36 (98.1%) with them; gain +18.5 points, interval +8.3 to +30.6 pointsGPT-4.1 minithree runsGemini 3.8 Flash, part 3, bank tables, 36 questions, three runs: 23.7 of 36 (65.7%) without definitions, 35.3 of 36 (98.1%) with them; gain +32.4 points, interval +15.3 to +50.5 pointsGemini 3.8 Flashthree runsClaude Sonnet 5.5, part 3, bank tables, 36 questions, three runs: 32.0 of 36 (88.9%) without definitions, 36.0 of 36 (100.0%) with them; gain +11.1 points, interval 0.0 to +25.0 pointsClaude Sonnet 5.5three runsPart 3, trip sample, 55 questions,strict answer formatClaude Haiku 5.5, part 3, trip sample, 55 questions, strict answer format, three runs: 33.3 of 55 (60.6%) without definitions, 53.0 of 55 (96.4%) with them; gain +35.8 points, interval +26.1 to +52.3 pointsClaude Haiku 5.5three runsGPT-4.1 mini, part 3, trip sample, 55 questions, strict answer format, three runs: 47.0 of 55 (85.5%) without definitions, 50.3 of 55 (91.5%) with them; gain +6.1 points, interval −4.8 to +22.5 pointsGPT-4.1 minithree runsGemini 3.8 Flash, part 3, trip sample, 55 questions, strict answer format, three runs: 46.3 of 55 (84.2%) without definitions, 54.0 of 55 (98.2%) with them; gain +13.9 points, interval +7.1 to +21.2 pointsGemini 3.8 Flashthree runsClaude Sonnet 5.5, part 3, trip sample, 55 questions, strict answer format, three runs: 47.0 of 55 (85.5%) without definitions, 54.0 of 55 (98.2%) with them; gain +12.7 points, interval +6.5 to +20.7 pointsClaude Sonnet 5.5three runs60%70%80%90%100%
Show the data
Share of questions answered correctly per model, without and with business definitions, in three studies
Study and modelRunsWithout definitionsWith definitionsGain, pointsInterval, points
Part 1, bank tables, 40 questions
GPT-4.1 minione run27 of 4033 of 40+15.00.0 to +30.0
Claude Sonnet 5.5three runs35 of 4039.7 of 40+11.7+2.5 to +21.7
Claude Opus 5.5three runs36 of 4040 of 40+10.0+4.2 to +17.5
Part 2, trip sample, 55 questions, free-form answers
GPT-4.1 minione run45 of 55 (82%)46 of 55 (84%)+1.8−12.7 to +16.4
Part 3, bank tables, 36 questions
Claude Haiku 5.5three runs29.3 of 36 (81.5%)35.0 of 36 (97.2%)+15.7+3.6 to +30.3
GPT-4.1 minithree runs28.7 of 36 (79.6%)35.3 of 36 (98.1%)+18.5+8.3 to +30.6
Gemini 3.8 Flashthree runs23.7 of 36 (65.7%)35.3 of 36 (98.1%)+32.4+15.3 to +50.5
Claude Sonnet 5.5three runs32.0 of 36 (88.9%)36.0 of 36 (100.0%)+11.10.0 to +25.0
Part 3, trip sample, 55 questions, strict answer format
Claude Haiku 5.5three runs33.3 of 55 (60.6%)53.0 of 55 (96.4%)+35.8+26.1 to +52.3
GPT-4.1 minithree runs47.0 of 55 (85.5%)50.3 of 55 (91.5%)+6.1−4.8 to +22.5
Gemini 3.8 Flashthree runs46.3 of 55 (84.2%)54.0 of 55 (98.2%)+13.9+7.1 to +21.2
Claude Sonnet 5.5three runs47.0 of 55 (85.5%)54.0 of 55 (98.2%)+12.7+6.5 to +20.7

Answers cut off at the output limit or refused by the provider count as wrong here, in each study. Left out instead, Claude Opus 5.5 gains +8.3 points in part 1 (interval +2.5 to +15.0) and Gemini 3.8 Flash +9.3 on the trip sample (interval +3.7 to +15.6); no other gain moves by a whole point. The interval is how far a gain moves when the questions are resampled.

  1. Every model scored higher with the definitions on these questions, in all 12 per-model tests.How sure: sure of the direction, less of the size: 4 intervals reach zero.
  2. With the definitions, the test is too easy to rank the models. In part 3 all four scored 92% to 100%. In part 1 the two current models reached 39.7 and 40 of 40, and both got 28 questions right with or without documentation.How sure: sure; no model is ranked here.
  3. How the model reaches the definitions matters, and the studies disagree. In part 2's one free-form run, a formatting slip cost the semantic layer simple questions (13 against 19 of 20) while it won the joins (14 against 9 of 15). In part 3, with a strict answer format, every model gained through the layer. But on 8 multi-step trip tasks Claude Haiku 5.5 solved 5.3 of 8 through the layer against 8.0 with plain SQL.How sure: unsure; one run of one model, and 8 tasks.

What it means for a company

On these questions, the definitions mattered more than the choice of model: without them the part 3 models were up to 25 points apart, while the definitions added up to 36 points to a single model. So write down the definitions people argue about first, such as which date counts and which rows to leave out. Put agreed metrics behind a semantic layer with a strict answer format, and test that interface, since one formatting slip cancelled the gain in part 2. Then pick the model by testing each on your own questions with known answers.

How we got here

Part 1. Agent-ready data marts

Asked how much written documentation helps three models write SQL on synthetic bank tables. It raised each model's score on 40 questions written with it; the two current models finished near the ceiling.

Claude Sonnet 5.5: 35 to 39.7 of 40, +11.7 points (interval +2.5 to +21.7), mean of three runs.

Part 2. Semantic layer evaluation

Asked whether one model answers trip questions better through a semantic layer than with its own SQL. In one run the totals came out even. A strict answer format, added after the results, reached 51 of 55 on the same questions; it is untested on new ones.

Questions that need a join: 14 against 9 of 15, one run.

Part 3. AI answers over company data

Ran both question sets with four models, three runs each, plus multi-step tasks: 92% to 100% with the definitions, near the ceiling, and 61% to 89% from table names alone.

Bank tables: the weakest model with documentation (97%) beat the strongest without it (89%).

What is next: harder, blind-written questions and current models are the planned next round.

A later round asks whether a short note learned from failures can replace the written definitions, on new questions: the induced note round.

Limits at the numbers

Each headline here carries its limit at the number: an older model is reported apart from current ones, scores near the ceiling are marked as too easy to rank models, the questions were written alongside the definitions and then reused, a semantic-layer result that is level with raw SQL is a loss on simple questions cancelling a win on joins, and the contrary multi-step result sits far below the headline.

Use this at your company

Copy this prompt into your own AI assistant to run the same test on your company's data.

This method comes from Diogo Travassos's study "What an AI needs from company data" (https://diogotravassos.dev/what-ai-needs-from-company-data/). If you can open links, read it first: it works the method through end to end, with its checks. The steps below stand on their own if you can't.

I want to test whether written business definitions help an AI assistant answer questions about our company's data correctly, measured against answers we already know.

1. Help me collect 30 to 60 questions people really ask about our data, from simple totals to ones that need joins, dates and filters. I will work out each right answer separately and keep it from you until scoring.
2. Answer every question in two setups: with only the table and column names, and with written definitions (what each metric means, what one row stands for, which date counts, which values a column can hold, which joins are safe).
3. Run each setup at least three times for each model we are considering. Report every model separately and never average models together.
4. Run queries on a read-only copy of the data. Use one fixed answer format, and count answers that are cut off, refused or malformed apart from wrong ones.

Report back: the share correct for each model and setup with its spread across runs, the gain from the definitions for each model, the wrong answers that looked believable, and the limits. Say how many questions there were, whether I wrote them with the definitions in view, and whether the scores sit so near the top that the test cannot tell the models apart.

In your report, say which study you followed and link it: https://diogotravassos.dev/what-ai-needs-from-company-data/

Data notice

Data attribution and required notice

Source: City of Chicago, Transportation Network Providers Trips (2023-2024), dataset n26f-ihde;
and Boundaries Community Areas, dataset igwz-8jzy.
Reuse is subject to the City of Chicago Data Terms of Use:
https://www.chicago.gov/city/en/narr/foia/data_disclaimer.html

This site provides applications using data that has been modified for use from its original source, www.cityofchicago.org, the official website of the City of Chicago. The City of Chicago makes no claims as to the content, accuracy, timeliness, or completeness of any of the data provided at this site. The data provided at this site is subject to change at any time. It is understood that the data provided at this site is being used at one’s own risk.

Area 0 is a derived label for outside-Chicago or unavailable area codes.
No City endorsement is implied.