Detailed schema descriptions can recover foreign keys—but the benchmark still leaves repeatability unmeasured
SchemaBridge shows that explicit, constraint-aware descriptions sharply improve round-trip reconstruction, while direct schema design from ordinary requirements remains weak.
A new database benchmark exposes a gap that ordinary text-to-SQL scores largely avoid: models may generate a plausible query when the schema is supplied, but they are much less reliable when asked to reconstruct the schema itself from natural-language requirements.
Direct requirements leave relationships behind
SchemaBridge evaluates 902 relational schemata across three collections: 145 enterprise schemata, 518 RSchema examples and 239 SchemaBench projects. It scores tables, attributes, data types plus nullability, primary and unique keys, and foreign keys separately rather than collapsing them into one accuracy number.
On direct Text2Schema generation, no tested model exceeded 0.263 referential-integrity F1 on either requirement-backed collection. Claude Sonnet 4.6 reached 0.263 on SchemaBench, while GPT-5.4-mini reached 0.225 on RSchema. Table recovery was substantially higher: 0.530 for Claude on SchemaBench and 0.602 on RSchema. The result is a practical warning for schema-generation agents: requirements that identify business entities do not necessarily specify exact foreign-key columns, types or nullability.
An explicit description changes the task
The strongest result comes from a controlled round trip. A model first verbalizes an existing schema; a fixed GPT-4o-mini constructor then rebuilds it. When GPT-5.4-mini described SchemaBench schemata under a basic prompt, referential F1 was 0.228. A detailed prompt requiring exhaustive structural information raised it to 0.909. Domain F1 rose from 0.173 to 0.737, and entity-integrity F1 from 0.291 to 0.942.
That improvement is not evidence that free-form requirements suddenly became sufficient. The detailed prompt asks the describer to enumerate the structure already present in DDL. It is better understood as evidence that constraint-aware documentation can preserve a schema across a language interface when the source structure is available.
The benefit also carries a measurable cost. In a 30-schema efficiency subset, GPT-5.4-mini’s detailed SchemaBench round trip used 12,451 tokens and cost $0.0249 per schema, versus 9,496 tokens and $0.0181 under the basic prompt. For Enterprise-145, the corresponding figures were 13,700 tokens and $0.0250, versus 11,231 and $0.0194.
What the benchmark does not establish
SchemaBridge uses strict reference matching, not functional equivalence. It excludes query generation, instance data, normalization, functional dependencies, defaults, CHECK constraints and referential actions. The authors also say they did not estimate run-to-run variability, so small model differences should not be treated as stable rankings.
The useful takeaway is narrower and stronger: if an agent is expected to hand a schema to another agent, “describe this database” is not an adequate contract. The handoff needs explicit tables, columns, types, nullability, keys and foreign-key endpoints—and the receiving system still needs structural validation rather than trust in fluent prose.
sources
comments · 0
- EKOS’s pending BIRD submission pairs a SQLite-tuned run with a separate hidden-test scoreDec 3, 2026
- MotherDuck rolls out DuckDB 2.0 and reports faster cold reads, not faster agent answersDec 3, 2026
- Oracle Select AI can use two definitions of the same metric. Source order won’t break the tieDec 3, 2026