Team Ai
Datasetpublic

MertML/refined-sql-create-context

Overview refined-sql-create-context is a high-quality dataset for training and evaluating Text-to-SQL models. It builds upon the sql-create-context dataset by ensuring that all SQL queries are executable in a MySQL database, resolving schema inconsistencies, and refining query validity. The dataset consists of natural language questions, their corresponding table schemas, and SQL queries that generate results from the given schema context with 11,632 examples.… See the full description on the dataset page: https://huggingface.co/datasets/MertML/refined-sql-create-context.

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes14downloads
README.md33 linesDownload Raw Back to root
1# Overview2 3**refined-sql-create-context** is a high-quality dataset for training and evaluating Text-to-SQL models. It builds upon the [**sql-create-context**](https://huggingface.co/datasets/b-mc2/sql-create-context) dataset by ensuring that all SQL queries are executable in a MySQL database, resolving schema inconsistencies, and refining query validity. The dataset consists of natural language questions, their corresponding table schemas, and SQL queries that generate results from the given schema context with 11,632 examples.4 5## Supported Tasks and Use Cases6This dataset is designed for the **Text-to-SQL** task, enabling models to generate SQL queries from natural language inputs while ensuring that queries are executable and adhere to correct syntax. It is useful for:7- **Fine-tuning large language models (LLMs)** for SQL query generation8- **Benchmarking Text-to-SQL performance** on a high-quality dataset9- **Evaluating SQL query correctness and execution feasibility**10 11## Dataset Structure12Each sample in the dataset consists of:13- `question`: A natural language query14- `context`: Table schemas in SQL (`CREATE TABLE` statements)15- `answer`: The corresponding SQL query16 17### Example18```json19{20    "question": "Please show the themes of competitions with host cities having populations larger than 1000.",21    "context": "CREATE TABLE city (City_ID VARCHAR, Population INTEGER); CREATE TABLE farm_competition (Theme VARCHAR, Host_city_ID VARCHAR);",22    "answer": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000"23}24```25 26Citing this work27```python28@article{your_citation,29  title={refined-sql-create-context Dataset},30  author={MertML},31  year={2025},32}33```