ramachetan22 commited on
Commit
b9a2979
·
verified ·
1 Parent(s): db69992

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +56 -3
README.md CHANGED
@@ -1,6 +1,56 @@
1
  ---
2
  license: cc-by-sa-3.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  @misc{b-mc2_2023_sql-create-context,
5
  title = {sql-create-context Dataset},
6
  author = {b-mc2},
@@ -8,8 +58,9 @@ license: cc-by-sa-3.0
8
  url = {https://huggingface.co/datasets/b-mc2/sql-create-context},
9
  note = {This dataset was created by modifying data from the following sources: \cite{zhongSeq2SQL2017, yu2018spider}.},
10
  }
11
-
12
-
 
13
  @article{zhongSeq2SQL2017,
14
  author = {Victor Zhong and Caiming Xiong and Richard Socher},
15
  title = {Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning},
@@ -17,10 +68,12 @@ license: cc-by-sa-3.0
17
  volume = {abs/1709.00103},
18
  year = {2017}
19
  }
20
-
 
21
  @article{yu2018spider,
22
  title = {Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task},
23
  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},
24
  journal = {arXiv preprint arXiv:1809.08887},
25
  year = {2018}
26
  }
 
 
1
  ---
2
  license: cc-by-sa-3.0
3
  ---
4
+ # sql-create-context-v2 Dataset
5
+
6
+ ## Overview
7
+
8
+ 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.
9
+
10
+ ### Key Enhancements
11
+
12
+ - **Dataset Format:** Transitioned to JSON Lines (JSONL) format for improved handling of large datasets and streamlined processing of individual records.
13
+ - **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.
14
+
15
+ ## Cleansing and Augmentation
16
+
17
+ Building upon the original dataset's cleansing and augmentation process, this version maintains the use of SQLGlot for parsing and inferring data types while introducing...
18
+
19
+ ## TODO
20
+
21
+ - Convert queries and CREATE TABLE statements into different SQL dialects using SQLGlot.
22
+ - Include references to the dialect in the question for better understanding.
23
+ - Expand informative contexts beyond CREATE TABLE statements.
24
+ - Enhance datatype parsing to address inconsistencies like numeric column names and strings as numbers.
25
+
26
+ ## Sample Entries
27
+
28
+ ```json
29
+ {
30
+ "question": "Please show the themes of competitions with host cities having populations larger than 1000.",
31
+ "context": "CREATE TABLE city (City_ID VARCHAR, Population INTEGER); CREATE TABLE farm_competition (Theme VARCHAR, Host_city_ID VARCHAR)",
32
+ "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"}
33
+ },
34
+ {
35
+ "question": "Please show the different statuses of cities and the average population of cities with each status.",
36
+ "context": "CREATE TABLE city (Status VARCHAR, Population INTEGER)",
37
+ "answer": {"SQL_Query": "SELECT Status, AVG(Population) FROM city GROUP BY Status"}
38
+ }
39
+
40
+ Citing this Work
41
+ If you use the sql-create-context-v2 dataset, please cite the following in addition to the original works:
42
+
43
+ ```
44
+ @misc{sql-create-context-v2_2024,
45
+ title = {sql-create-context-v2 Dataset},
46
+ author = Rama Chetan Atmudi,
47
+ year = {2024},
48
+ url = {https://huggingface.co/datasets/ramachetan22/sql-create-context-v2},
49
+ note = {Enhancements and modifications to the original sql-create-context dataset for improved usability and processing.}
50
+ }
51
+ ```
52
+ Datasets Used to Create This Dataset
53
+ ```
54
  @misc{b-mc2_2023_sql-create-context,
55
  title = {sql-create-context Dataset},
56
  author = {b-mc2},
 
58
  url = {https://huggingface.co/datasets/b-mc2/sql-create-context},
59
  note = {This dataset was created by modifying data from the following sources: \cite{zhongSeq2SQL2017, yu2018spider}.},
60
  }
61
+ ```
62
+ ```
63
+ Datasets used to create this dataset
64
  @article{zhongSeq2SQL2017,
65
  author = {Victor Zhong and Caiming Xiong and Richard Socher},
66
  title = {Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learning},
 
68
  volume = {abs/1709.00103},
69
  year = {2017}
70
  }
71
+ ```
72
+ ```
73
  @article{yu2018spider,
74
  title = {Spider: A large-scale human-labeled dataset for complex and cross-domain semantic parsing and text-to-sql task},
75
  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},
76
  journal = {arXiv preprint arXiv:1809.08887},
77
  year = {2018}
78
  }
79
+ ```