Datasets:

Modalities:
Text
Formats:
parquet
ArXiv:
Libraries:
Datasets
pandas
License:
Saibo-creator commited on
Commit
7f2f107
Β·
verified Β·
1 Parent(s): 02800cf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +47 -110
README.md CHANGED
@@ -61,129 +61,66 @@ configs:
61
  path: data/JsonSchemaStore-*
62
  - split: Glaiveai2K
63
  path: data/Glaiveai2K-*
 
64
  ---
65
 
66
- # JSON Schema Witness Generation Dataset
67
 
68
- ## Overview
69
 
70
- This dataset is a collection of JSON schema witnesses generated from various sources, aimed at facilitating the study and evaluation of JSON schema transformations, validations, and other related operations. The dataset consists of several subsets, each derived from a different domain or source, and is structured to allow for comprehensive testing and benchmarking of tools and algorithms dealing with JSON schemas.
71
 
72
- ## Dataset Structure
 
 
 
73
 
74
- The dataset is organized into the following subsets:
 
 
 
 
 
 
 
 
 
 
 
 
 
75
 
76
- ### 1. Washington Post (wp)
77
- - **Samples**: 125
78
- - **Description**: This subset contains JSON schema witnesses from the Washington Post dataset. The schemas have been processed and formatted for easy integration and analysis.
79
- - **Original Directory**: [Washington Post](https://github.com/sdbs-uni-p/JSONSchemaWitnessGeneration/tree/main/artifacts/JSONAlgebra/JsonSchema_To_Algebra/expDataset/wp)
80
 
81
- ### 2. Snowplow (dg)
82
- - **Samples**: 420
83
- - **Description**: The Snowplow subset includes 420 JSON schema witnesses, each representing a structured data format used within the Snowplow event data pipeline.
84
- - **Original Directory**: [Snowplow](https://github.com/sdbs-uni-p/JSONSchemaWitnessGeneration/tree/main/artifacts/JSONAlgebra/JsonSchema_To_Algebra/expDataset/snowplow/dg)
85
 
86
- ### 3. Kubernetes (sat)
87
- - **Samples**: 1087
88
- - **Description**: This subset contains JSON schema witnesses from the Kubernetes ecosystem. It is particularly useful for analyzing configuration and deployment schemas.
89
- - **Original Directory**: [Kubernetes](https://github.com/sdbs-uni-p/JSONSchemaWitnessGeneration/tree/main/artifacts/JSONAlgebra/JsonSchema_To_Algebra/expDataset/kubernetes/sat)
90
 
91
- ### 4. Github (sat)
92
- - **Samples**: 6335
93
- - **Description**: The largest subset in the dataset, containing 6335 samples from GitHub repositories. These schemas are ideal for studying open-source project configurations and automation.
94
- - **Original Directory**: [Github](https://github.com/sdbs-uni-p/JSONSchemaWitnessGeneration/tree/main/artifacts/JSONAlgebra/JsonSchema_To_Algebra/expDataset/github/sat)
95
 
96
- ### 5. Handwritten (sat)
97
- - **Samples**: 197
98
- - **Description**: The Handwritten subset consists of 197 manually crafted JSON schema witnesses, designed to test edge cases and complex schema configurations.
99
- - **Original Directory**: [Handwritten](https://github.com/sdbs-uni-p/JSONSchemaWitnessGeneration/tree/main/artifacts/JSONAlgebra/JsonSchema_To_Algebra/expDataset/handwritten/sat)
100
 
101
- ### 6. Synthesized (sat)
102
- - **Samples**: 450
103
- - **Description**: This subset is synthesized from various sources to cover a broad range of JSON schema use cases, particularly focusing on containment and validation.
104
- - **Original Directory**: [Synthesized](https://github.com/sdbs-uni-p/JSONSchemaWitnessGeneration/tree/main/artifacts/JSONAlgebra/JsonSchema_To_Algebra/expDataset/containment/sat)
105
 
106
- ### 7. Github Trivial
107
- - **Samples**: 570
108
- - **Description**: Contains GitHub JSON schemas categorized as "trivial" with sizes less than 10. This split is designed to handle extremely simple and minimal schemas.
 
 
 
 
 
 
 
 
 
 
109
 
110
- ### 8. Github Easy
111
- - **Samples**: 2035
112
- - **Description**: Contains GitHub JSON schemas categorized as "easy," with sizes between 10 and 30. These schemas offer moderate complexity and are useful for testing general tools.
113
-
114
- ### 9. Github Medium
115
- - **Samples**: 2121
116
- - **Description**: Contains GitHub JSON schemas categorized as "medium," with sizes between 30 and 100. These schemas reflect intermediate complexity.
117
-
118
- ### 10. Github Hard
119
- - **Samples**: 1405
120
- - **Description**: Contains GitHub JSON schemas categorized as "hard," with sizes between 100 and 500. These are complex schemas that are challenging to process and validate.
121
-
122
- ### 11. Github Ultra
123
- - **Samples**: 204
124
- - **Description**: Contains GitHub JSON schemas categorized as "ultra," with sizes greater than 500. These schemas represent the most complex and large-scale structures, ideal for stress testing tools.
125
-
126
- ### 12. JSON Schema Store (JsonSchemaStore)
127
- - **Samples**: 650
128
- - **Description**: This new subset includes 650 JSON schemas derived from the JSON Schema Store, comprising both training and validation data. The schemas cover a wide range of use cases and domains, making them a valuable addition to the dataset for evaluating JSON schema-related tasks such as validation, transformation, and optimization.
129
- - **Original Source**: [dataunitylab/json-schema-store](https://huggingface.co/datasets/dataunitylab/json-schema-store)
130
-
131
-
132
- ## Dataset Validation and Filtering
133
-
134
- To ensure the quality and validity of the JSON schemas in each split, a filtering process was applied to remove invalid schemas. The following statistics summarize the filtering results for each subset:
135
-
136
- - **Washington Post**:
137
- - Dropped: 0/125 invalid schemas
138
- - Kept: 125/125 valid schemas
139
-
140
- - **Snowplow**:
141
- - Dropped: 6/420 invalid schemas
142
- - Kept: 414/420 valid schemas
143
-
144
- - **Kubernetes**:
145
- - Dropped: 0/1087 invalid schemas
146
- - Kept: 1087/1087 valid schemas
147
-
148
- - **Github**:
149
- - Dropped: 380/6335 invalid schemas
150
- - Kept: 5955/6335 valid schemas
151
-
152
- - **Handwritten**:
153
- - Dropped: 50/197 invalid schemas
154
- - Kept: 147/197 valid schemas
155
-
156
- - **Synthesized**:
157
- - Dropped: 35/450 invalid schemas
158
- - Kept: 415/450 valid schemas
159
-
160
- - **Github Trivial**:
161
- - Dropped: 37/570 invalid schemas
162
- - Kept: 533/570 valid schemas
163
-
164
- - **Github Easy**:
165
- - Dropped: 59/2035 invalid schemas
166
- - Kept: 1976/2035 valid schemas
167
-
168
- - **Github Medium**:
169
- - Dropped: 112/2121 invalid schemas
170
- - Kept: 2009/2121 valid schemas
171
-
172
- - **Github Hard**:
173
- - Dropped: 139/1405 invalid schemas
174
- - Kept: 1266/1405 valid schemas
175
-
176
- - **Github Ultra**:
177
- - Dropped: 33/204 invalid schemas
178
- - Kept: 171/204 valid schemas
179
-
180
- - **JSON Schema Store (JsonSchemaStore)**:
181
- - Dropped: 59/650 invalid schemas
182
- - Kept: 591/650 valid schemas
183
-
184
- ## Citation
185
-
186
- The datasets listed above are featured in the paper "Witness Generation for JSON Schema." We extend our gratitude to the authors for their valuable contributions. For more detailed information about the datasets and the methods used, please refer to the paper: [Witness Generation for JSON Schema](https://arxiv.org/abs/2202.12849).
187
 
188
  ## License
189
 
@@ -191,4 +128,4 @@ This dataset is provided under the [MIT License](https://opensource.org/licenses
191
 
192
  ## Acknowledgements
193
 
194
- We would like to thank the contributors and maintainers of the JSON schema projects and the open-source community for their invaluable work and support.
 
61
  path: data/JsonSchemaStore-*
62
  - split: Glaiveai2K
63
  path: data/Glaiveai2K-*
64
+ pretty_name: J
65
  ---
66
 
67
+ # JSONSchemaBench
68
 
69
+ [![Paper](https://img.shields.io/badge/Paper-arXiv-blue)](https://arxiv.org/abs/2501.10868)
70
 
71
+ JSONSchemaBench is a benchmark of **real-world JSON schemas** designed to evaluate **structured output generation** for Large Language Models (LLMs). It contains approximately **10,000 JSON schemas**, capturing diverse constraints and complexities.
72
 
73
+ ## πŸ“Œ Dataset Overview
74
+ - **Purpose:** Evaluate the **efficiency** and **coverage** of structured output generation.
75
+ - **Sources:** GitHub, Kubernetes, API specifications, curated collections.
76
+ - **Schemas:** Categorized based on complexity and domain.
77
 
78
+ ### πŸ“Š Dataset Breakdown
79
+ | Dataset | Category | Count |
80
+ | --------------- | ------------------- | ----- |
81
+ | GlaiveAI-2K | Function Call | 1707 |
82
+ | Github-Trivial | Misc | 444 |
83
+ | Github-Easy | Misc | 1943 |
84
+ | Snowplow | Operational API | 403 |
85
+ | Github-Medium | Misc | 1976 |
86
+ | Kubernetes | Kubernetes API | 1064 |
87
+ | Washington Post | Resource Access API | 125 |
88
+ | Github-Hard | Misc | 1240 |
89
+ | JSONSchemaStore | Misc | 492 |
90
+ | Github-Ultra | Misc | 164 |
91
+ | **Total** | | 9558 |
92
 
93
+ ## πŸ“₯ Loading the Dataset
 
 
 
94
 
95
+ ```python
96
+ from datasets import load_dataset
 
 
97
 
98
+ dataset = load_dataset("epfl-dlab/JSONSchemaBench")
99
+ print(dataset)
100
+ ```
 
101
 
102
+ ## πŸ” Data Structure
103
+ Each dataset split contains:
104
+ - `"json_schema"`: The schema definition.
105
+ - `"unique_id"`: A unique identifier for the schema.
106
 
 
 
 
 
107
 
108
+ πŸš€ **For more details, check out the [paper](https://arxiv.org/abs/2501.10868).**
 
 
 
109
 
110
+ ## πŸ“š Citation
111
+ If you use this dataset, please cite:
112
+ ```bibtex
113
+ @misc{geng2025jsonschemabench,
114
+ title={Generating Structured Outputs from Language Models: Benchmark and Studies},
115
+ author={Saibo Geng et al.},
116
+ year={2025},
117
+ eprint={2501.10868},
118
+ archivePrefix={arXiv},
119
+ primaryClass={cs.CL},
120
+ url={https://arxiv.org/abs/2501.10868}
121
+ }
122
+ ```
123
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
125
  ## License
126
 
 
128
 
129
  ## Acknowledgements
130
 
131
+ We would like to thank the contributors and maintainers of the JSON schema projects and the open-source community for their invaluable work and support.