--- license: apache-2.0 language: - en - fr pretty_name: Magento 2 sample-data query rewriting (EN/FR) task_categories: - token-classification - text-generation tags: - e-commerce - magento - query-understanding - slot-filling - synthetic size_categories: - 10K \| price: … \| gender: … \| color: A ; B \| size: … \| activity: … \| climate: … \| material: … \| not: … \| op: … \| field: …` (fields in this order, only the present ones) | | keywords | string, null | canonical English descriptor + product (`warm jacket`), null when the query names none | | gender, color, size, activity, climate, material | list[string] | exact catalog labels (see `labels/label_values.json`) | | not_terms | list[string] | excluded features (`hood`, `zip`, `logo`) | | price_min, price_max | float, null | price bounds. "around X" is stored as 0.8X–1.2X | | price_level | string, null | `cheap` or `expensive` (no number) | | price_approx | bool, null | true when the price came from an "around X" span; null when the row has no spans | | op | string, null | chat operation: more, else, cheaper, pricier, reset, undo, remove, replace, add, not | | field | string, null | the attribute a `remove` names (color, size, price, all, …) | | spans | list[{start, end, label, text}] | character spans with their tag (`KW`, `DESC`, `COLOR`, `PRICE_MAX`, `OP_MORE`, …) | | spans_status | string | `gold` (spans written by the generator) or `missing` (template rows whose labels were aligned at training time, and rows with no alignable spans, mostly typo rows) | | opener, opener_family | string, null | the conversational opener of the query (`I really need`, family `need`) | | source_family | string | `tpl`, `free`, `free-op`, `chat-fragment`, `handwritten`, or `r8--A` / `r8--B` | | source_id | string | original template / family id | | generator, seed | string, int | the script that produced the row and its random seed (null when not recorded) | | rounds_used | list[string] | the model rounds whose train or validation set contains this text (`r7`, `r8`, `r8.1`) | | leak_note | string, null | why a row of an evaluation split is not a clean holdout | Tag sets: `labels/tags_r7.json` (14 span types, 29 BIO labels) and `labels/tags_r8.json` (26 span types, 53 BIO labels: r7's plus PRICE_EXPENSIVE, the 10 OP_* tags and FIELD, appended so r7's indices stay valid). `chat/examples` has `id, text, lang, intent, op, slots, changes_json, target_line, source_id`. `slots` holds the full state after the utterance; `changes_json` is the slot change as JSON (`set`, `replace`, `add`, `clear`). `chat_dialogues/dialogues_eval` (its own config, because its columns differ) has `turns: [{msg, intent, op, note, state}]`; a symbolic price such as "cheaper than what was shown" is in `state.price_rule` (`price_max=median_of_shown`). ## How the data was made No real shopper data. Every query was produced by scripts or written by the developer with an AI coding agent: - **Templates** (`tpl`, `test_in_distribution`): a template generator with EN/FR surface forms, French gender agreement, 18 EN and 14 FR openers, about 5 % typos and 4 % negation (seed 13). - **Free frames** (`free`, `free-op`): hand-written sentence frames with slots, written by an AI agent and expanded by a generator (seed 7). Each frame is one `source_id`, so validation holds out whole frames. - **Store-driven rows** (`r8-*-A` for train/validation, `r8-*-B` for holdout_r8): generated from the store's own option labels, category names and attribute labels, with price levels, chat operations, remove/replace/add, fit, climate/activity and neutral rows. Set A and set B use different templates. - **Hand-written evaluation sets**: holdout_r2, holdout_r3, holdout_r4, holdout_r7, hard and item5. holdout_r3, holdout_r4 and holdout_r7 were written before the round they measure; in holdout_r2 and holdout_r3 the French rows are translations of the English ones. - Labelling rules are in `CONVENTIONS.md`. Generated values are checked against the catalog vocabulary, and store-driven rows whose spans do not decode back to their target were dropped. Values are store labels of the Magento **Luma sample catalog** (for example colour `Gray`, climate `Wintry`, activity `Crosstraining`), so the label set is specific to that catalog. ## Reference results Exact match of the full flat line, EN / FR, of the shipped ONNX int8 tagger, as measured for the r7 → r8 release. r8.1 has the same model and the same scores; only its keyword spelling for the store changed. | Split | r7 | r8 | |---|---|---| | holdout_r2 ¹ | 0.833 / 0.933 | 0.933 / 0.967 | | holdout_r3 ¹ | 0.833 / 0.833 | 0.933 / 0.867 | | holdout_r4 | 0.967 / 0.900 | 0.967 / 0.933 | | holdout_r7 | 0.867 / 0.733 | 0.867 / 0.733 | | dev (hard + holdout_r2 + holdout_r3) ¹ | 0.793 / 0.897 | 0.878 / 0.923 | | holdout_r8 | 0.215 / 0.369 | 0.612 / 0.672 | | item5 | 0.40 / 1.0 | 1.0 / 1.0 | ¹ Not clean: these rows were used for validation, early stopping or seed choice (see `leak_note`), so these scores are optimistic. The clean measurements are holdout_r4, holdout_r7, holdout_r8 and item5. r7 never saw the r8 operations (OP_*, PRICE_EXPENSIVE), which explains its low holdout_r8 score. On holdout_r7, r8 has one invented price in English ("warm hat-free hoodie" read as expensive) and a lower French filter recall (0.932 → 0.915). ## Limitations - Synthetic and template-heavy: real shopper queries are more varied. `test_in_distribution` comes from the same templates as train. - Labels are Luma sample-catalog labels; another store needs its own label set and retraining. - Prices are written in euros, "bucks", € or with no currency, while the Luma store prices in USD. Targets keep only the number. - Typos are intentional (about 5 % of template rows) and are not flagged per row. - Known gaps: no generic "bag" / "sac" product in r8's data, and few multi-word "show more" rows. - holdout_r2 and holdout_r3 were relabelled after they were first frozen (see `CHANGES.md` and `CONVENTIONS.md`). ## Files - `data//.parquet`: the data. - `labels/`: tag sets and the allowed values per field. - `CONVENTIONS.md`: the labelling rules, written round by round before each holdout. - `CHANGES.md`: every change made when converting the original training files, with counts. - `checksums.json`: sha256 of each original training file (as recorded in the shipped models) and of each Parquet file. ## License The dataset (query texts, labels, spans and annotations) is released under the **Apache-2.0** license. **Notice: Magento Luma sample data.** The label values (attribute option labels such as colours, activities, climates and materials, and the product category words) come from the Magento Open Source **Luma sample data** (`magento/module-*-sample-data`), which Magento / Adobe distributes under the **OSL-3.0 and AFL-3.0** licenses. Those labels are used here as short factual category values; no product descriptions, images or other sample-data content are included. Magento and Luma are trademarks of Adobe.