Datasets:
Publish DriftSQL-Recovery v1.0
Browse files- README.md +190 -1
- data/failure_trajectories/train.parquet +3 -0
- data/grpo/train.parquet +3 -0
- data/grpo/tune.parquet +3 -0
- data/hard_replay/train.parquet +3 -0
- data/oracle_next_action/train.parquet +3 -0
- data/oracle_next_action/tune.parquet +3 -0
- data/oracle_trajectories/train.parquet +3 -0
- data/oracle_trajectories/tune.parquet +3 -0
- data/recovery_sft/train.parquet +3 -0
- data/recovery_sft/validation.parquet +3 -0
- data/rollout_index/train.parquet +3 -0
- data/sft_mix/train.parquet +3 -0
- data/sft_mix/validation.parquet +3 -0
- data/tasks/train.parquet +3 -0
- data/tasks/tune.parquet +3 -0
- metadata/release.json +24 -0
README.md
CHANGED
|
@@ -1,3 +1,192 @@
|
|
| 1 |
---
|
| 2 |
-
license:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-sa-4.0
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
task_categories:
|
| 6 |
+
- text-generation
|
| 7 |
+
tags:
|
| 8 |
+
- text-to-sql
|
| 9 |
+
- agents
|
| 10 |
+
- reinforcement-learning
|
| 11 |
+
- tool-use
|
| 12 |
+
- schema-drift
|
| 13 |
+
- sqlite
|
| 14 |
+
- execution-verified
|
| 15 |
+
pretty_name: DriftSQL-Recovery
|
| 16 |
+
size_categories:
|
| 17 |
+
- 10K<n<100K
|
| 18 |
+
configs:
|
| 19 |
+
- config_name: tasks
|
| 20 |
+
data_files:
|
| 21 |
+
- split: train
|
| 22 |
+
path: data/tasks/train.parquet
|
| 23 |
+
- split: tune
|
| 24 |
+
path: data/tasks/tune.parquet
|
| 25 |
+
- config_name: oracle_next_action
|
| 26 |
+
data_files:
|
| 27 |
+
- split: train
|
| 28 |
+
path: data/oracle_next_action/train.parquet
|
| 29 |
+
- split: tune
|
| 30 |
+
path: data/oracle_next_action/tune.parquet
|
| 31 |
+
- config_name: oracle_trajectories
|
| 32 |
+
data_files:
|
| 33 |
+
- split: train
|
| 34 |
+
path: data/oracle_trajectories/train.parquet
|
| 35 |
+
- split: tune
|
| 36 |
+
path: data/oracle_trajectories/tune.parquet
|
| 37 |
+
- config_name: rollout_index
|
| 38 |
+
data_files:
|
| 39 |
+
- split: train
|
| 40 |
+
path: data/rollout_index/train.parquet
|
| 41 |
+
- config_name: failure_trajectories
|
| 42 |
+
data_files:
|
| 43 |
+
- split: train
|
| 44 |
+
path: data/failure_trajectories/train.parquet
|
| 45 |
+
- config_name: recovery_sft
|
| 46 |
+
data_files:
|
| 47 |
+
- split: train
|
| 48 |
+
path: data/recovery_sft/train.parquet
|
| 49 |
+
- split: validation
|
| 50 |
+
path: data/recovery_sft/validation.parquet
|
| 51 |
+
- config_name: hard_replay
|
| 52 |
+
data_files:
|
| 53 |
+
- split: train
|
| 54 |
+
path: data/hard_replay/train.parquet
|
| 55 |
+
- config_name: sft_mix
|
| 56 |
+
data_files:
|
| 57 |
+
- split: train
|
| 58 |
+
path: data/sft_mix/train.parquet
|
| 59 |
+
- split: validation
|
| 60 |
+
path: data/sft_mix/validation.parquet
|
| 61 |
+
- config_name: grpo
|
| 62 |
+
data_files:
|
| 63 |
+
- split: train
|
| 64 |
+
path: data/grpo/train.parquet
|
| 65 |
+
- split: tune
|
| 66 |
+
path: data/grpo/tune.parquet
|
| 67 |
---
|
| 68 |
+
|
| 69 |
+
# DriftSQL-Recovery
|
| 70 |
+
|
| 71 |
+
**DriftSQL-Recovery** is an execution-verified dataset for training and
|
| 72 |
+
evaluating SQL agents under schema, business-knowledge, and interaction drift.
|
| 73 |
+
It contains database-isolated recovery tasks, canonical seven-tool
|
| 74 |
+
trajectories, real on-policy failures, Recovery SFT examples, hard replay, and
|
| 75 |
+
full-episode GRPO records.
|
| 76 |
+
|
| 77 |
+
The accompanying implementation, data factory, sandbox, reward, and evaluation
|
| 78 |
+
code are available in [DriftSQL](https://github.com/lixiao69sysu/DriftSQL).
|
| 79 |
+
|
| 80 |
+
## Release scope
|
| 81 |
+
|
| 82 |
+
| Configuration | Split | Rows | Description |
|
| 83 |
+
|---|---|---:|---|
|
| 84 |
+
| `tasks` | train / tune | 2,400 / 432 | Execution-verified clean and drift-recovery tasks |
|
| 85 |
+
| `oracle_next_action` | train / tune | 24,285 / 2,254 | Seven-tool next-action supervision |
|
| 86 |
+
| `oracle_trajectories` | train / tune | 2,400 / 432 | Canonical execution-verified episodes |
|
| 87 |
+
| `rollout_index` | train | 2,400 | Multi-seed on-policy rollout index and outcomes |
|
| 88 |
+
| `failure_trajectories` | train | 1,066 | Unique full on-policy failure trajectories |
|
| 89 |
+
| `recovery_sft` | train / validation | 1,317 / 397 | State-aware recovery examples around first errors |
|
| 90 |
+
| `hard_replay` | train | 1,600 | Balanced real recovery and canonical replay examples |
|
| 91 |
+
| `sft_mix` | train / validation | 3,314 / 2,254 | Maintained Recovery SFT + Hard Replay mixture |
|
| 92 |
+
| `grpo` | train / tune | 3,200 / 432 | Full-episode VERL/GRPO records |
|
| 93 |
+
|
| 94 |
+
The public tasks span `clean`, `add_column`, `rename_column`, `rename_table`,
|
| 95 |
+
`replace_column`, and `compound` scenarios. Interaction profiles cover
|
| 96 |
+
`direct_clean`, `schema_only`, `knowledge_only`, and `must_ask` behavior.
|
| 97 |
+
|
| 98 |
+
## Deliberately excluded
|
| 99 |
+
|
| 100 |
+
- **Fresh Blind320 is not published.** Its rows and answers remain sealed and
|
| 101 |
+
were not read while preparing this release.
|
| 102 |
+
- **No raw SQLite databases are redistributed.** Database assets must be
|
| 103 |
+
obtained from their upstream sources with the pinned revisions in the
|
| 104 |
+
DriftSQL repository.
|
| 105 |
+
- Checkpoints, local filesystem paths, access tokens, and machine-specific
|
| 106 |
+
runtime artifacts are not included.
|
| 107 |
+
|
| 108 |
+
These exclusions keep the final blind evaluation meaningful and avoid
|
| 109 |
+
duplicating roughly 52 GiB of upstream database assets.
|
| 110 |
+
|
| 111 |
+
## Loading
|
| 112 |
+
|
| 113 |
+
```python
|
| 114 |
+
from datasets import load_dataset
|
| 115 |
+
|
| 116 |
+
tasks = load_dataset("lxSYSU/DriftSQL-Recovery", "tasks")
|
| 117 |
+
failures = load_dataset("lxSYSU/DriftSQL-Recovery", "failure_trajectories")
|
| 118 |
+
sft = load_dataset("lxSYSU/DriftSQL-Recovery", "sft_mix")
|
| 119 |
+
grpo = load_dataset("lxSYSU/DriftSQL-Recovery", "grpo")
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
Paths that pointed to local upstream assets have been normalized to `hf://` or
|
| 123 |
+
`repo://` identifiers. They are provenance references, not bundled database
|
| 124 |
+
files.
|
| 125 |
+
|
| 126 |
+
## Tool protocol
|
| 127 |
+
|
| 128 |
+
The maintained environment exposes a dynamic subset of seven actions:
|
| 129 |
+
|
| 130 |
+
```text
|
| 131 |
+
get_schema_version
|
| 132 |
+
inspect_schema_diff
|
| 133 |
+
get_schema
|
| 134 |
+
ask_user
|
| 135 |
+
get_knowledge_definition
|
| 136 |
+
execute_sql
|
| 137 |
+
submit_solution
|
| 138 |
+
```
|
| 139 |
+
|
| 140 |
+
SQL targets and canonical trajectories were validated by executing original,
|
| 141 |
+
stale, and repaired SQL against isolated SQLite sessions. The runtime enforces
|
| 142 |
+
read-only authorization, timeouts, rollback, result-contract validation, and
|
| 143 |
+
dynamic action masks.
|
| 144 |
+
|
| 145 |
+
## Data construction
|
| 146 |
+
|
| 147 |
+
The task factory derives deterministic schema and interaction changes from
|
| 148 |
+
public BIRD-family and SIX-GYM SQLite assets. Splits are assigned by `db_id`,
|
| 149 |
+
not by random row:
|
| 150 |
+
|
| 151 |
+
- Train: 2,400 tasks over 60 databases;
|
| 152 |
+
- Tune: 432 tasks over 18 disjoint databases;
|
| 153 |
+
- Fresh Blind: 320 tasks over 20 additional databases, withheld from this
|
| 154 |
+
public release.
|
| 155 |
+
|
| 156 |
+
For on-policy collection, 600 difficult Train tasks were sampled with multiple
|
| 157 |
+
seeds, producing 2,400 rollout outcomes and 1,066 unique failures. Failure
|
| 158 |
+
mining emphasizes wrong retrieval after schema diff, successful execution
|
| 159 |
+
without submission, must-ask mistakes, and compound recovery.
|
| 160 |
+
|
| 161 |
+
## Source data and attribution
|
| 162 |
+
|
| 163 |
+
This release derives from the following CC BY-SA 4.0 datasets:
|
| 164 |
+
|
| 165 |
+
- [BIRD23 Train Filtered](https://huggingface.co/datasets/birdsql/bird23-train-filtered)
|
| 166 |
+
- [SIX-GYM-SQLite](https://huggingface.co/datasets/birdsql/six-gym-sqlite)
|
| 167 |
+
- [BIRD-Critic-SQLite](https://huggingface.co/datasets/birdsql/bird-critic-1.0-sqlite)
|
| 168 |
+
- [Mini-Interact](https://huggingface.co/datasets/birdsql/mini-interact)
|
| 169 |
+
|
| 170 |
+
Their licenses and terms remain applicable. DriftSQL adds versioned drift
|
| 171 |
+
generation, verified tool trajectories, on-policy failure annotations,
|
| 172 |
+
training mixtures, and leakage controls. This dataset is therefore released
|
| 173 |
+
under **CC BY-SA 4.0** rather than a software license.
|
| 174 |
+
|
| 175 |
+
## Limitations
|
| 176 |
+
|
| 177 |
+
- The released execution environment targets SQLite.
|
| 178 |
+
- The tasks and tool traces are English; the DriftSQL application provides a
|
| 179 |
+
separate Chinese-to-English input adapter.
|
| 180 |
+
- The 2,400-row rollout index contains metadata for every rollout, while full
|
| 181 |
+
trajectories are published for the 1,066 mined failures.
|
| 182 |
+
- Tune is intended for checkpoint selection and must not be reported as a
|
| 183 |
+
final blind result.
|
| 184 |
+
- SQL execution should always occur in an isolated, read-only sandbox.
|
| 185 |
+
|
| 186 |
+
## Reproducibility
|
| 187 |
+
|
| 188 |
+
Dataset revisions, generation scripts, split policies, and validation gates
|
| 189 |
+
are maintained in the
|
| 190 |
+
[DriftSQL repository](https://github.com/lixiao69sysu/DriftSQL). The release
|
| 191 |
+
metadata records that zero Fresh Blind rows and zero raw SQLite files are
|
| 192 |
+
included.
|
data/failure_trajectories/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9aee8ba22ec5690912537fdc5811059d3f30e724c2809ba559a0aee39365268
|
| 3 |
+
size 484407
|
data/grpo/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:80ba9d4ae08e0e4f7b87d69a94b88a44f90bc09087dae25f4cf94c16dcb89066
|
| 3 |
+
size 2856424
|
data/grpo/tune.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:453dc1fff40df90a986b7967116faa5d5666b78510a8861263dc33afcd5185d2
|
| 3 |
+
size 587397
|
data/hard_replay/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:842b6349b269fecd5b63302f124ee62290bc0d0ed6833e32b7ebc2b1725ce945
|
| 3 |
+
size 465040
|
data/oracle_next_action/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:5322ff2874eb3ab7f92dd5095516ce3195d8d97cbbdf3225a3d4717ea750a446
|
| 3 |
+
size 5433930
|
data/oracle_next_action/tune.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fb40cc5efc5426af086fbb27ad6cdf71a4c7b9d448ed075aee5756de6fe81eb9
|
| 3 |
+
size 174724
|
data/oracle_trajectories/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:98cf1711e9a3d2cc92270041b9f982a2127e2a52807a272fb42a8203ff93a757
|
| 3 |
+
size 692797
|
data/oracle_trajectories/tune.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e2b75d2b96e7eaed4066b8dfe1f497469b00db59968bf395f2855066431b043b
|
| 3 |
+
size 95203
|
data/recovery_sft/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:dc0e251544b7ece0e39a76f7e58b1b1ea8753f60d3d1f3c1c779f2163f2f1c88
|
| 3 |
+
size 220280
|
data/recovery_sft/validation.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8e6af5b1ebfbbf3ca824cd37cdddd5f9267c65afb6b0fda5af2006f6d4347bdd
|
| 3 |
+
size 82851
|
data/rollout_index/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:47c62052885579e4aca0862e33068e01f0646da97ee538c29a9c8fca55904843
|
| 3 |
+
size 268766
|
data/sft_mix/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6f3eaf89ac7b0c704d08052cfd121a4381b8fa6a55d950a245ddaf7458a393b2
|
| 3 |
+
size 916786
|
data/sft_mix/validation.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:b9d1769da3092ed026a0b0d2929f0c52be1bc843e2769a904f3219711624ccaf
|
| 3 |
+
size 175077
|
data/tasks/train.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6def0967df4fc9cc98dcdd1e49de43fccf90d24e6069d1cc6376e6f497dc5a67
|
| 3 |
+
size 491666
|
data/tasks/tune.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:7705b80bf7723e40fcfc72a78545faef07712716ffe5b737d825b02cdd098642
|
| 3 |
+
size 107544
|
metadata/release.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"files": {
|
| 3 |
+
"failure_trajectories/train.parquet": 1066,
|
| 4 |
+
"grpo/train.parquet": 3200,
|
| 5 |
+
"grpo/tune.parquet": 432,
|
| 6 |
+
"hard_replay/train.parquet": 1600,
|
| 7 |
+
"oracle_next_action/train.parquet": 24285,
|
| 8 |
+
"oracle_next_action/tune.parquet": 2254,
|
| 9 |
+
"oracle_trajectories/train.parquet": 2400,
|
| 10 |
+
"oracle_trajectories/tune.parquet": 432,
|
| 11 |
+
"recovery_sft/train.parquet": 1317,
|
| 12 |
+
"recovery_sft/validation.parquet": 397,
|
| 13 |
+
"rollout_index/train.parquet": 2400,
|
| 14 |
+
"sft_mix/train.parquet": 3314,
|
| 15 |
+
"sft_mix/validation.parquet": 2254,
|
| 16 |
+
"tasks/train.parquet": 2400,
|
| 17 |
+
"tasks/tune.parquet": 432
|
| 18 |
+
},
|
| 19 |
+
"fresh_blind_rows_published": 0,
|
| 20 |
+
"license": "CC-BY-SA-4.0",
|
| 21 |
+
"raw_sqlite_files_published": 0,
|
| 22 |
+
"release": "DriftSQL-Recovery-v1.0",
|
| 23 |
+
"source_project": "https://github.com/lixiao69sysu/DriftSQL"
|
| 24 |
+
}
|