ask-the-database / README.md
chrisjcc's picture
Upload README.md with huggingface_hub
5dec14d verified
|
Raw History Blame Contribute Delete
3.53 kB
---
dataset_info:
- config_name: spider
features:
- name: db_id
dtype: string
- name: question
dtype: string
- name: query
dtype: string
- name: query_toks
list: string
splits:
- name: train
num_examples: 7000
- name: validation
num_examples: 1034
- config_name: reviewed_trajectories
features:
- name: db_id
dtype: string
- name: question
dtype: string
- name: gold_sql
dtype: string
- name: trajectory
list:
struct:
- name: step
dtype: int32
- name: thought
dtype: string
- name: tool
dtype: string
- name: argument
dtype: string
- name: observation
dtype: string
- name: final_sql
dtype: string
- name: test_suite_passed
dtype: bool
splits:
- name: train
num_examples: 500
- config_name: filtered_rollouts
features:
- name: db_id
dtype: string
- name: question
dtype: string
- name: rollout_sql
dtype: string
- name: execution_accuracy
dtype: float32
splits:
- name: train
num_examples: 1200
configs:
- config_name: spider
data_files:
- split: train
path: spider/train-*
- split: validation
path: spider/validation-*
- config_name: reviewed_trajectories
data_files:
- split: train
path: reviewed_trajectories/train-*
- config_name: filtered_rollouts
data_files:
- split: train
path: filtered_rollouts/train-*
---
# AskTheDatabase Trajectories & Evaluation Benchmark 🗄️
> Procedural interactive exploration trajectories and relational benchmark datasets for natural language to SQL translation.
This dataset repository powers the training and empirical evaluation of **AskTheDatabase**, enabling models to move beyond brittle single-turn SQL generation toward verifiable, multi-turn schema exploration.
---
## Configurations & Subsets
### 1. `reviewed_trajectories` (Harness-Zero Distillation)
High-quality multi-turn trajectories curated and verified by K_SQL procedural rules:
- **Tools executed**: `inspect_schema`, `sample_data`, `execute_sql`.
- **Target**: Teaches models to actively inspect table schemas and categorical distinct values before committing to final queries, eliminating schema hallucinations.
```python
from datasets import load_dataset
dataset = load_dataset("chrisjcc/ask-the-database", "reviewed_trajectories")
print(dataset["train"][0]["trajectory"])
```
### 2. `filtered_rollouts` (Condition 3 RLVR Warmup)
Rollout trajectories generated by student models and filtered strictly by execution accuracy and test suite rewards.
```python
dataset = load_dataset("chrisjcc/ask-the-database", "filtered_rollouts")
```
### 3. `spider` (Normalized Relational Benchmark)
Normalized Spider text-to-SQL benchmark train (7,000 samples) and dev (1,034 samples) splits with aligned SQLite database schemas.
```python
dataset = load_dataset("chrisjcc/ask-the-database", "spider")
```
---
## Schema & Features
- `db_id` *(string)*: Unique identifier of the target SQLite database.
- `question` *(string)*: User natural language inquiry.
- `gold_sql` *(string)*: Ground-truth reference SQL query.
- `trajectory` *(list of structs)*: Step-by-step interactive actions, thoughts, and environment observations.
- `test_suite_passed` *(bool)*: Whether the final SQL passes the dual-fixture mutation test suite.
---
## Licensing & Attribution
- Spider benchmark: [Yale LILY Lab](https://yale-lily.github.io/spider) (CC BY-SA 4.0).
- Curated trajectories & fixtures: Apache 2.0.