EKOS Benchmarks: Agent Tokens and Text-to-SQL
How many tokens an AI agent saves by querying compiled knowledge, and how much compiled knowledge raises Text-to-SQL accuracy on BIRD. Every raw output published.
Two measurements, each with every command and raw output published. The first: how much context an AI agent saves by asking EKOS instead of reading the source, including the case where EKOS loses. The second: how much more often a model writes correct SQL when it sees what EKOS compiled from a database (BIRD Mini-Dev).
The setup
- Repository: plausible/analytics, 2,022 files of Elixir, JavaScript and SQL, unmodified.
- Questions: two real ones. "What columns does the
imported_browserstable have?" is a single-object lookup. "What tables exist in the Postgres schema?" is an enumeration. - Raw source, at three tiers. Best case: the agent already knows the exact file and line. Realistic: it greps the whole repository with context, as coding agents do, which gives 32 matching files. Naive: it reads the right file whole.
- EKOS, counted including the "where is it?" step: an
ekos_searchcall plus anekos_statecall, or oneekos_eklquery for the enumeration. - Tokenizer:
tiktokencl100k_baseon both sides. Nocharacters / 4estimates.
Results
| Question | Raw source | Tokens | EKOS | Tokens | Result |
|---|---|---|---|---|---|
imported_browsers columns |
best-case grep (known line) | 122 | search + state | 1,186 | EKOS costs 9.7× more |
imported_browsers columns |
realistic grep (32 files) | 10,357 | search + state | 1,186 | 88.5% fewer |
imported_browsers columns |
naive (whole file) | 3,651 | search + state | 1,186 | 67.5% fewer |
| all Postgres tables | naive (2,738-line schema) | 18,995 | one EKL query | 1,258 | 93.4% fewer |
Cold ingestion: compiling the whole 2,022-file repository took 34 seconds.
What it means
If the agent already knows exactly where the answer is, nothing beats a direct grep, because there is nothing left to discover. That is rarely where an agent starts. In this repository 32 files mention imported_browsers and none of them is named after the schema. For realistic questions the compiled ledger is 67–93% cheaper, and its answer carries path:line evidence the agent can check.
Reproduce it
The full write-up, every raw command, every MCP response and the token-counting script are public: The First Benchmark Number. It needs only the same public repository and pip install tiktoken. Measured 2026-08-20; the dated record is devlog 62.
Text-to-SQL: BIRD Mini-Dev
BIRD is a public Text-to-SQL benchmark: a question in English, a database, and a gold SQL query whose result the answer must match. We ran its Mini-Dev 1024 release (500 questions over 11 SQLite databases, 92% rated challenging) through ekos eval bench. Each database became an EKOS project. The model was given either the raw CREATE TABLE statements or the pack EKOS compiles: tables, keys and join paths from the ledger, plus column profiles and the values a question mentions.
| Hold-out split, 302 questions | Raw DDL | EKOS pack |
|---|---|---|
| Execution accuracy, Claude Haiku 5.5 | 53.3% | 63.9–66.9% |
| Difference (paired, 95% interval) | +10.6 to +13.6 points | |
| Cost per question | $0.0007 | $0.0007–0.0010 |
Same model, same output limit, same questions; the EKOS cell also adds five prompt rules and one result check. Tuning was done on a separate split. The scorer gives the same verdicts as BIRD's official evaluator on 704 recorded answers.
The full report has every question with the SQL it generated and its verdict, the schema text the model saw, tokens and cost ($2.39 for 2,865 calls), memory and duration, and the code and configuration: BIRD Mini-Dev on EKOS. What EKOS receives, the prompt it builds, every query it runs and how the SQL is checked: How EKOS answers a BIRD question. Measured 2026-11-04; RFCs 0240 and 0241, devlog 318.
More measurements
- Business semantics on LedgerSMB (2026-10-05). From PostgreSQL, PL/pgSQL and Perl source, with no LLM, EKOS recovered 47 business concepts and 222 coded values (179 explained), resolving 458 of 649 predicate sites. The exported LinkML schema passes
linkml-lintwith 0 errors. The run is reproducible with one script: demo. - Reference integrity on LedgerSMB (2026-10-30).
ekos check refsreported 4 errors, all real bugs: two missing tables, a misspelled function call and a call to a function that exists only under another name. On iDempiere's code without its database it reported 0 errors. - Answer quality.
ekos eval rungrades whole answers across 101 scenarios. See Performance. - iDempiere questions (2026-10-25). On a 25-question iDempiere dataset, answered by Claude Haiku 5.5, 15 of 25 answers passed on code and docs and 14 of 25 with the live Oracle database added, with no hallucination and every question that has no grounded answer declined. The database added nothing measurable yet; every miss is attributed in RFC 0222.