Semantic layer evaluation, third round. The first round tested one model without tools; the second gave these four models tools, on questions I wrote alongside the layer.
On 40 questions an independent author wrote blind, with 3 runs per question, the semantic layer helped none of 4 models: GPT-6 Luna scored 15.0 points lower with it, Claude Sonnet 5.5's strict-format lead on my own questions did not hold, and SQL alone left Claude Haiku 5.5 at most 4.2 points, too little to show its lead
The questions come from an independent author who never saw the layer, the prompts or the earlier questions, writing to a question mix I set. SQL alone was right on 87% to 98% of runs, which left the layer between +2.5 and +13.3 points to gain. On the 55 published questions, written alongside the layer, its strict lead for the two Claude models was +9.7 and +10.9 points; counting answers with a note before the JSON, +2.4 and +10.9. The layer can express only 9 of the 40 blind questions. With the layer, runs often answered without testing a query first, and on questions it cannot express those answers failed more often than the runs that did test one.
Claude Sonnet 5.5
Depends on the answer format
Published questions (55), layer minus SQL, points +9.7 (+3.0 to +17.6); counting notes +2.4 (−1.8 to +7.9)
Blind questions (40) −5.8 (−15.0 to +2.5); counting notes +1.7 (−2.5 to +6.7)
Blind minus published, as declared −15.5 (−27.0 to −4.6)
Right on the blind questions SQL only 107 of 120, with the layer 100 of 120; the largest gain SQL left room for: +10.8 points
15 of its 20 misses with the layer were queries whose result matches the key, behind a one-line note, which the answer format fixed in advance scores as invalid; it did the same 6 times with SQL only, and in the second round 12 of its SQL-only answers failed the same way. "Counting notes" counts such answers in both setups, a reading added after the results; counting them with the layer only, a one-sided reading, the blind gap is +6.7 points (+0.8 to +12.5).
Queried the trip tables before answering: 120 of 120 runs with SQL only, 77 of 120 with the layer.
Claude Haiku 5.5
Could not show its published gain (ceiling)
Published questions (55), layer minus SQL, points +10.9 (+4.2 to +18.8); the same counting notes
Blind questions (40) +0.8 (−5.8 to +8.3); the same counting notes
Blind minus published, as declared −10.1 (−20.3 to −0.2), driven by the ceiling
Right on the blind questions SQL only 115 of 120, with the layer 116 of 120; the largest gain SQL left room for: +4.2 points
SQL alone was right on 145 of 165 runs on the published questions and on 115 of 120 on the blind ones, so on the blind set the layer could gain at most +4.2 points, less than its published lead.
Queried the trip tables before answering: 120 of 120 runs with SQL only, 106 of 120 with the layer.
GPT-6.1 Sol
Held: no difference on either set
Published questions (55), layer minus SQL, points 0.0 (0.0 to 0.0); the same counting notes
Blind questions (40) +0.8 (−2.5 to +5.0); the same counting notes
Blind minus published, as declared +0.8 (−2.5 to +5.0)
Right on the blind questions SQL only 117 of 120, with the layer 118 of 120; the largest gain SQL left room for: +2.5 points
SQL alone was right on 117 of 120 runs and the layer on 118: no measurable difference on either question set.
Queried the trip tables before answering: 104 of 120 runs with SQL only, 55 of 120 with the layer.
GPT-6 Luna
Did not hold
Published questions (55), layer minus SQL, points +2.4 (−0.6 to +6.1); the same counting notes
Blind questions (40) −15.0 (−24.2 to −6.7); the same counting notes
Blind minus published, as declared −17.4 (−27.0 to −8.6)
Right on the blind questions SQL only 104 of 120, with the layer 86 of 120; the largest gain SQL left room for: +13.3 points
With the layer, 52 of 120 runs answered without any tool. On the questions the layer cannot express, its layer runs that did not query first were right 26 of 48 times, against 35 of 45 for those that did (a breakdown added after the results).
Queried the trip tables before answering: 119 of 120 runs with SQL only, 56 of 120 with the layer.
Main limitation For Claude Haiku 5.5 and GPT-6.1 Sol, SQL alone left the layer at most +4.2 and +2.5 points to gain on these questions, too little to show a lead like the published one. Claude Sonnet 5.5's result depends on the strict answer format: 15 of its answers with the layer put a sentence before a query whose result matches the answer key. The scorer's validity on the new runs was not measured. A weekday function the tools list but the database lacks cost the layer setup more: on the 3 weekday questions, 13 runs missed with the layer and 5 with SQL only.
The gap, on the published and the blind questions
Accuracy with the layer minus accuracy with SQL only, in points, with its interval, under the strict answer format. Hollow: the 55 published questions. Filled: the 40 blind questions. The table below adds the gaps counting answers with a note.
Under the strict format every gap but GPT-6.1 Sol's moved left; Sol's moved +0.8 points, within its interval. The rule I fixed before collecting calls a gap "layer ahead" or "SQL ahead" only when its interval clears zero, and says the result held when the blind gap falls in the same class as the published one. By that rule only GPT-6.1 Sol held, with no measurable difference on either set. Claude Haiku 5.5's lead did not hold, and the blind set left it at most +4.2 points to show one. Counting answers with a note, Claude Sonnet 5.5 shows no measurable difference on either set. GPT-6 Luna is behind with the layer either way.
Where it breaks: questions the layer cannot express
The layer has 10 metrics and 6 dimensions. It has zone names but no zone numbers, no weekly or weekday grain, no rounding, no row limit, no filter on a metric, and no way to take a share or a difference, so 31 of the 40 blind questions fall outside it. On the 9 it covers, no model showed a measurable gap. On the rest, GPT-6 Luna was behind with the layer, −17.2 points (−28.0 to −7.5): my reading is that the layer could not answer those questions, yet its presence changed how the agent wrote the SQL that did.
Accuracy by setup and the gap between them, per model and question set, under the strict answer format and counting answers with a note before the JSON (added after the results)
Model
Questions
SQL only
With the layer
Gap, strict
Interval
Gap, counting notes
Interval
Reading, strict
Claude Sonnet 5.5
Published questions (55)
89%
99%
+9.7
+3.0 to +17.6
+2.4
−1.8 to +7.9
layer ahead
Claude Sonnet 5.5
Blind questions (40)
89%
83%
−5.8
−15.0 to +2.5
+1.7
−2.5 to +6.7
no measurable difference
Claude Haiku 5.5
Published questions (55)
88%
99%
+10.9
+4.2 to +18.8
+10.9
+4.2 to +18.8
layer ahead
Claude Haiku 5.5
Blind questions (40)
96%
97%
+0.8
−5.8 to +8.3
+0.8
−5.8 to +8.3
no measurable difference
GPT-6.1 Sol
Published questions (55)
100%
100%
0.0
0.0 to 0.0
0.0
0.0 to 0.0
no measurable difference
GPT-6.1 Sol
Blind questions (40)
98%
98%
+0.8
−2.5 to +5.0
+0.8
−2.5 to +5.0
no measurable difference
GPT-6 Luna
Published questions (55)
96%
99%
+2.4
−0.6 to +6.1
+2.4
−0.6 to +6.1
no measurable difference
GPT-6 Luna
Blind questions (40)
87%
72%
−15.0
−24.2 to −6.7
−15.0
−24.2 to −6.7
SQL ahead
The blind questions split by whether the layer can express them, strict format
Model
Blind questions
SQL only
With the layer
Gap, points
Interval
Reading
Claude Sonnet 5.5
The layer can express (9)
93%
78%
−14.8
−44.4 to +7.4
no measurable difference
Claude Sonnet 5.5
The layer cannot express (31)
88%
85%
−3.2
−12.9 to +4.3
no measurable difference
Claude Haiku 5.5
The layer can express (9)
100%
100%
0.0
0.0 to 0.0
no measurable difference
Claude Haiku 5.5
The layer cannot express (31)
95%
96%
+1.1
−7.5 to +10.8
no measurable difference
GPT-6.1 Sol
The layer can express (9)
100%
100%
0.0
0.0 to 0.0
no measurable difference
GPT-6.1 Sol
The layer cannot express (31)
97%
98%
+1.1
−3.2 to +6.5
no measurable difference
GPT-6 Luna
The layer can express (9)
100%
93%
−7.4
−22.2 to 0.0
no measurable difference
GPT-6 Luna
The layer cannot express (31)
83%
66%
−17.2
−28.0 to −7.5
SQL ahead
What the misses were
With the layer, runs queried the trip tables before answering less often in every model, from 100% to 64% for Claude Sonnet 5.5 and from 99% to 47% for GPT-6 Luna, as in the second round. On questions the layer cannot express, that often meant SQL written straight from the schema and not run before it was submitted. Claude Sonnet 5.5's layer runs that did not query first were right 14 of 23 times on those questions under the strict scores, against 65 of 70 for those that did (a breakdown added after the results).
The tool description, kept unchanged from the second round, lists a weekday function the database does not have. Runs that tested a query hit the error and switched to one that works; runs that did not, failed. Leaving out the 3 weekday questions, an analysis added after the results, the blind gap is −5.4 points for Claude Sonnet 5.5 and −9.9 for GPT-6 Luna (−17.1 to −3.6), still behind.
17 of Claude Sonnet 5.5's answers with the layer failed the strict decode. In 15 a sentence came before the JSON, such as "Zone 0 is in the directory. The join already counts its trips." In the second round it did the same with SQL only.
GPT-6 Luna's final answer was a query that failed to run 11 times with the layer and 1 with SQL only.
One question, two setups
The question: "What was the average trip duration for each weekday in the sample? Return weekday number, with Monday as 1 through Sunday as 7, followed by average minutes rounded to two decimal places. Include observed weekdays and sort by weekday number ascending." The layer has no weekday dimension, so this is SQL in both setups.
GPT-6 Luna, SQL only: 3 of 3 right. Every run first tried a weekday function from the tool description. The database answered with an error, and the run moved on. One of those runs, in full:
run_sql SELECT EXTRACT(DAY_OF_WEEK FROM trip_date) AS weekday_number, ...
Query failed: ConversionException
run_sql SELECT CASE WHEN CAST(STRFTIME(trip_date, %w) AS INTEGER) = 0 THEN 7 ...
Query refused: SQL parse rejected
run_sql SELECT CASE WHEN CAST(STRFTIME(trip_date, '%w') AS INTEGER) = 0 THEN 7 ...
7 rows
answer that query, scored right
GPT-6 Luna, with the layer: 0 of 3 right. All three runs made no tool call and submitted DAY_OF_WEEK(trip_date) unrun, which fails when it is scored.
What a team should do with this
Test the layer on questions its builders did not write. On my own questions the layer was ahead for Claude Haiku 5.5 by +10.9 points under either reading, and for Claude Sonnet 5.5 by +9.7 only under the strict format. On questions written blind neither lead was measurable, and GPT-6 Luna did worse with the layer. Check first how often SQL alone is already right; here that left two models little room to gain.
Measure coverage before accuracy. The layer could express 9 of 40 questions written to this mix. Track that share on real questions, and grow the layer where the misses cluster (here: zone numbers, weeks and weekdays, shares).
Make the agent run its SQL before it answers. Outside the layer, most misses came from runs that never queried the trip tables before answering. A rule, or a final-answer tool that runs the query first, removes that class of miss.
Test every function a prompt promises. One function listed in this study's own tool description does not exist in the database. Agents that looked found out; agents that trusted the text did not.
Have a person read a sample of the scorer's verdicts. Strict comparison counts a sentence before the answer, a value not rounded as asked or a number returned as text as wrong. Know how often that happens before reading a gap of a few points.
Limits
SQL alone was right on 87% to 98% of runs on the blind questions, against 88% to 100% on the published ones. Where it is near 100%, a question set can show the layer hurting but hardly helping.
The two question sets differ in who wrote them, how hard they are, how much the layer covers, and the GPT models' command-line client (version 0.162.1 in the second round, 0.164.0 here, each with its own instructions). The change in the gap cannot be split between those causes; the covered and not-covered split above is the closest this design gets.
One author wrote 40 questions in one pass, to a mix I set. My translation of each of the author's notes is the key query itself (40 of 40), so that comparison adds nothing beyond the keys. Another author would write other questions.
The scorer is the first round's, unchanged, and strict: any difference in format, rounding, type or columns scores as wrong. A sample of 74 verdicts, drawn by the declared rule, is set aside for a person to read; no reading of it is part of these results.
The two Claude models ran in a plain tool loop and the two GPT models inside the Codex command-line agent, with its own instructions. Compare the setups within a model, not models with each other.
Three runs per question at one reasoning setting, on one month of one city's trips.
How the work was checked
The answer keys were fixed, with their hashes, before the author's notes were opened. Coverage counts a question as one the layer can express only when a metric query returns the key's result. Claude Sonnet 5.5's 17 answers with the layer that failed the strict decode were also run with the second round's lenient decode, which takes the last JSON object in the answer: 15 then match the key. The page keeps the strict scores, fixed before collection, and shows the lenient gaps marked as added afterwards. A declared sample of the scorer's verdicts is set aside for a person to read; it does not enter any number here.
Use this at your company
To test whether a semantic layer's measured benefit holds on questions its builders did not write, paste this prompt into an assistant that can query your warehouse.
This method comes from Diogo Travassos's study "Semantic layer evaluation: questions written blind" (https://diogotravassos.dev/semantic-layer-evaluation/blind-questions.html). 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.
Help me check whether the benefit we measured for our semantic layer, when an AI agent answers questions with it, holds on questions its builders did not write.
Data you need from me: read access to the warehouse tables, the semantic layer's metric and dimension definitions with a way to query them, the test questions we already use, and someone who has never seen the layer, its definitions or those questions.
Method:
1. Give that person only the table schema, a plain description of the data and our business glossary. Ask for 40 questions people really ask, each stating its output columns and row order, and, separately, how they would compute each one.
2. Write the answer key for each question from its text alone, before reading their notes. Then compare with the notes, and report any question where the two readings differ on its own.
3. For each question, record whether the semantic layer can express it at all.
4. Run the agent in two setups, SQL only and SQL plus a metrics tool backed by the layer, with the same model, instructions, step limit and answer format, three fresh runs per question, and log every tool call.
5. Score each final answer by running it and comparing its result with the answer key.
Checks before trusting the answer:
- Report each model on its own; never average models together.
- Put the gap between the setups on the new questions next to the gap on the old ones, with ranges that resample whole questions.
- If SQL alone is right almost every time, say so: those questions can show the layer hurting but not helping.
- Split the result by questions the layer can and cannot express.
- Have a person read a sample of the scorer's verdicts on both sides, because strict comparison can mark a usable answer wrong.
- Read the runs that answered without testing a query first; that is where new questions catch an agent leaning on the layer.
Report back: per model, the gap on the old and the new questions with ranges, how many new questions the layer can express, accuracy on each part, the causes of misses, and the limits: who wrote the questions, how many, and how many runs.
In your report, say which study you followed and link it: https://diogotravassos.dev/semantic-layer-evaluation/blind-questions.html
Method and checks
Who wrote the questions
The 40 questions come from an independent author who never saw the layer, the prompts or the earlier questions. The questions were written by an author independent of the models tested. The author was given the table schema, a plain description of the data, a business glossary, the list of SQL functions the tools accept (which names DAY_OF_WEEK, a function this database lacks), and a question mix: about 12 simple questions, 14 that group or compare (by day, week, weekday, zone or sharing), and 14 harder ones (zone names, shares and rates, comparisons between groups, two-step logic), each stating its output columns and row order, how top lists break ties and how many decimals to round to, with no medians, percentiles, window functions or time of day. I set that mix knowing the layer. The author wrote in one pass with no access to data rows and wrote down separately how each question should be computed. The questions, the author's readings, the answer keys and their hashes are fixed in the protocol.
Answer keys, readings and coverage
I wrote the key query for each question from its text alone and fixed those queries before reading the author's notes. Then I translated each note into a query: my translations matched my keys for all 40, and 40 of the 40 translations are the key query itself. A question counts as one the layer can express when a metric query returns the key's result; 9 do. The other 31 need zone numbers, weeks and weekdays, rounding, row limits, minimum counts, shares and differences, distance bands, a comparison of two tables, and metrics for tips, total payment, missing fares or the largest payment. No question was left out.
Setups, models and runs
Everything but the questions is the second round's: the same instructions, tools, step limit of 10 tool calls and answer format, checked to be byte for byte identical before collection. Claude Sonnet 5.5 (claude-sonnet-5-5, effort medium); Claude Haiku 5.5 (claude-haiku-5-5, effort medium); GPT-6.1 Sol (gpt-6.1-sol, reasoning effort medium); GPT-6 Luna (gpt-6-luna, reasoning effort medium). The Claude models ran through the model provider's API in a plain tool loop; the GPT models ran through the Codex command-line agent on a clean configuration, with the tools as two logged commands, on a newer release of that agent than the second round used. Each of 960 runs (40 questions, 2 setups, 3 runs, 4 models) was a fresh conversation.
Scoring, intervals and the reading rule
Each final answer is scored with the first round's code and tolerance, unchanged: the query runs on the same database and its rows must match the answer key to one millionth. Intervals resample whole questions, 10,000 times; the gap between the two question sets resamples each set on its own. A gap is "layer ahead" or "SQL ahead" only when its interval clears zero, and the result held when the blind gap falls in the same class as the published one. All of this was fixed before collection. No reading of outputs is published.
Runs that did not end normally
Step limit reached: 0. Cut off or no final answer: 0. 116 GPT runs logged reconnection messages from the provider's connection, which the protocol counts as provider errors; each was asked again once, as declared, and all 116 answered. All 116 first attempts were complete answers as well: the command exited normally and the final message decodes as JSON. Keeping the first attempts instead of the re-runs, a check added after the results, gives GPT-6 Luna −11.7 points (−20.0 to −4.2) and GPT-6.1 Sol 0.0 (−2.5 to +2.5), the same readings. GPT runs that used a command other than the two tools: 0. No run was dropped.
Latency and safety
Median seconds per run: Claude Sonnet 5.5 5.0 with SQL only and 3.3 with the layer; Claude Haiku 5.5 5.5 with SQL only and 4.8 with the layer; GPT-6.1 Sol 9.6 with SQL only and 8.4 with the layer; GPT-6 Luna 9.1 with SQL only and 7.3 with the layer. Runs with the layer made fewer tool calls, so they finished sooner. No run tried to write, and nothing outside the three tables was read. 5 exploratory tool calls put two queries in one call, with a semicolon or a UNION, and 1 used a generated series as a table; the sandbox refused them. 2 final answers used a window function, which the sandbox refuses, and were scored as wrong.
Analyses added after the results
The gaps counting answers with a note in both rounds, Claude Sonnet 5.5 with its notes counted in one setup, the gaps without the weekday questions, the gaps with the first attempts kept, the largest gain SQL left room for, and accuracy split by whether a run queried the trip tables first. Each is labelled where it appears; the headline uses the scores fixed before collection.
Data
The data is the first round's deterministic sample of 10,000 public Chicago rideshare trips from January 2024.
Displayed numbers
Percentages are rounded to whole numbers, half away from zero; gaps are in percentage points to one decimal. Exact values are in results-blind2.json.