Datasets:
messages listlengths 3 3 |
|---|
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
[
{
"role": "system",
"content": "You are a SQL analyst for a SQLite database.\n\nReturn ONLY valid SQLite SELECT statements. Rules:\n- \"order\" is a RESERVED KEYWORD in SQLite. Always quote it: FROM \"order\"\n- Dates are stored as TEXT. Use strftime() for any date arithmetic or extraction.\n- Use explicit ... |
End of preview. Expand in Data Studio
BIRD SQLite Text-to-SQL SFT Dataset
Supervised fine-tuning data for a SQLite-dialect text-to-SQL specialist model,
built from the BIRD benchmark train split.
Contents
- 7,483 train + 408 val examples spanning 69 distinct database schemas
(movie_platform, chicago_crime, hockey, mondial_geo, works_cycles, and 64
others), split by a stratified per-database 95/5 hold-out (
sft_sqlite_ train.jsonl/sft_sqlite_val.jsonl) with zero exact overlap between them. - Format: JSONL, one Fireworks/OpenAI-compatible chat-completion example per
line:
{"messages": [{"role": "system", ...}, {"role": "user", ...}, {"role": "assistant", ...}]}. - The
systemmessage contains the full schema context (DDL, column documentation, distinct-value grounding for coded columns, date-format samples) for that example's database, plus SQLite dialect rules. - The
usermessage is the natural-language question. BIRD'sevidencefield is appended as aHint:line for ~33% of examples (not ~93% as in raw BIRD) — production inference never sends a hint, so training on it as the default would teach a crutch inference can't provide; stratified per database so no db_id loses all its hint-bearing or all its hint-free coverage. - The
assistantmessage is the gold SQL wrapped as{"sql": "<query>"}for ~96% of examples. The remaining ~4% (295 train / 17 val) are synthetic refusal examples -- requests that ARE database-related but outside a read-only SELECT's scope (insert/update/delete, schema changes, export/ email/admin-access requests, prompt-injection-adjacent asks) -- labeled{"sql": null, "refusal": "<one-sentence reason>"}. Grounded in real table/column names from the same 69 databases, across 6 categories, spread throughout the file (not clustered), so the model learns to decline regardless of which real schema it's looking at.
Changes from the raw BIRD train split (verified, not assumed)
- Dropped 9
SELECT *gold queries (contradicted the system prompt's "return only the exact column(s) asked" rule). - Removed a
ROUND()rounding instruction from the system prompt that 99.8% of gold SQL didn't follow (checked whether it correlated with aggregating a REAL vs. INTEGER column as a principled exception — it didn't). - Capped the largest database (
works_cycles, originally 474 of 9,428 examples on its own, and also the single largest schema by token count) to 150 via seeded random sampling, not positional truncation. - Output is shuffled (fixed seed), not grouped by database as in a naive per-db write loop.
- Added 312 synthetic refusal examples (see above) -- BIRD's
trainsplit only contains valid, answerable SELECT questions, so this behavior had to be added, not mined.
This mirrors, field-for-field, the production prompt contract of the text-to-SQL agent this dataset was built alongside — see the source repo for the agent implementation this data is meant to fine-tune.
Source & License
Derived from the BIRD benchmark's train split (train.json,
train_tables.json, per-database .sqlite files and database_description/
CSVs). BIRD is released under
CC BY-SA 4.0; this
derivative dataset is released under the same license per its ShareAlike
terms.
@inproceedings{li2023can,
title={Can {LLM} Already Serve as a Database Interface? A {BI}g Bench for Large-Scale Database Grounded Text-to-{SQL}s},
author={Li, Jinyang and Hui, Binyuan and Qu, Ge and others},
booktitle={NeurIPS},
year={2023}
}
Notes
- All 7,891 lines (train + val) validated as parseable JSON with the correct
system/user/assistant role order and an assistant field that itself parses
as either
{"sql": "<query>"}or{"sql": null, "refusal": "<reason>"}. - The large majority of tokens in this dataset are schema-grounding text (69 unique schema blocks repeated across their respective examples), not question/SQL content — worth knowing before estimating fine-tuning token costs.
- Downloads last month
- 85