Skip to the content.

Data — Amazon ESCI Shopping Queries

We use the Amazon ESCI dataset (Shopping Queries Dataset: A Large-Scale ESCI Benchmark for Improving Product Search, Reddy et al., 2022).

The ESCI taxonomy

Each (query, product) pair carries one of four relevance labels:

Label Name Meaning Gain
E Exact Product fully matches the query intent 1.0
S Substitute Different but functionally interchangeable product 0.1
C Complement Used with the queried item, not a replacement 0.01
I Irrelevant Unrelated 0.0

The graded gains in the last column feed the NDCG computation.

Scale

Files

The loader (necs.data.esci.load_esci) expects the official examples and products parquet files in data/raw/:

shopping_queries_dataset_examples.parquet   # (query_id, query, product_id, esci_label, split, small_version)
shopping_queries_dataset_products.parquet   # (product_id, title, brand, color, bullet_point, description, locale)
shopping_queries_dataset_sources.csv        # query provenance (unused here)

Fetch them with:

python scripts/download_esci.py --locale us --out data/raw
# or, from the Hugging Face mirror:
python scripts/download_esci.py --from-hf --locale us --out data/raw

Preprocessing

Label balance

ESCI is heavily skewed toward Exact. We address this in two places: