{"id":14155174,"url":"https://github.com/otto-de/recsys-dataset","last_synced_at":"2025-07-22T22:08:25.803Z","repository":{"id":62662109,"uuid":"554794381","full_name":"otto-de/recsys-dataset","owner":"otto-de","description":"🛍 A real-world e-commerce dataset for session-based recommender systems research.","archived":false,"fork":false,"pushed_at":"2025-05-08T18:34:10.000Z","size":184,"stargazers_count":334,"open_issues_count":0,"forks_count":49,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-08T19:39:48.302Z","etag":null,"topics":["benchmark","dataset","e-commerce","kaggle","machine-learning","multi-objective-optimization","otto","recommendation-system","recommendations","recommender-system","recsys","session-based"],"latest_commit_sha":null,"homepage":"https://www.kaggle.com/datasets/otto/recsys-dataset","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/otto-de.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-20T12:07:32.000Z","updated_at":"2025-05-08T18:34:16.000Z","dependencies_parsed_at":"2024-06-07T16:27:57.510Z","dependency_job_id":"298bc181-71ac-4849-b00d-4109462c5e80","html_url":"https://github.com/otto-de/recsys-dataset","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/otto-de/recsys-dataset","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Frecsys-dataset","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Frecsys-dataset/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Frecsys-dataset/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Frecsys-dataset/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otto-de","download_url":"https://codeload.github.com/otto-de/recsys-dataset/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otto-de%2Frecsys-dataset/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266580868,"owners_count":23951306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","dataset","e-commerce","kaggle","machine-learning","multi-objective-optimization","otto","recommendation-system","recommendations","recommender-system","recsys","session-based"],"created_at":"2024-08-17T08:02:22.557Z","updated_at":"2025-07-22T22:08:25.792Z","avatar_url":"https://github.com/otto-de.png","language":"Python","funding_links":[],"categories":["recommender-system"],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# OTTO Recommender Systems Dataset\n\n[![GitHub stars](https://img.shields.io/github/stars/otto-de/recsys-dataset.svg?style=for-the-badge\u0026color=yellow)](https://github.com/otto-de/recsys-dataset)\n[![Test suite](https://img.shields.io/github/actions/workflow/status/otto-de/recsys-dataset/test.yml?branch=main\u0026style=for-the-badge)](https://github.com/otto-de/recsys-dataset/actions/workflows/test.yml)\n[![Kaggle competition](https://img.shields.io/badge/kaggle-competition-20BEFF?style=for-the-badge\u0026logo=kaggle)](https://www.kaggle.com/competitions/otto-recommender-system)\n[![OTTO jobs](https://img.shields.io/badge/otto-jobs-F00020?style=for-the-badge\u0026logo=otto)](https://www.otto.de/jobs/technology/ueberblick/)\n\n**A real-world e-commerce dataset for session-based recommender systems research.**\n\n\u003cimg src=\".readme/header.png\" width=\"100%\"\u003e\n\n---\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#get-the-data\"\u003eGet the Data\u003c/a\u003e •\n  \u003ca href=\"#data-format\"\u003eData Format\u003c/a\u003e •\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e •\n  \u003ca href=\"#evaluation\"\u003eEvaluation\u003c/a\u003e •\n  \u003ca href=\"#faq\"\u003eFAQ\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n\u003c/div\u003e\n\nThe `OTTO` session dataset is a large-scale, industry-grade dataset designed to bridge the gap between academic research and real-world applications in session-based and sequential recommendation. It features anonymized behavior logs from the [OTTO](https://otto.de) webshop and app, supporting both multi-objective (predicting clicks, carts, and orders) and single-objective tasks. With ready-to-use formats, clear evaluation metrics, and a focus on realistic, scalable research, this dataset aims to drive innovation in the recommender systems community and has been featured in our own [Kaggle competition](https://www.kaggle.com/competitions/otto-recommender-system).\n\n## Key Features\n\n- 12M real-world anonymized user sessions\n- 220M events, consiting of `clicks`, `carts` and `orders`\n- 1.8M unique articles in the catalogue\n- Ready to use data in `.jsonl` format\n- Evaluation metrics for single and multi-objective tasks\n\n## Dataset Statistics\n\n| Dataset |  #sessions |    #items |     #events |     #clicks |     #carts |   #orders | Density [%] |\n| :------ | ---------: | --------: | ----------: | ----------: | ---------: | --------: | ----------: |\n| Train   | 12.899.779 | 1.855.603 | 216.716.096 | 194.720.954 | 16.896.191 | 5.098.951 |      0.0005 |\n| Test    |  1.671.803 | 1.019.357 |  13.851.293 |  12.340.303 |  1.155.698 |   355.292 |      0.0005 |\n\n|                           |  mean |   std |  min |  50% |  75% |  90% |  95% |  max |\n| :------------------------ | ----: | ----: | ---: | ---: | ---: | ---: | ---: | ---: |\n| Train #events per session | 16.80 | 33.58 |    2 |    6 |   15 |   39 |   68 |  500 |\n| Test  #events per session |  8.29 | 13.74 |    2 |    4 |    8 |   18 |   28 |  498 |\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cstrong\u003e#events per session histogram (90th percentile)\u003c/strong\u003e\u003c/summary\u003e\n    \u003cimg src=\".readme/events_per_session_p90.svg\" width=\"800px\"\u003e\n\u003c/details\u003e\n\n|                        |   mean |    std |  min |  50% |  75% |  90% |  95% |    max |\n| :--------------------- | -----: | -----: | ---: | ---: | ---: | ---: | ---: | -----: |\n| Train #events per item | 116.79 | 728.85 |    3 |   20 |   56 |  183 |  398 | 129004 |\n| Test #events per item  |  13.59 |  70.48 |    1 |    3 |    9 |   24 |   46 |  17068 |\n\n\u003cdetails\u003e\n    \u003csummary\u003e\u003cstrong\u003e#events per item histogram (90th percentile)\u003c/strong\u003e\u003c/summary\u003e\n    \u003cimg src=\".readme/events_per_item_p90.svg\" width=\"800px\"\u003e\n\u003c/details\u003e\n\n## Get the Data\n\nThe data is stored on the [Kaggle](https://www.kaggle.com/competitions/otto-recommender-system/data) platform and can be downloaded using their API:\n\n```Shell\nkaggle datasets download -d otto/recsys-dataset\n```\n\n## Data Format\n\nThe sessions are stored as `JSON` objects containing a unique `session` ID and a list of `events`:\n\n```JSON\n{\n    \"session\": 42,\n    \"events\": [\n        { \"aid\": 0, \"ts\": 1661200010000, \"type\": \"clicks\" },\n        { \"aid\": 1, \"ts\": 1661200020000, \"type\": \"clicks\" },\n        { \"aid\": 2, \"ts\": 1661200030000, \"type\": \"clicks\" },\n        { \"aid\": 2, \"ts\": 1661200040000, \"type\": \"carts\"  },\n        { \"aid\": 3, \"ts\": 1661200050000, \"type\": \"clicks\" },\n        { \"aid\": 3, \"ts\": 1661200060000, \"type\": \"carts\"  },\n        { \"aid\": 4, \"ts\": 1661200070000, \"type\": \"clicks\" },\n        { \"aid\": 2, \"ts\": 1661200080000, \"type\": \"orders\" },\n        { \"aid\": 3, \"ts\": 1661200080000, \"type\": \"orders\" }\n    ]\n}\n```\n\n- `session` - the unique session id\n- `events` - the time ordered sequence of events in the session\n  - `aid` - the article id (product code) of the associated event\n  - `ts` - the Unix timestamp of the event\n  - `type` - the event type, i.e., whether a product was clicked, added to the user's cart, or ordered during the session\n\n## Train/Test Split\n\nTo evaluate a model's ability to predict future behavior, as required for deployment in a real-world webshop, we use a time-based validation split. The training set includes user sessions from a 4-week period, while the test set contains sessions from the following week. To prevent information leakage, any training sessions overlapping with the test period were trimmed, ensuring a clear separation between past and future data. The diagram below illustrates this process:\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\".readme/train_test_split.png\" width=\"100%\"\u003e\n\u003c/div\u003e\n\n## Evaluation Metrics\n\nTo ensure research relevance and industry applicability, we provide standardized evaluation protocols that closely correlate with real-world performance. For consistent and reliable benchmarking, we strongly recommend:\n\n- **Using the provided train/test split** to ensure direct comparability with other research results, without leaving out any items or sessions in the evaluation\n- Evaluating on the **entire test sequences** without truncation\n- **Never use sampling** during evaluation, as this will lead to misleading results ([see details here](https://dl.acm.org/doi/10.1145/3394486.3403226))\n\n### Single-Objective Evaluation\n\nFor click prediction tasks, we recommend using **Recall@20** (preferred) and **MRR@20**, which have demonstrated strong correlation with business impact metrics in our production systems, as validated in our [research paper](https://arxiv.org/abs/2307.14906).\n\n| Model | Recall@20 | MRR@20 | Epochs/h |\n|---------------|-------|--------|----------|\n| [GRU4Rec⁺](https://arxiv.org/abs/1706.03847) | 0.443 | 0.205 | 0.019 |\n| [SASRec](https://arxiv.org/abs/1808.09781) | 0.307 | 0.180 | **0.248** |\n| [TRON](https://arxiv.org/abs/2307.14906) | **0.472** | **0.219** | 0.227 |\n\n### Multi-Objective Evaluation\n\nFor models predicting multiple user actions, we offer two approaches:\n\n1. **Joint Recall Metric**: Developed for our [Kaggle competition](https://www.kaggle.com/competitions/otto-recommender-system), this metric integrates recall scores for clicks, basket additions, and orders into a single comprehensive measure\n2. **MultiTRON**: An approach that optimizes for clicks and orders simultaneously, allowing for evaluation of different preference trade-offs as detailed in our [research paper](https://arxiv.org/abs/2407.16828)\n\nNote that multi-objective recommendation evaluation remains an active research area without definitive benchmarks. We welcome further research and contributions to improve evaluation methodologies for these complex scenarios.\n\n## Kaggle Competition\n\nFor detailed usage instructions and evaluation guidelines regarding the competition, please refer to the [KAGGLE.md](KAGGLE.md) file.\n\n## FAQ\n\n### How is a user `session` defined?\n\n- A session is all activity by a single user either in the train or the test set.\n\n### Are there identical users in the train and test data?\n\n- No, train and test users are completely disjunct.\n\n### Are all test `aids` included in the train set?\n\n- Yes, all test items are also included in the train set.\n\n### How can a session start with an order or a cart?\n\n- This can happen if the ordered item was already in the customer's cart before the data extraction period started. Similarly, a wishlist in our shop can lead to cart additions without a previous click.\n\n### Are `aids` the same as article numbers on [otto.de](otto.de)?\n\n- No, all article and session IDs are anonymized.\n\n### Are most of the clicks generated by our current recommendations?\n\n- No, our current recommendations generated only about 20% of the product page views in the dataset. Most users reached product pages via search results and product lists.\n\n## License\n\nThe OTTO dataset is released under the [CC-BY 4.0 License](https://creativecommons.org/licenses/by/4.0/), while the code is licensed under the [MIT License](LICENSE).\n\n## Citation\n\nBibTeX entry:\n\n```BibTeX\n@online{philipp_normann_sophie_baumeister_timo_wilm_2023,\n title={OTTO Recommender Systems Dataset: A real-world e-commerce dataset for session-based recommender systems research},\n url={https://www.kaggle.com/dsv/4991874},\n doi={10.34740/KAGGLE/DSV/4991874},\n publisher={Kaggle},\n author={Philipp Normann and Sophie Baumeister and Timo Wilm},\n year={2023}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotto-de%2Frecsys-dataset","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotto-de%2Frecsys-dataset","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotto-de%2Frecsys-dataset/lists"}