---
title: "Analytics Agent Bench: Lessons From 150+ Runs"
url: "https://atlan.com/context-and-chaos/issue/analytics-agent-bench-lessons-from-150-runs/"
description: "An analytics agent goes wrong on the business rules nobody documents. Ours were already in the SQL our analysts had run."
keywords: "AI Agents, Context Engineering, Semantic Layers, AI Evaluation"
---

A Context & Chaos deep dive by Himanshu Sikaria, Head of AI Labs & Field Engineering at Atlan. Published December 1, 2026. His argument: an analytics agent goes wrong on the business rules nobody documents; ours were already in the SQL our analysts had run, and serving that SQL took the agent from 32% to 83% on 107 real questions.

## The findings in brief

- Context that shows past decisions beat context that describes the data: 32% with table definitions alone (bare schema), 83% with a metrics layer mined from analysts' past queries and checked against the warehouse.
- Documentation, hand-written semantic views and an ontology topped out at 44%. On the 61 questions that need a join, none of them passed 18%.
- The same metric written as SQL beat the same logic written in English, 84% to 75%. All of the gap came from questions that need a join.
- The setups people built by hand took about 160 hours and scored near the bottom. The two most accurate setups were also the two fastest.
- A better model mattered less than better context. With past SQL, an open-weight model that started 8 points behind finished ahead.
- Figure: headline results. Across all 107 questions, accuracy went from 32% to 83%; on the 61 join questions, from 11% to 82%.

## The problem that isn't solved yet

- One benchmark question asks how much sales pipeline a conference influenced, counting each customer account once. Given only table definitions, the agent returned a number 4.4 times the right answer.
- It added up every deal for every person on every row, counted deals that existed before the conference, and counted people who registered but never showed up. The three rules: count each account once, count only deals that started after the event, count only people who actually attended.
- None of those rules is written in the tables. The model can write SQL; what it lacks are the decisions a business has made and never written down.

## How we tested

- 107 hard questions the teams asked of their go-to-market data, from marketing events and campaigns (40), account and product usage (22), sales pipeline (21), customer success (17) and sales operations (7). Each answer was sealed by running the correct SQL against a frozen copy of the warehouse and checking it against a trusted dashboard.
- Every run used the same single read-only SQL tool, step limit and questions; only the context changed. Code graded every answer: counts exactly, amounts within half a percent, refusals counted as misses.
- With two exceptions, no person wrote the context: it was built from the query log and the warehouse. The semantic views were written by hand and the ontology was built by people with a model's help, as comparisons.
- Figures: the 107 questions by business area; how one run works; the eight setups. The five that describe the data scored 31.8% to 43.9%; the three that show past SQL scored 70.1% to 83.2%.

## First up: back to our original question

- Table definitions alone applied none of the three rules (4.4 times the right answer). Three ways of describing the data applied one rule (4.0 times). Past SQL applied two (1.7 times). Only the metrics layer applied all three and got it exactly right.
- Figure: how much pipeline the conference influenced, counting each account once.

## Describing the data barely helped

- Documentation (descriptions, READMEs, mined filters and joins) reached 43.9%. Semantic views, 40 files written by hand, reached 38.3%. The ontology, a virtual knowledge graph, reached 33.6% and took more than five minutes per question. Column profiling reached 34.6%: refusals fell from 33 to 9, but only three became right answers. The authors call this confident drift.

## What worked: SQL that shows the decision

- The five most relevant past queries took the agent from 31.8% to 70.1%. Ranking queries by how many analysts ran them reached 75.7%, at 1.3¢ per right answer.
- The metrics layer mines the query log for metrics, merges duplicates, runs each metric's SQL against the warehouse to check it, and serves the few that fit each question alongside trusted past SQL. It reached 83.2% and broke nothing.
- Figure: describing the data vs showing the decision. Every setup that shows decisions as SQL scored above every setup that describes the data.

## Why SQL worked: the hard questions need complex rules

- With bare schema, the agent got 64% of the 42 single-table questions right and 11% of the 61 that need more than one table, refusing half of those.
- Five ways of describing joins all landed between 15% and 18% on join questions. The agent often found one wide table and answered from that: join blindness. Past SQL reached 61% and the metrics layer 82%.
- Figure: questions that need a join are where setups differ.

## Does it have to be SQL? Why not just English?

- The metrics layer served every metric as name plus SQL, or as name plus English prose with the same logic. SQL won 84.1% to 74.8%: 50 of 61 join questions against 40, and a tie at 40 of 42 single-table questions.
- Removing a metric's English description cost nothing; removing its SQL cost 8 points.
- In a separate 35-question test, a table's own DDL scored 68.6%, against 48.6% for its catalog description and 42.9% with no notes, using half the queries.
- Figures: the same metric in English and in SQL; what each part of a metric is worth; the table's own DDL beat its written description.

## The most accurate setups were also the fastest

- The two most accurate setups took 29 and 22 seconds per question. Ranked past SQL produced the cheapest right answers at 1.3¢; the metrics layer cost 3.9¢, close to bare schema's 3.4¢, for 2.6 times as many right answers. The ontology cost 22.6¢ per right answer.
- The semantic views took about 60 hours of human work and the ontology about 100; the metrics layer took none to build and scored highest.
- Figures: accuracy against cost per right answer; accuracy, cost and time; who wrote the context.

## Context or intelligence: which matters more?

- With bare schema, five models scored between 31.8% and 42.1%. Given past SQL, an open-weight model went from 31.8% to 70.1% and a leading closed model from 40.2% to 66.4%. The model that started ahead finished behind.
- Figure: better context beat a better model.

## How to get to 100%

- The shipped configuration missed 18 of 107, mostly rules about which rows belong (a cohort, an exclusion, a population). 46% of the remaining misses needed a definition nobody had ever written down.
- Sort every miss into one of three kinds: a definition never written, written but never served, or served and ignored. Four misses within 1% of the right answer traced to one missing rule that leaves out internal contacts.
- Figure: three kinds of miss, and the smallest fix for each.

## What we learned

- On building the bench: answers can leak into the context (removing leaked SQL dropped one setup from 64.5% to 53.3%); freeze the warehouse; grade the value, not the text; best of many runs can say anything (105 of 107 answered right in at least one run, but the best single run got 90). Gaps under about 7 points are noise.
- Figure: eight questions to ask of any AI benchmark, each answered for this one.
- On building the agent, seven rules: start with one domain; build the golden set before any context; fix the context before you change the model; write each business rule into a metric's SQL; settle conflicts before the agent sees them, provenance first, then the owner; read the raw trace of every miss and feed real usage back; make the agent reliable on what happened before you ask it why.

## Every question, every setup

- Figure: all 107 answers for each setup, one column per question. Blue is right, dark gray is wrong, white is a refusal.
- Adapted from an essay first published on Frontier, where every figure is interactive: https://atlan.com/frontier/essays/a-context-bench-for-analytics-agents/

## Next steps

- To get new writing on context engineering, subscribe to Context & Chaos: [Context & Chaos newsletter](https://atlan.com/context-and-chaos/)
- To see Atlan working on your own data stack, book a demo: [Book a demo with Atlan](https://atlan.com/forms/talk-to-sales-contact/)
