# synthetic_text_to_sql

- **ID:** 159
- **Kind:** dataset
- **URL:** https://huggingface.co/datasets/gretelai/synthetic_text_to_sql
- **Authors:** gretelai
- **Venue:** gretelai
- **Published:** 2024
- **Source:** huggingface
- **Language:** en
- **Access:** free
- **License:** apache-2.0
- **License family:** Permissive (auto-classified)
- **Tags:** hf-dataset-qa, qa---tabular, language-modeling
- **Topics:** QA, QA / Tabular, Language Modeling, Code
- **Added:** 2026-07-17
- **Verified:** 2026-07-17
- **Research status:** done
- **Page:** https://papers.projxon.ai/entries/159

## Summary

designed and generated using [Gretel Navigator](https://gretel.ai/gretel-navigator), and released under Apache 2.0.

## Attributes

- **Purpose:** QA, QA / Tabular, Language Modeling
- **Scale:** 100K<n<1M
- **Used for:** arXiv: 2306.05685
- **Time period:** created 2024-03-21; updated 2025-12-16
- **Author type:** mixed

## From the source (fetched 2026-10-03)

- **Repository:** gretelai/synthetic_text_to_sql (Hugging Face)
- **Created:** Mar 21, 2024 (Hugging Face)
- **Last updated:** Dec 16, 2025 (Hugging Face)
- **Downloads (last month):** 2,927 (Hugging Face)
- **Likes:** 703 (Hugging Face)
- **Size:** 100K to 1M rows (Hugging Face)
- **Modalities:** text (Hugging Face)
- **Tasks:** question-answering, table-question-answering, text-generation (Hugging Face)
- **Formats:** parquet (Hugging Face)

## Dataset profile

- **Scale:** Card: 105,851 records (100,000 train / 5,851 test); ~23M total tokens including ~12M SQL tokens; 100 distinct domains. Hub viewer matches 100.0K train + 5.9K test. Two snappy parquet files: train 32.4 MB + test 1.9 MB (~34.3 MB download). size_categories 100K<n<1M. 11 columns. Hub 96.7K downloads / 688 likes at check.
- **Format:** parquet (synthetic_text_to_sql_train.snappy.parquet / _test). Columns: id, domain, domain_description, sql_complexity, sql_complexity_description, sql_task_type, sql_task_type_description, sql_prompt, sql_context, sql, sql_explanation.
- **Type:** Synthetic text-to-SQL instruction corpus / code SFT
- **License:** Apache-2.0 (card).
- **Cost:** Free
- **Languages:** English 100% (card language:en) plus SQL. No LID table. Preview prompts/explanations in English; sql_context is SQL DDL/DML.
- **Modality:** Text-only (English NL + SQL).
- **Domain:** text-to-SQL; synthetic code; 100 industry verticals; analytics/reporting, DDL, retrieval, DML
- **Time period:** Fully synthetic (Gretel Navigator). Card/blog April 2024 release. HF createdAt 2024-03-21; lastModified 2025-12-16 (card/files refresh; not a live crawl). arXiv tag 2306.05685 is the LLM-as-a-judge method paper, not a dataset paper.
- **Purpose:** Train and eval models that map English prompts plus CREATE/INSERT context to SQL, with complexity tags and natural-language explanations
- **Used for:** Public SQL SFT/eval (card: largest synthetic text-to-SQL at April 2024 release). Hub 96.7K downloads / 688 likes at check. Discord posted the HF URL.
- **Authors:** Gretel (Meyer, Emadi, Nathawani, Ramaswamy, Boyd, Van Segbroeck, Grossman, Mlocek, Newberry). All rows generated by Gretel Navigator; no human SQL authors. LLM-as-a-judge quality scores used GPT-4 on a 1,000-row sample vs b-mc2/sql-create-context.
- **Bias:** Synthetic schemas/prompts, not production warehouses. Card: 100 verticals (preview includes forestry, defense, public health). Complexity types include aggregation, single/multiple joins, subqueries, window functions, set operations — exact percents are figures on the card, not a table (Unknown). English-only NL. Tiny synthetic INSERT contexts, not multi-GB databases.
- **Text quality:** Card: sqlglot + sqlvalidator parsability/validity checks on sql_context and sql. GPT-4 judge vs b-mc2/sql-create-context on 1k samples: +54.6% SQL-standards compliance, +34.5% SQL correctness, +8.5% instruction adherence (authors' numbers; not independently re-run). Preview SQL is short textbook-style.
- **Sample size:** 100,000 train / 5,851 test. No extra configs. Complexity and task-type tags are columns, not splits. Domain count 100; per-domain counts Unknown (card figure only).
- **Long context:** No (short CREATE/INSERT context plus one query; not long documents).
- **Intermediate steps:** Yes (Gretel Navigator synthesis; sqlglot/sqlvalidator parse checks; GPT-4 LLM-as-a-judge sample). Rubric on the repo: llm_as_a_judge_rubric.txt.
- **Idea quality:** High
- **Novelty:** Medium (large public synthetic SQL dump with tagged complexity; Spider/sql-create-context already existed)
- **Text conversion:** Ready parquet; load_dataset('gretelai/synthetic_text_to_sql'). ~34.3 MB download.
- **Collection method:** Download
- **Static:** Unknown (HF lastModified 2025-12-16; synthetic one-shot dump, not a live generator).
- **Processed:** Unknown

## Links

- Dataset: https://huggingface.co/datasets/gretelai/synthetic_text_to_sql
- Related: https://huggingface.co/datasets/gretelai/synthetic_text_to_sql
- Related: https://gretel.ai/blog/synthetic-text-to-sql-dataset
- Related: https://arxiv.org/abs/2306.05685

## Research notes

- downloads=2895; likes=678
- Discord posted this HF pointer (message 1439777981479518318). gated=false; public; CuratorBote listed both parquet files. Citation on the card is software gretel-synthetic-text-to-sql-2024; Hub arXiv 2306.05685 is Zheng et al. LLM-as-a-judge, not this corpus. Distinct from already-cataloged OpenCoder FineWeb Code Corpus / CommitPackFT / rStar-Coder. Not in papers_local.csv.

## Similar entries

- [Jupyter Agent Dataset](https://papers.projxon.ai/entries/72) (dataset, #72)
- [gemini-3.1-pro-hard-high-reasoning](https://papers.projxon.ai/entries/242) (dataset, #242)
- [gemini-3-pro-10000x-hard-high-reasoning](https://papers.projxon.ai/entries/235) (dataset, #235)
- [Gpt-5.4-Xhigh-Reasoning-2750x](https://papers.projxon.ai/entries/303) (dataset, #303)
- [Open Reasoner Zero Dataset](https://papers.projxon.ai/entries/77) (dataset, #77)
- [MathNet v0 — Olympiad Math Reasoning & Retrieval](https://papers.projxon.ai/entries/346) (dataset, #346)
