Guide · Measuring accuracy

How to measure agent accuracy with and without business context

For teams who want evidence, not claims, before they invest in a context layer.

Updated

To measure whether business context improves an agent, run the same questions against the same model under several conditions: no context, schema only, document retrieval, and a context layer. Grade answers against a ground truth you wrote, repeat runs, and report the spread. This page is a method, not a result: BrainBox has not published benchmark numbers, and evals are on our roadmap.

  • Change one thing at a time: same model, prompts, tools and settings across conditions.
  • For SQL, grade by comparing result sets, not by reading the query.
  • Repeat runs and report variation; one run proves little.

1. Write the questions and the answers

Collect real questions your agent should answer, such as the ones people ask your data team. For each, write the correct answer yourself, and for SQL tasks write the reference query. Include questions that depend on business meaning ("active customer", "net revenue") as well as plain lookups. Keep the answers out of anything the agent can read.

2. Fix everything except the context

Use the same model, system prompt, tools, temperature and retry policy in every condition. The only difference is the context in the table above. Load each condition from a config so the run can be repeated.

{
  "model": "<your model>",
  "questions": "questions.jsonl",
  "conditions": ["none", "schema", "docs", "context-layer"],
  "runs": 5
}

3. Grade by execution where you can

For SQL, run the agent's query and the reference query and compare the result sets. A query can look right and return the wrong rows, and a different query can be right. For free-text answers, grade against a written rubric, and have a person check a sample of the grades.

4. Repeat and report the spread

Run each question several times per condition. Report the share correct per condition with the variation between runs, the kinds of failure (wrong table, wrong join, wrong filter, wrong metric), and cost and latency. Read the failures, not only the totals.

A public dataset to start with

The Olist e-commerce sample works for a first run. In your agent, run the sample setup from Get started (init --demo olist) to load it as a sample Brain. Sample data: Brazilian E-Commerce Public Dataset by Olist, CC BY-NC-SA 4.0, adapted and shared under the same licence; free for non-commercial use; not affiliated with or endorsed by Olist.

npx -y @brainbox-labs/cli@latest init --demo olist
Conditions to compare
ConditionWhat the agent getsWhat it isolates
A. No contextThe question and database access onlyThe baseline
B. Schema onlyTable and column names and typesWhat structure alone adds
C. Document retrievalPassages retrieved from your docsWhat text retrieval adds
D. Context layerEntities, join keys, rules, metrics and docs over MCPWhat a reviewed model adds

FAQ

Does BrainBox publish accuracy numbers?
No. We have not published benchmark results, and evals are on our roadmap. This page describes how to measure it yourself.
Why not quote vendors' benchmark figures?
Published figures often use different datasets, models and grading, so they are not comparable. Measure on your own questions.
What data can I try this on?
The Olist e-commerce sample (a public Brazilian e-commerce dataset), which BrainBox can load as a sample Brain with init --demo olist.
How many questions do I need?
Enough that a few flipped answers do not change your conclusion. Start small, look at the failures, and add questions.

Give your agents a brain.

Sign in and ask your first question.

Book a Demo