Repository navigation
Measure the agent claim: the evidence does not support the agent-first positioning - #9
Open
christosgkoros wants to merge 1 commit into
Open
christosgkoros wants to merge 1 commit into
christosgkoros wants to merge 1 commit into
Conversation
The repository asserts that a model handed this schema writes better filters than it would against the alternatives, that its failures are loud rather than silent, and that a rejection is enough to repair in one round trip. None of it had been measured; nothing here had ever called a model. experiments/intent-to-filter puts sixty-three natural-language questions to six interfaces and grades by executed row sets. Sixty of the questions reuse the answer key in experiments/filter-to-sql/cases.mjs, hand-derived from SPEC.md months ago for an unrelated purpose, so it cannot have been chosen to flatter the language; three more are written here to tempt the mistakes README catalogues, and are never averaged in with the rest. Every arm is executed by the same compiler, so no arm can win on its own semantics, and every arm has a hand-written gold query per case that gold.test.mjs runs before anything is paid for. Seven predictions and their refutation conditions were committed before the run. On GPT-5.5, over 1,890 calls: a Lucene-style search string documented in six hundred tokens of prose answered 89% correctly, a prose-documented bespoke JSON dialect 86%, and the generated schema 79% at fifteen times the tokens per correct answer. The mechanism the repository argues for is absent — the generated schema had the highest silent-failure rate of the three working arms and a 4% repair yield, and the prose JSON arm scored the worst possible loud:silent ratio while still winning. Four of the seven predictions are refuted, including the headline. Two of the three that held were written against the repository's interest. Three findings needed no run at all. Gemini cannot receive the tool definition: no $ref, and the grammar is recursive so it cannot be flattened. OpenAI accepts it and silently discards $defs, which is 94% of the file, so the schema examples/mcp-server ships bills 704 tokens instead of 14,089 and the grammar never reaches the model. And the generated schema is not the narrowing the README claims: it accepts a lone $unknownAs that the published grammar rejects, which the compiler turns into invalid SQL. That last one is issue #8, left unfixed here on purpose. What survives is the internal argument. Generation is worth 35 points over the bare narrowed grammar, and the closed-domain case fails silently against the published grammar exactly as predicted. It is the comparative claim, and the agent-first framing built on it, that the evidence does not support. Co-Authored-By: Claude <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
experiments/intent-to-filter/puts sixty-three natural-language questions to six search interfaces and grades by executed row sets. Predictions were committed before the run. Four of seven are refuted, including the headline.Closes nothing; raises the question of whether
README.md's lead should stand. Related: #8.Verdict
The agent-first positioning is not supported and should be withdrawn or heavily qualified. The language is fine. The comparative claim made about it is what fails, and it fails precisely where it is loudest.
GPT-5.5 — 63 questions x 6 arms x 5 trials, 1,890 calls, no failures
Why the QL is not the right answer for the agent case, as positioned
1. It loses on the axis it is sold on.
README.md:3calls this "a search interface for agents". Six hundred tokens of prose describing a Lucene-style string answered 89% correctly; fourteen thousand tokens of generated JSON Schema answered 79%. Per correct answer: 1,243 tokens against 19,044. Fifteen times the cost, ten points less accuracy. A bespoke JSON dialect with no schema at all, documented only in prose, also beat it at 86%.2. The mechanism the repository actually argues for is absent.
README.md:210does not claim higher accuracy; it claims that other approaches "fail as an empty result set, which an agent cannot distinguish from 'no such records'" while this one fails loudly and repairs in one round trip. Measured:jql-generatedhad the highest silent-failure rate of the three working arms (9%, against 5% and 7%), and a repair yield of 4%.bespoke-jsonposted the worst possible loud:silent ratio, 0.0, and still won.3. Two of three providers cannot receive it. Gemini's function declarations have no
$ref, and the grammar is recursive so it cannot be flattened; flattened anyway,dependentRequiredandpatternPropertiesare also missing. Groq rejects the flattened schema as too large (413) and fails tool-call validation on the raw one. OpenAI accepts the raw schema and silently discards$defs— 94% of the file — so it bills 704 input tokens instead of 14,089 and the grammar never arrives. It works only if you dereference it yourself first, which the README does not mention andexamples/mcp-serverdoes not do. 1,114 cells were skipped for these reasons.4. The mistakes it prevents are largely mistakes a strong model no longer makes.
$in-as-array-membership, one of the three canonical failures the README is built around, occurred zero times on every arm. On the closed-domain probe the generated schema scored 5/5 — and so did the search string and the prose JSON, because the model normalisedAvailable→availableunprompted. The domain in the schema was doing work the model was going to do anyway. Only$ne-drops-nulls was common, at 5–10% across every arm, and no arm's design reduced it.What survives
The internal argument holds, and by large margins: bare narrowed grammar 44% → shipped raw 66% → generated and flattened 79%. Generation is worth 35 points, so the generator earns its place. The one case where the published grammar fails exactly as predicted — five silent empty result sets on
{"status": "Available"}— is the case generation fixes.Nothing here contradicts the original claim: one grammar across every search endpoint, validated in CI, typed in generated clients. That claim predates the agent framing. The evidence supports going back to it.
Against the predictions
jql-publishedsilent 2–3×jql-generated$nemistake not reduced by the schemafixed-params≥40% unanswerable, most accurateTwo of the three that held were written against the repository's interest. That is why the other four are worth believing.
How it avoids rigging the result
experiments/filter-to-sql/cases.mjs, hand-derived from SPEC.md months ago to measure compiler complexity. It cannot have been chosen to flatter the language. Three authored probes are tagged and never averaged in.gold.test.mjsexecutes all 63 × 6 before anything is paid for. Questions an interface cannot put are counted as its expressivity ceiling and dropped from its denominator, not marked wrong.search-stringis real Lucene/Elasticsearch syntax with a deliberately generous parser.bespoke-jsonis near-isomorphic to the grammar,$unknownAsequivalent included, so its ceiling is empty by design — the variable isolated is schema-versus-prose, not expressivity. Neither is Mongo-shaped, to keep model familiarity out of it.$unknownAs,$some, three-valued logic or nulls.Limits
One model completed. Groq exhausted its rate limit and Gemini its free-tier daily quota, so the cross-provider accuracy comparison the design was built for does not exist — only the deliverability findings, which are complete. Sixty-three questions, one resource, ten records. And the competing arms were written by this experiment: carefully, but not disinterestedly.
Recommended follow-ups, not in this PR
README.md:210's loud-versus-silent argument, which is contradicted as written.COMPARISON.md:107-110a citation or delete it.Verifying this PR
Raw responses are committed as JSONL, so the tables can be rechecked without re-running or spending anything. The experiment is not in CI: it costs money and needs three API keys.
Generated with Claude Code