How to make sure AI agents get data answers right
An introduction to evals for AI agents that answer data questions: why they're harder than chat evals, how the common approaches compare, and how we built ours.
Jump to a section
"How is everyone doing evals? I have no idea where to start." That question turns up in data Slack communities every week now, usually from a data lead whose team just got Claude or ChatGPT talking to the warehouse. The demo went well. Now they need to know whether the answers will still be right in a month, when nobody is watching.
We built evals to answer two questions. If people ask for the same metric in different ways, do they get the same answer? And as the models underneath keep changing, do they keep getting the right one?
Why data answers are a harder eval than chat
Most eval advice comes from chatbots and coding agents. Data questions break a few of its assumptions:
- The answer is a number. A chat answer can be judged on whether it is helpful. A revenue figure is right or wrong, and "close" is still wrong if the gap is a missing refund.
- The right answer changes every week. "What was revenue last month?" had one answer in October and a different one in November. An expected answer you wrote down once is stale by the next run.
- The model changes under you. Claude and ChatGPT ship new versions every few months, and each one reasons through a question differently. Most people never change the default model, so when the default moves, the whole team moves with it, without anyone deciding to. An answer that was right on the old model isn't guaranteed on the new one.
- The same question gets asked five ways. "Revenue last month", "how much did we make in October", "net sales MTD vs last month". If two phrasings get two numbers, one of them is wrong, and the person asking can't tell which.
- A wrong number looks exactly like a right one. There's no error message. $412,000 reads as confidently as $438,000.
The last two cause most of the trouble in practice. An agent that gets the canonical phrasing right and drifts on the casual one passes every check written by the data team, because the data team writes the canonical phrasing.
What an eval is
Strip away the tooling and an eval has three parts: a question, the answer you expect, and a way to judge whether the agent's answer matches.
For a data question, that looks like this:
| Part | Example |
|---|---|
| Question | "What was net revenue last month?" |
| Expected answer | The result of your approved net revenue query for last month |
| How to judge | Same number, within 0.5% |
Everything interesting is in the second row. Where the expected answer comes from decides what the eval can catch.
Three common approaches, and where they fall short
A fixed benchmark
Write down 50 questions and their answers, run the agent, count matches. This is how text-to-SQL research benchmarks work, and it's a fine way to compare models on a frozen dataset.
On your own warehouse it decays fast. The answers were true on the day you wrote them. A month later, every time-based question fails because the data moved, or you update the answers by hand and the benchmark becomes a chore nobody keeps up.
An LLM judge reading the trace
Give a second model the agent's conversation, its queries and results, and ask it whether the answer is correct. Omni's evals work this way: a prompt set holds up to 25 questions, a separate AI model reviews each response and returns a binary pass or fail, and the judge "doesn't independently re-run queries or inspect the live semantic model". (Source: Omni docs: Evals, https://docs.omni.co/ai/evals, checked on 2026-12-01)
A judge like this catches real mistakes: a wrong date filter, an ignored part of the question, arithmetic done in its head. What it can't catch is an answer that is internally consistent and wrong. If the agent picked the wrong revenue column and summed it correctly, the trace looks clean. Without the right answer in front of it, the judge is grading plausibility.
Spot-checking by hand
Someone on the data team asks the agent a few questions every week and eyeballs the numbers. It's where most teams start, and it works for the first fortnight. Then it gets skipped in a busy week, it only covers the questions that person thinks to ask, and it only uses the phrasing they would use.
How other tools do it
Several AI analytics tools now ship an eval feature. They differ most on two questions: where the expected answer comes from, and whether the check is repeated on fresh data. Cells are left blank where the vendor's documentation doesn't say.
| Tool | Expected answer | Re-run on current data | Several phrasings per question | When it runs |
|---|---|---|---|---|
| Databricks Genie benchmarks | Optional ground-truth SQL | Yes, 2-4 recommended | On demand | |
| Snowflake Cortex Analyst evaluations | Verified queries in the semantic view | On demand | ||
| ThoughtSpot Spotter benchmark platform | Admin records it as text or SQL | On demand | ||
| Hex Evals | Rubrics, optionally an expected SQL result or number | Yes, for SQL targets | One prompt per case | On demand or daily, weekly, monthly |
| Google Prism (Looker, BigQuery) | Assertions, including data checks and an AI judge | |||
| Wren AI Evaluation | Ground-truth SQL plus an expected output | On demand | ||
| Omni Evals | Optional expected behavior, judged from the trace | No | On demand | |
| Contextflo | Frozen copy of a trusted query | Yes, every run | Yes, 2-4, compared with each other | Weekly, plus Run now |
Databricks Genie. Benchmarks are test questions with an optional SQL answer, up to 500 per Genie agent. The docs recommend "between two and four phrasings of the same question", sharing one SQL answer. In chat mode, results are compared with the SQL answer's result set directly; Agent mode responses are graded by an LLM judge. (Source: Databricks docs: Use benchmarks in a Genie space, https://docs.databricks.com/aws/en/genie/benchmarks, checked on 2026-12-01) The benchmark APIs are in Beta. (Source: Databricks AI/BI release notes 2026, https://docs.databricks.com/aws/en/ai-bi/release-notes/2026, checked on 2026-12-01)
Snowflake Cortex Analyst. Evaluations run Cortex Analyst's generated SQL and compare the results with the verified queries in your semantic view, with an LLM judge, reporting accuracy and regressions. Runs incur warehouse charges plus evaluation credits for the judge. (Source: Snowflake docs: Cortex Analyst evaluations, https://docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-analyst-evaluations, checked on 2026-12-01)
ThoughtSpot Spotter. The benchmark platform lets an admin "record the desired output in text or SQL format" and run it for latency and accuracy, with evaluator reasoning for each pass or fail. Benchmarks aren't shared between users yet. (Source: ThoughtSpot docs: Spotter benchmark platform, https://docs.thoughtspot.com/cloud/latest/spotter-benchmark-platform, checked on 2026-12-01) It became generally available in release 26.11. (Source: ThoughtSpot Cloud 26.11.0.cl release notes, https://docs.thoughtspot.com/cloud/26.11.0.cl/notes, checked on 2026-12-01)
Hex. Evals grade agent threads against rubrics with an LLM judge. A numeric target can be a SQL query, and "the query runs at grade time", so the expected answer comes from current data. Suites can run daily, weekly or monthly. Evals are on the Team and Enterprise plans, and runs consume credits for both the agent and the judge. (Source: Hex docs: Evals, https://learn.hex.tech/docs/agent-management/evals, checked on 2026-12-01)
Looker and BigQuery. Google released Prism, an open-source evaluation tool for Conversational Analytics in BigQuery and the Looker API, with text, query, data and AI-judge assertions. (Source: Google Cloud blog: Run evals for Conversational Analytics agents using Prism, https://cloud.google.com/blog/products/ai-machine-learning/run-evals-for-conversational-analytics-agents-using-prism, checked on 2026-12-01) The repository notes it is "not an officially supported Google product". (Source: GitHub: GoogleCloudPlatform/conversational-analytics-prism, https://github.com/GoogleCloudPlatform/conversational-analytics-prism, checked on 2026-12-01)
Wren AI. Evaluation pairs each question with ground-truth SQL and an expected output, marks each run pass or fail, and shows a diff of the SQL and data. It's on Wren's Enterprise plans. (Source: Wren AI docs: Evaluation, https://docs.getwren.ai/cp/guide/evaluation/overview, checked on 2026-12-01)
Omni. Covered above: up to 25 prompts per set, an optional expected behavior set through the API, a judge that reads the run rather than re-running queries, on demand, and each result costs prompt and judge credits. (Source: Omni docs: Evals, https://docs.omni.co/ai/evals, checked on 2026-12-01)
Each of these is a real step past spot-checking. Two things decide whether an eval catches the failures that matter on live data: whether it compares with this week's actual result, and whether it notices when the same question asked differently gets a different answer.
How we built ours
Contextflo's evals started from those two failures. Each design choice below is there because the simpler version let a wrong answer pass.
Anchor every question to a trusted query
The expected answer is never written down. It's a query your team already trusts, an approved saved query or a metric, and every run executes it on that week's data. The right answer for "revenue last month" in December is whatever the approved revenue query returns for November, today.
If that query errors or its result changes shape, say a column was renamed, the run stops with Trusted query failed before asking the agent anything. An eval against a broken anchor would only produce noise.
Freeze a copy of the anchor
It's tempting to link the eval to the live metric, so it always uses the current definition. That breaks the eval in the case that matters: someone edits the metric badly, the eval follows the edit, the agent follows the edit, and everything passes.
So each case keeps a frozen copy of the query it started from. When the source metric or saved query changes, the run flags it, and a person decides whether the new definition is the right one.
Ask 2-4 phrasings and compare them with each other
Each case holds two to four ways people actually ask the question. Every phrasing is asked on its own, and the judge checks each answer against the trusted result and against the other phrasings.
Comparing phrasings with each other is what catches the drift described earlier. "Revenue last month" might be right while "how much did we make in October" picks up gross instead of net. Either one alone could look fine.
Store a period, not dates
A case says "last full month" or "last full week", never "October 2026". Each run resolves the period into real dates and writes the same dates into both sides: the trusted query's filter and the wording of every phrasing. The window always ends before today, because today's data is still arriving and a half-loaded day would fail the eval for the wrong reason.
Run as an ordinary teammate
The agent answering eval questions runs as a regular member of your team, not as an admin with every table open, so your access rules apply exactly as they would for anyone else. An eval that passes with full access tells you little about what a sales manager will see.
Let an LLM judge, against the real result
The judge is an LLM, working to a tolerance set on each case. A code-side numeric check would be simpler, but many answers aren't one number: "top 5 customers by revenue" is a ranking, "which region grew fastest" is a name. The judge's job is narrow, though. It compares answers with a result that was actually computed this week.
Keep case creation with admins
Creating and approving cases is admin-only. An eval decides what counts as the right answer, so that decision stays with the people who own the definitions. In practice the admin doesn't write cases by hand: they ask their own agent, in Claude or ChatGPT, to draft one from an existing metric with a few phrasings. The agent runs the trusted query once as a baseline, the admin reviews and approves it, and from then on it runs weekly. The Eval Sets page shows each case's history, each phrasing's verdict and the agent's steps, with Run now for a check after a fix.
Evals are on every plan.
Reading the results
Each run ends in one status:
| Status | What happened | What it usually means |
|---|---|---|
| Passed | Every phrasing matched the trusted answer | Nothing to do |
| Drifted | At least one phrasing gave a different answer | Missing context: a misread column or an unused definition |
| Trusted query failed | The anchor errored or changed shape | A table or column changed under it |
| Error | A phrasing couldn't be judged this run | Usually transient; run it again |
Drifted is the one worth reading closely. Open the phrasing that failed, read the agent's steps, and you'll usually find the table description or metric that would have prevented it. Fix that, click Run now, and the case confirms the fix. The fix also helps every future question that touches the same table, which is why evals and grounded answers work as a pair: grounded answers show which live answers used an approved definition, and evals check that the definitions keep producing the right numbers.
How to start
Most teams already have what it takes to start:
- Your 10 most-asked questions. Look at what people asked the data team last month, or at the metrics leadership reviews weekly.
- A trusted query for each. The saved queries and metrics you already approved. If a question has no trusted query, writing one is the first fix.
- Two to four phrasings each, in the words people actually use, shorthand included.
- A weekly run on a finished period, with someone who reads the drifted ones.
In Contextflo, step 4 is built in, and steps 1-3 are a conversation with your agent. The evals docs walk through creating the first case.
Here is a more in-depth look at Contextflo and how it works.
What is Contextflo?
Contextflo is a governed context layer between your data and the AI your team already uses. Connect your warehouse once, and your team asks questions in their own Claude or ChatGPT. The model writes and runs the SQL; Contextflo supplies the definitions, the per-user access control, and the audit that make the answers trustworthy. Your data never moves, and you do not need a data team.
How it works
Your team queries in their own Claude or ChatGPT over MCP, so you bring any agent rather than a locked-in bot, and every answer comes back with the SQL shown and access enforced per user.
FAQ
What is an eval for an AI data agent? An eval is a question, the answer you expect, and a way to judge whether the agent's answer matches it. For data questions, the expected answer should come from a query you already trust, run on current data, because the right number changes every week.
How do I start doing evals for AI analytics? Pick the 10 questions your team asks most, use the saved queries and metrics you already trust as the expected answers, write 2-4 ways people actually ask each one, and run them every week on a period that has already finished.
Why not just use an LLM judge? A judge that only reads the agent's answer can tell you the answer looks reasonable, not that it's right. Give the judge the trusted query's actual result for the same dates, and use it to compare, not to decide what's true.
Does Contextflo include evals? Yes, on every plan. Each eval case anchors to a frozen copy of a trusted query, asks 2-4 phrasings of the question every week as an ordinary teammate, and checks each answer against the trusted result and against the other phrasings.




