synthetic_text_to_sql
Synthetic dataset containing more than 100,000 examples of text to SQL conversion, automatically generated with Gretel Navigator.
105,851 samples in JSON, including prompt, SQL context, SQL query, explanation, tags, and metadata
Apache 2.0
Description
synthetic_text_to_sql is a massive data set designed to train models to transform a natural language statement into an SQL query. Automatically generated by the Gretel Navigator tool, it contains over 100,000 examples covering 100 domains (finance, health, education, energy, etc.), with various levels of SQL complexity (joins, aggregations, windows, etc.), with various levels of SQL complexity (joins, aggregations, windows, etc.), with various levels of SQL complexity (joins, aggregations, windows, etc.).
What is this dataset for?
- Train LLM models to write SQL queries based on a natural language question
- Enhance SQL agents in internal AI assistants
- Perform fine-tuning of specialized data analytics models
Can it be enriched or improved?
Yes. The dataset can be completed by queries on bases specific to your business, or annotated with other types of metadata (for example: expected performance, latency, security risks). It is also possible to create new scenarios using generation tools such as those offered by Gretel.
🔎 In summary
🔍 Recommended for
- Data scientists
- Backend Developers
- BI teams
- Prompt Tuning Engineers
🛠️ Compatible tools
- GPT
- Claude
- LLama
- SQLGlot
- SqlValidator
📈 Tip
The dataset was compared to Spider and obtained better scores in SQL standard and readability
Frequently Asked Questions
Does this dataset work with custom SQL databases?
Yes, each example contains a clear SQL context (tables, fields), which makes it easy to simulate custom databases.
Can it be used to train an AI agent capable of answering business questions?
Absolutely, it is even one of the key use cases of this corpus. It is used to transform business queries into SQL directly.
Is there a risk of errors or invalidity in requests?
Very weak: each query was validated with two SQL parsers (sqlglot and sqlvalidator), ensuring syntactic and semantic compliance.




