Datasets:

Modalities:
Text
Formats:
json
ArXiv:
Libraries:
Datasets
pandas
License:
ramachetan22's picture
Update README.md
22b28d3 verified
|
raw
history blame
3.13 kB
metadata
license: cc-by-sa-3.0

sql-create-context-v2 Dataset

Overview

The sql-create-context-v2 dataset enhances the original dataset built from WikiSQL and Spider, focusing on text-to-SQL tasks with a special emphasis on reducing hallucination of column and table names. This version introduces a JSONL format for more efficient data processing and iteration, alongside a structured approach to representing SQL queries in the dataset entries.

Key Enhancements

  • Dataset Format: Transitioned to JSON Lines (JSONL) format for improved handling of large datasets and streamlined processing of individual records.
  • Structured Query Representation: Each SQL query answer is now encapsulated within an object keyed by SQL_Query, facilitating clearer separation between the query text and other metadata.

Sample Entries

{
  "question": "Please show the themes of competitions with host cities having populations larger than 1000.",
  "context": "CREATE TABLE city (City_ID VARCHAR, Population INTEGER); CREATE TABLE farm_competition (Theme VARCHAR, Host_city_ID VARCHAR)",
  "answer": {"SQL_Query": "SELECT T2.Theme FROM city AS T1 JOIN farm_competition AS T2 ON T1.City_ID = T2.Host_city_ID WHERE T1.Population > 1000"}
},
{
  "question": "Please show the different statuses of cities and the average population of cities with each status.",
  "context": "CREATE TABLE city (Status VARCHAR, Population INTEGER)",
  "answer": {"SQL_Query": "SELECT Status, AVG(Population) FROM city GROUP BY Status"}
}

Citing this Work If you use the sql-create-context-v2 dataset, please cite the following in addition to the original works:

@misc{sql-create-context-v2_2024,
  title   = {sql-create-context-v2 Dataset},
  author  = Rama Chetan Atmudi,
  year    = {2024},
  url     = {https://huggingface.co/datasets/ramachetan22/sql-create-context-v2},
  note    = {Enhancements and modifications to the original sql-create-context dataset for improved usability and processing.}
}

Datasets Used to Create This Dataset

@misc{b-mc2_2023_sql-create-context,
  title   = {sql-create-context Dataset},
  author  = {b-mc2}, 
  year    = {2023},
  url     = {https://huggingface.co/datasets/b-mc2/sql-create-context},
  note    = {This dataset was created by modifying data from the following sources: \cite{zhongSeq2SQL2017, yu2018spider}.},
}
Datasets used to create this dataset
@article{zhongSeq2SQL2017,
  author  = {Victor Zhong and Caiming Xiong and Richard Socher},
  title   = {Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning},
  journal = {CoRR},
  volume  = {abs/1709.00103},
  year    = {2017}
}
@article{yu2018spider,
  title   = {Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task},
  author  = {Yu, Tao and Zhang, Rui and Yang, Kai and Yasunaga, Michihiro and Wang, Dongxu and Li, Zifan and Ma, James and Li, Irene and Yao, Qingning and Roman, Shanelle and others},
  journal = {arXiv preprint arXiv:1809.08887},
  year    = {2018}
}