All posts
Haithem Jarraya · · 12 min

Who placed the order?

benchmark AI agents semantic layer MCP

An order names an account. Does that tell an agent which person placed it? On BIRD’s financial database, Qwen queried the raw tables and answered with the account. Through Mycorr, it followed the declared links from the order to its account, then on to the client: the answer BIRD expects.

Across our 41 selected questions, the same context helped. With BIRD’s column documentation stored in Mycorr beside the tables, Qwen went from 35 to 39 correct answers and Haiku from 38 to 40, without losing a question either had answered on the raw tables. Haiku’s 40 tied for the best score in the study.

In our first benchmark, writing down business rules made a large difference. This follow-up tested a second kind of context: declared links between tables.

What we tested

BIRD1 is a benchmark for answering questions with SQL. Its financial database has eight tables, including one with columns named A2 to A16, and Czech coded values. Most of our selected questions require joining tables. A declared link records which columns belong together, helping an agent find a path from an order to its account and then to a person.

We ran Qwen 3.8-flash and Claude Haiku 5.5 in four setups:

  • Raw: tables queried through DuckDB, without documentation.
  • Document: the same access, plus BIRD’s column documentation in one short document.
  • Mycorr, links only: tables, declared links and SQL through Mycorr’s agent tools.
  • Mycorr, links and docs: the same Mycorr model, with the document’s words added as column descriptions.

We used BIRD’s existing documentation, including its typos. The last setup matches the document’s wording, but also provides links and different tools. This does not isolate delivery format or the effect of links alone.

We selected 41 of 106 questions after reviewing their wording and reference SQL. None of BIRD’s challenging questions survived our filter. We withheld BIRD’s hints from every setup and ran each question once per model and setup.

Context fixed most of the remaining errors

Correct answers out of 41 BIRD-Financial questions. Qwen 3.8-flash: 35 on the raw tables, 40 with BIRD's column documentation, 38 through Mycorr with links only, 39 through Mycorr with links and the documentation. Claude Haiku 5.5: 38, 38, 38 and 40.

Through Mycorr with documentation, Qwen fixed 4 of its 6 raw-table errors and Haiku 2 of its 3. Links alone took Qwen from 35 to 38. Given the same words as a plain document, Qwen did one better than through Mycorr, and Haiku two worse.

The models started high. Our selection excluded the questions BIRD labels challenging, and BIRD has been public since 2023, so the models may have seen it. With only a handful of errors left to fix, none of these differences is statistically significant; the methods give every comparison.

What “approved” meant

A question asked how many loans of at least 250,000 were approved between 1995 and 1997 for accounts receiving monthly statements.

Without documentation, both models treated “approved” as a loan-status condition. They returned either 3 or 49. BIRD’s documentation says that a loan’s date is “the date when the loan is approved.” Counting the loans dated in that period gives the expected answer: 65.

With the documentation, both models answered 65, whether they read it as a document or inside Mycorr. The date definition explains the intended reading. We supplied the whole documentation, so this was not a test of that sentence alone.

The title’s question works the same way, with a link instead of a definition: “Who placed the order with the id 32423?” Qwen answered account 2058 on the raw tables, and client 2497 through Mycorr. Haiku found the client on its own; Qwen needed the declared path. The full path is in the methods.

The definition we never supplied

Every setup missed this question:

How many percent of ‘Gold’ cards were issued prior to 1998?

All eight runs answered 39.77%: 35 of the 88 gold cards. BIRD expects 3.92%: those same 35 cards divided by all 892 cards. Only the withheld hint specified that denominator.

Neither the links nor the column documentation contained it, and our question filter should have caught it; the reported scores include it. No agent can guess a convention nobody wrote down. It has to live somewhere the agent reads.

What this means for your data

The errors we traced had the same cause: the meaning lived outside the tables. “Approved” meant a date, not a status. An order’s person sat two links away from the order. Your company’s tables have the same gaps, usually with no BIRD documentation to fill them.

In Mycorr, a definition sits on the column it defines and a link on the tables it joins. Every agent that connects through Mycorr’s agent tools reads the same context, instead of each prompt carrying its own copy of a document.

One check from this study: we discarded an earlier Haiku run, which scored 39 of 41 through Mycorr, after finding that a plugin from our machine had leaked into its sessions. The results above use the clean rerun. BIRD is small and well known; larger, private schemas, where context no longer fits in one document, are where we expect the difference to matter most, and we have not tested them yet.

Try it on your own tables. The free plan needs no card: upload your data, declare the links and definitions that live in people’s heads, and point your agent at it. The docs show how, or get in touch and we’ll help you set it up.

Methods and available data

The harness, run traces and context documents are internal. The public SQL below checks the order example; it does not reproduce the experiment.

Study setup, full results and limitations

Database and selection

The model has 55 columns, eight declared links and 1,056,320 transaction rows. Districts has columns A2 to A16; account statement frequencies include POPLATEK MESICNE, POPLATEK TYDNE and POPLATEK PO OBRATU.

Transactions, first rows

trans_id   account_id   date         type     operation       amount   balance
1          1            1995-03-24   PRIJEM   VKLAD           1000     1000
5          1            1995-04-13   PRIJEM   PREVOD Z UCTU   3679     4679
6          1            1995-05-13   PRIJEM   PREVOD Z UCTU   3679     20977

The BIRD-Financial model in Mycorr's graph view: eight tables joined by eight declared links, with Accounts and Dispositions at the centre. Districts is selected, and the panel on the right lists its columns: district_id, then A2 to A10, with an empty description.

The initial model had no descriptions, units or recipes. We added BIRD’s documentation to 53 of 55 columns; reading it back reproduced the 3,647-byte document exactly.

A published audit found noise or errors in 52 of the database’s 106 development questions2. We selected single-value or short-list answers, excluding ties and wording/SQL mismatches. The gold-card example shows this check was imperfect. The selected set contains 31 simple and 10 moderate questions; none of the seven challenging questions survived.

In the reference SQL, 36 selected questions need a join and 12 need two or more. In DABstep, only 5–15 of 50 Mycorr runs per model used a JOIN. Thirty selected BIRD questions have hints. Without them, raw Qwen answered 25 correctly and Haiku 27, including the translation of weekly issuance to POPLATEK TYDNE.

Expected answers come from executing BIRD’s SQL on its database. We used part 1’s scorer, with numerical tolerance and number signs ignored. The setups were tested on different days. There was one run per question and setup.

Full scores

ModelRawDocumentMycorr, linksMycorr, links + docs
Qwen 3.8-flash35 (85%)40 (98%)38 (93%)39 (95%)
Claude Haiku 5.538 (93%)38 (93%)38 (93%)40 (98%)

Each denominator is 41. In the paired comparisons below, “gained” means the comparison setup answered a question correctly that the reference setup missed; “lost” means the reverse. These describe outcomes, not isolated causal effects.

ModelSetup compared with rawGainedLostTwo-sided paired p
Qwen 3.8-flashDocument500.06
Qwen 3.8-flashMycorr, links410.38
Qwen 3.8-flashMycorr, links + docs400.13
Claude Haiku 5.5Document111.00
Claude Haiku 5.5Mycorr, links111.00
Claude Haiku 5.5Mycorr, links + docs200.50
ModelMycorr, links + docs compared withGainedLostTwo-sided paired p
Qwen 3.8-flashMycorr, links only211.00
Qwen 3.8-flashDocument011.00
Claude Haiku 5.5Mycorr, links only200.50
Claude Haiku 5.5Document200.50

With five or fewer disagreements, as observed here, even a clean sweep does not reach 0.05 in the two-sided paired sign test. This concerns the observed disagreements, not the capacity of any 41-question study. Nonsignificance does not establish equivalence.

We did not test Mycorr with descriptions but no links, repeat runs to measure variability, or provide BIRD’s hints in a comparison. Nor did we test permissions, changing schemas or context too large for one prompt. Run dates differed; prior model exposure is unmeasured, and the Czech coded values may be easier for these models than they look to an English-speaking analyst. The selected sample does not represent all of BIRD-Financial.

Tokens, turns and cost

ModelSetupMean prompt tokens per questionMean turnsEstimated cost, 41 questions
Qwen 3.8-flashRaw113K4.9Not reported
Qwen 3.8-flashDocument110K4.6Not reported
Qwen 3.8-flashMycorr, links229K6.6Not reported
Qwen 3.8-flashMycorr, links + docs139K7.0Not reported
Claude Haiku 5.5Raw5K4.0$0.03
Claude Haiku 5.5Document9K4.4$0.04
Claude Haiku 5.5Mycorr, links53K6.0$0.12
Claude Haiku 5.5Mycorr, links + docs52K5.9$0.12

Prompt tokens accumulate across a run, rather than measuring a single prompt’s size. Every run in the Mycorr documentation setup read table descriptions. The costs are estimates for these runs; token counts alone do not establish dollar costs across models.

The discarded Haiku run

Plugin setup text appeared in final answers for 29/41 raw runs, 33/41 document runs and no Mycorr runs. One agent asked which plugin options to enable instead of answering. The discarded scores were 37 raw, 36 document and 39 Mycorr with links: a lead of two or three answers, not percentage points.

The rerun used restricted mode, excluding the machine’s plugins, hooks and settings. It invalidates the earlier comparison without proving how much of the score change the plugin caused. Qwen’s separate client produced no answers containing that text.

The order example

Order 32423 belongs to account 2058. The account's disposition names client 2497. The agent on the raw tables answered 2058, the account. The agent through Mycorr followed the declared links to Clients and answered 2497, the client, which is BIRD's answer.

Qwen’s raw response saw both account 2058 and client 2497:

The placing party recorded on the order is account 2058 (its OWNER-disposition client is 2497, but the order itself attributes placement to account_id 2058).

Through Mycorr, Qwen chose the client and reported:

Checked via the declared join path Orders.account_id → Accounts.account_id → Dispositions.account_id → Dispositions.client_id → Clients.client_id …

Check the relationship against BIRD’s public development database:

-- financial.sqlite from BIRD's development set
SELECT o.order_id, o.account_id, d.client_id, d.type
FROM "order" AS o
JOIN disp AS d ON d.account_id = o.account_id
WHERE o.order_id = 32423;

The loan example

The full question is:

Between 1/1/1995 and 12/31/1997, how many loans in the amount of at least 250,000 per account that chose monthly statement issuance were approved?

Of the four raw and links-only runs, three filtered for loans whose contracts ran without problems and answered 49. Raw Qwen kept only finished loans and answered 3. BIRD’s reference answer counts all 65 loans dated in the requested range. With the column documentation, both models answered 65 in both delivery setups.

References

  1. Li, J., Hui, B., Qu, G., Yang, J., Li, B., Li, B., Wang, B., Qin, B., Cao, R., Geng, R., Huo, N., Zhou, X., Ma, C., Li, G., Chang, K. C. C., Huang, F., Cheng, R. and Li, Y. (2023). "Can LLM Already Serve as A Database Interface? A BIg Bench for Large-Scale Database Grounded Text-to-SQLs." arXiv:2305.03111, 4 May 2023. https://arxiv.org/abs/2305.03111
  2. Wretblad, N., Gordh Riseby, F., Biswas, R., Ahmadi, A. and Holmström, O. (2024). "Understanding the Effects of Noise in Text-to-SQL: An Examination of the BIRD-Bench Benchmark." arXiv:2402.12243. https://arxiv.org/abs/2402.12243