| --- |
| license: cc-by-4.0 |
| task_categories: |
| - text2text-generation |
| tags: |
| - text-to-sql |
| - reinforcement-learning |
| - database |
| --- |
| |
| # CoRE-DB SQL-R1 |
|
|
| A compact, gold-refined, counterexample-enriched reward database for reinforcement-learning |
| text-to-SQL training. It is built from SQL-R1's own SynSQL-complex-5K training corpus, over the |
| benchmark's own gold queries only — no model-written query is an input to construction. The |
| database is meant to sit under an execution-based RL reward: SQL is judged by running it, and |
| this release is the tree that reward runs against. |
|
|
| **Access is gated with manual approval.** Request access on the repo page; approvals are granted |
| by the repo owner. |
|
|
| ## What is in the tree |
|
|
| The build follows three steps, run only from the gold SQL: |
|
|
| 1. **Compact and populate.** A fresh copy of the read-only control (SQL-R1's own SynSQL |
| databases) populated, database by database, until every gold of all 5,000 corpus rows returns |
| rows under both gold forms it is evaluated in. |
| 2. **Random instances per database**, drawn once and shared by that database's golds — schema-valid, |
| FK-closed, multi-row, with NULLs, duplicates, groups, ties, and boundaries around the gold's own |
| literals. |
| 3. **The gold and its neighbours** (single-edit query mutations) executed on those instances; where |
| a neighbour ties the gold on the compact tree but a random instance separates them, the rows that |
| carry the difference are taken from that instance, minimized, closed over their own foreign keys, |
| and planted back into the compact tree, parents first, with a re-check after every database. |
|
|
| No gold SQL was ever modified in this build (step 2 — gold hardening — was not applied to this |
| arm, by decision). The held-out policy decodes used to measure catch elsewhere are never an input |
| to construction. |
|
|
| ## Identity |
|
|
| | | | |
| |---|---| |
| | content fingerprint | `b22549ce81c383b3c1531f2254ea3159` | |
| | archive | `release_b22549ce.tar.zst` | |
| | archive sha256 | `0f3d4b848c03dfc1acbe9d69db2497a3d4299177a6c0fa26fb2bf27285ff4ae6` | |
| | databases | 4,064 | |
| | total tree size | 221,417,472 bytes (221.42 MB) | |
| | rows (compact tree) | 88,740 | |
|
|
| ## Key statistics (from the freeze bundle) |
|
|
| **Corpus.** 5,000 gold queries (4,000 train / 1,000 test split of the vendored SynSQL-complex-5K), |
| over 4,064 databases. |
|
|
| **Step 1 — constructive population.** |
|
|
| | | | |
| |---:|---:| |
| | golds total | 5,000 | |
| | golds non-empty | 4,998 | |
| | golds empty | 2 (proved unanswerable on any faithful instance — kept in the corpus, never subsampled) | |
| | golds unexecutable | 0 | |
| | rows before | 75,913 | |
| | rows after | 88,740 | |
| | rows added | 12,827 | |
| | databases malformed / FK-orphans-increased / new declared violations | 0 / 0 / 0 | |
|
|
| **Step 3 — separation and planting.** |
|
|
| | | | |
| |---:|---:| |
| | databases swept | 3,065 / 4,063 (75.4%) | |
| | variants tied on the compact database | 19,333 | |
| | variants separated by some random instance | 8,352 (43.2%) | |
| | variants no instance told apart | 10,981 (56.8%) | |
| | pairs planted (transplanted) | 322 | |
| | rows the tree gained over step 1 | +12,827 | |
|
|
| A database the sweep never reached is unresolved, not refused: its golds are still populated by |
| step 1 and still gated; what it lacks is step-3 enrichment. |
|
|
| **Gate, over all 5,000 golds, in both gold forms (published and the reward's executed read |
| path):** 4,998 / 5,000 non-empty, 0 malformed databases, 0 FK-orphan increases, 0 new declared |
| violations. GATE CLEAN. |
|
|
| The control (SQL-R1's own SynSQL databases, unmodified, used by the matched-pair comparison) has |
| content fingerprint `a8482f003ec7fdd5ebbfbd2842231f0a`, 4,064 databases, 221,409,280 bytes. |
|
|
| ## Restore and verify |
|
|
| ```bash |
| # 1. verify the archive against the sha256 recorded above |
| sha256sum -c <(echo "0f3d4b848c03dfc1acbe9d69db2497a3d4299177a6c0fa26fb2bf27285ff4ae6 release_b22549ce.tar.zst") |
| |
| # 2. restore |
| zstd -d release_b22549ce.tar.zst -c | tar -x -C <dest> |
| |
| # 3. recompute the content fingerprint (script vendored in the source repo at |
| # campaigns/chained_05b_tkde/mining_v2/v7/coredb/fingerprint.py) |
| python3 fingerprint.py --bird_root <dest>/tree --spider_root <dest>/empty_dir --label coredb_sqlr1 |
| # expect: content_fingerprint == b22549ce81c383b3c1531f2254ea3159, n_databases == 4064 |
| ``` |
|
|
| Note: the tree mounts under the `bird_root` argument only — this dataset routes through the |
| same bird|spider|spider2 mount scheme as the other CoRE-DB release, and SynSQL is labeled `bird` |
| as a routing label only (it does not affect content). |
|
|
| ## Files in this repo |
|
|
| - `release_b22549ce.tar.zst` — the frozen tree archive (4,064 SQLite databases) plus the step-2 |
| gold-format parquet. |
| - `FREEZE_BUNDLE.md` — the full freeze record with every measured number and how it was produced. |
| - `RELEASE_SQLR1.json` — the machine-readable release record. |
|
|