thepian milistu commited on
Commit
1512835
·
0 Parent(s):

Duplicate from milistu/amazon-esci-data

Browse files

Co-authored-by: Milutin Studen <milistu@users.noreply.huggingface.co>

.gitattributes ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.lz4 filter=lfs diff=lfs merge=lfs -text
12
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
13
+ *.model filter=lfs diff=lfs merge=lfs -text
14
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
15
+ *.npy filter=lfs diff=lfs merge=lfs -text
16
+ *.npz filter=lfs diff=lfs merge=lfs -text
17
+ *.onnx filter=lfs diff=lfs merge=lfs -text
18
+ *.ot filter=lfs diff=lfs merge=lfs -text
19
+ *.parquet filter=lfs diff=lfs merge=lfs -text
20
+ *.pb filter=lfs diff=lfs merge=lfs -text
21
+ *.pickle filter=lfs diff=lfs merge=lfs -text
22
+ *.pkl filter=lfs diff=lfs merge=lfs -text
23
+ *.pt filter=lfs diff=lfs merge=lfs -text
24
+ *.pth filter=lfs diff=lfs merge=lfs -text
25
+ *.rar filter=lfs diff=lfs merge=lfs -text
26
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
27
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
29
+ *.tar filter=lfs diff=lfs merge=lfs -text
30
+ *.tflite filter=lfs diff=lfs merge=lfs -text
31
+ *.tgz filter=lfs diff=lfs merge=lfs -text
32
+ *.wasm filter=lfs diff=lfs merge=lfs -text
33
+ *.xz filter=lfs diff=lfs merge=lfs -text
34
+ *.zip filter=lfs diff=lfs merge=lfs -text
35
+ *.zst filter=lfs diff=lfs merge=lfs -text
36
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
37
+ # Audio files - uncompressed
38
+ *.pcm filter=lfs diff=lfs merge=lfs -text
39
+ *.sam filter=lfs diff=lfs merge=lfs -text
40
+ *.raw filter=lfs diff=lfs merge=lfs -text
41
+ # Audio files - compressed
42
+ *.aac filter=lfs diff=lfs merge=lfs -text
43
+ *.flac filter=lfs diff=lfs merge=lfs -text
44
+ *.mp3 filter=lfs diff=lfs merge=lfs -text
45
+ *.ogg filter=lfs diff=lfs merge=lfs -text
46
+ *.wav filter=lfs diff=lfs merge=lfs -text
47
+ # Image files - uncompressed
48
+ *.bmp filter=lfs diff=lfs merge=lfs -text
49
+ *.gif filter=lfs diff=lfs merge=lfs -text
50
+ *.png filter=lfs diff=lfs merge=lfs -text
51
+ *.tiff filter=lfs diff=lfs merge=lfs -text
52
+ # Image files - compressed
53
+ *.jpg filter=lfs diff=lfs merge=lfs -text
54
+ *.jpeg filter=lfs diff=lfs merge=lfs -text
55
+ *.webp filter=lfs diff=lfs merge=lfs -text
56
+ # Video files - compressed
57
+ *.mp4 filter=lfs diff=lfs merge=lfs -text
58
+ *.webm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ dataset_info:
3
+ - config_name: products
4
+ features:
5
+ - name: product_id
6
+ dtype: string
7
+ - name: product_title
8
+ dtype: string
9
+ - name: product_description
10
+ dtype: string
11
+ - name: product_bullet_point
12
+ dtype: string
13
+ - name: product_brand
14
+ dtype: string
15
+ - name: product_color
16
+ dtype: string
17
+ - name: product_locale
18
+ dtype: string
19
+ - name: split
20
+ dtype: string
21
+ - name: __index_level_0__
22
+ dtype: int64
23
+ splits:
24
+ - name: train
25
+ num_bytes: 1650407845
26
+ num_examples: 1371823
27
+ - name: test
28
+ num_bytes: 537176847
29
+ num_examples: 443101
30
+ download_size: 1149707182
31
+ dataset_size: 2187584692
32
+ - config_name: queries
33
+ features:
34
+ - name: example_id
35
+ dtype: int64
36
+ - name: query
37
+ dtype: string
38
+ - name: query_id
39
+ dtype: int64
40
+ - name: product_id
41
+ dtype: string
42
+ - name: product_locale
43
+ dtype: string
44
+ - name: esci_label
45
+ dtype: string
46
+ - name: small_version
47
+ dtype: int64
48
+ - name: large_version
49
+ dtype: int64
50
+ - name: split
51
+ dtype: string
52
+ - name: __index_level_0__
53
+ dtype: int64
54
+ splits:
55
+ - name: train
56
+ num_bytes: 198670365
57
+ num_examples: 1983272
58
+ - name: test
59
+ num_bytes: 63544917
60
+ num_examples: 638016
61
+ download_size: 63596052
62
+ dataset_size: 262215282
63
+ - config_name: sources
64
+ features:
65
+ - name: query_id
66
+ dtype: int64
67
+ - name: source
68
+ dtype: string
69
+ - name: split
70
+ dtype: string
71
+ - name: __index_level_0__
72
+ dtype: int64
73
+ splits:
74
+ - name: train
75
+ num_bytes: 3458419
76
+ num_examples: 99683
77
+ - name: test
78
+ num_bytes: 1048200
79
+ num_examples: 30969
80
+ download_size: 1510331
81
+ dataset_size: 4506619
82
+ configs:
83
+ - config_name: products
84
+ data_files:
85
+ - split: train
86
+ path: products/train-*
87
+ - split: test
88
+ path: products/test-*
89
+ - config_name: queries
90
+ data_files:
91
+ - split: train
92
+ path: queries/train-*
93
+ - split: test
94
+ path: queries/test-*
95
+ - config_name: sources
96
+ data_files:
97
+ - split: train
98
+ path: sources/train-*
99
+ - split: test
100
+ path: sources/test-*
101
+ license: apache-2.0
102
+ task_categories:
103
+ - text-classification
104
+ - token-classification
105
+ - text-generation
106
+ - sentence-similarity
107
+ language:
108
+ - en
109
+ - ja
110
+ - es
111
+ tags:
112
+ - amazon
113
+ - retrieval
114
+ - search
115
+ - ecommerce
116
+ - ranking
117
+ - reranking
118
+ size_categories:
119
+ - 1M<n<10M
120
+ ---
121
+
122
+ # Amazon Shopping Queries Dataset
123
+
124
+ Dataset for improving product search, ranking and recommendations, featuring query-product pairs with detailed relevance labels.
125
+
126
+ ## Overview
127
+ The dataset contains search queries paired with up to 40 potentially relevant products, each labeled using the ESCI system:
128
+ - **E**xact match: Products that perfectly match the customer's search intent (e.g., searching "iPhone 13" and finding "Apple iPhone 13 128GB")
129
+ - **S**ubstitute product: Alternative products that could satisfy the same need (e.g., searching "iPhone 13" and finding "iPhone 14" or "Samsung Galaxy S23")
130
+ - **C**omplement product: Products commonly bought together with the searched item (e.g., searching "iPhone 13" and finding "iPhone 13 case" or "screen protector")
131
+ - **I**rrelevant result: Products that don't match the customer's search intent (e.g., searching "iPhone 13" and finding "laptop charger")
132
+
133
+ ## Dataset Statistics
134
+ ### Reduced Version (Task 1)
135
+ - 48,300 unique queries
136
+ - 1,118,011 query-product pairs
137
+ - **Focus**: Filtered to exclude "easy" queries, making it more challenging
138
+ - Language distribution:
139
+ - English (US): 29,844 queries
140
+ - Spanish (ES): 8,049 queries
141
+ - Japanese (JP): 10,407 queries
142
+
143
+ ### Full Version (Tasks 2 & 3)
144
+ - 130,652 unique queries
145
+ - 2,621,738 query-product pairs
146
+ - **Focus**: Includes both easy and challenging queries
147
+ - Language distribution:
148
+ - English (US): 97,345 queries
149
+ - Spanish (ES): 15,180 queries
150
+ - Japanese (JP): 18,127 queries
151
+
152
+ ## Features
153
+ - Rich product metadata including:
154
+ - Product title
155
+ - Product description
156
+ - Product bullet points
157
+ - Brand information
158
+ - Color information
159
+ - Multilingual support (English, Japanese, Spanish)
160
+ - Train/test splits for each task
161
+
162
+ ## Download
163
+ Install `datasets` library:
164
+ ```bash
165
+ pip install datasets
166
+ ```
167
+ Donwload files:
168
+ ```python
169
+ from datasets import load_dataset
170
+
171
+ queries = load_dataset(path="milistu/amazon-esci-data", name="queries", split=["train", "test"])
172
+ products = load_dataset(path="milistu/amazon-esci-data", name="products", split=["train", "test"])
173
+ sources = load_dataset(path="milistu/amazon-esci-data", name="sources", split=["train", "test"])
174
+ ```
175
+
176
+ ## Use Cases
177
+ 1. **Product Ranking**: Develop algorithms to rank relevant products higher in search results
178
+ 2. **Relevance Classification**: Build models to classify products as Exact, Substitute, Complement, or Irrelevant
179
+ 3. **Substitute Detection**: Identify substitute products for improved product recommendations
180
+ 4. **Semantic Search**: Train embedding models (like BERT, sentence-transformers) to:
181
+ - Capture semantic similarity between queries and products
182
+ - Handle long-tail queries with no exact keyword matches
183
+ - Understand product relationships across categories
184
+ - Example: Query "comfortable running shoes for marathon" can match with "Nike Air Zoom Alphafly" even without exact keyword overlap
185
+
186
+ ## Citation
187
+ Originally sourced from ["Shopping Queries Dataset: A Large-Scale ESCI Benchmark for Improving Product Search"](https://github.com/amazon-science/esci-data?tab=readme-ov-file), this version is optimized for machine learning applications and semantic search research.
188
+ ```
189
+ @article{reddy2022shopping,
190
+ title={Shopping Queries Dataset: A Large-Scale {ESCI} Benchmark for Improving Product Search},
191
+ author={Chandan K. Reddy and Lluís Màrquez and Fran Valero and Nikhil Rao and Hugo Zaragoza and Sambaran Bandyopadhyay and Arnab Biswas and Anlu Xing and Karthik Subbian},
192
+ year={2022},
193
+ eprint={2206.06588},
194
+ archivePrefix={arXiv}
195
+ }
196
+ ```
products/test-00000-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d501a4c0e17cce131ba9c31792144b582ca10f5365635ce9c61e9c49cdf59d95
3
+ size 146982884
products/test-00001-of-00002.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6ba96cab283cabc0dab0ea457daa5fc4e615bc76eaaf30e96dc5dd15250cec24
3
+ size 139408497
products/train-00000-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbbb484e26ca26511fa9a2d1128258a073f3f3a99845e52318ca7d732d1301f8
3
+ size 221593532
products/train-00001-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:84659874fc30a987ab1cfbb587bcd1a5f30e59be99a5ddbad5193c37f9d7587b
3
+ size 219958718
products/train-00002-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:97f6d75b341531d28f461868e7397e0f23890a59c2e47034203933d914ba4951
3
+ size 203312810
products/train-00003-of-00004.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:54743de244fad8d6876811d1494ba62195210f7aa51cb7288d6a0cc3f03cfe3b
3
+ size 218450741
queries/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7446a1a836b7ee97d11dbd2db9ba797270e97bf7dc619674142743b6f6305794
3
+ size 15691283
queries/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d5fcc196109f40cd51bac23af90f7000e56f3d2e2f27626438a28d2d4ad4f98
3
+ size 47904769
retrieval/exact_queries_large.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a8ed65cc65e9af9fc33a1213ab651571abc517ffd9c83bfac5fdc24bf6a66206
3
+ size 18359260
retrieval/exact_queries_small.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:5313b26fc6fffd05622f42ef6674c5504f523521f331f77984c476814b2a5969
3
+ size 5991261
sources/test-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:273ab0c83fba47e3c39edfd312f270ffc29575a07ad89fa12f2844228df98d64
3
+ size 359683
sources/train-00000-of-00001.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7fba57112452ec384749bcb13dc159cb68a933bc65741d508197bc4995625d29
3
+ size 1150648