CPRet-data
This repository hosts the datasets for CPRet: A Dataset, Benchmark, and Model for Retrieval in Competitive Programming.
Visit https://cpret.online/ to try out CPRet in action for competitive programming problem retrieval.
💡 CPRet Benchmark Tasks
The CPRet dataset supports four retrieval tasks relevant to competitive programming:
-
Text-to-Code Retrieval Retrieve relevant code snippets based on a natural language problem description.
-
Code-to-Code Retrieval Retrieve semantically similar code snippets, often corresponding to related problems.
-
Problem-to-Duplicate Retrieval Retrieve near-duplicate or reused problems.
-
Simplified-to-Full Retrieval Retrieve the full original problem descriptions based on simplified or abridged versions.
💾 Contents
This repository includes all datasets used in the CPRet project, organized as follows:
-
Training datasets Used to train retrieval models with contrastive or supervised learning strategies.
-
Evaluation datasets Benchmarks for the four retrieval tasks above, with relevance annotations.
🚀 How to Use
🔧 Code
To use these datasets for training or evaluation, please refer to the main CPRet repository: 👉 CPRet GitHub
It provides:
- Preprocessing and training scripts
- Evaluation pipelines for all retrieval tasks
🤗 Hugging Face Collection
All CPRet-related resources are available in a unified Hugging Face Collection: 👉 CPRet on Hugging Face
This includes:
- 🔹 Trained models (
CPRetriever-Code,CPRetriever-Prob, etc.) - 🔹 Datasets for training and benchmarking
- 🔹 Precomputed embeddings along with full problem descriptions, titles, platforms, and URLs, supporting plug-and-play deployment of retrieval services.
📜 Citation
If you use CPRet in your work, please cite:
@misc{deng2025cpretdatasetbenchmarkmodel,
title = {CPRet: A Dataset, Benchmark, and Model for Retrieval in Competitive Programming},
author = {Han Deng and Yuan Meng and Shixiang Tang and Wanli Ouyang and Xinzhu Ma},
year = {2025},
eprint = {2505.12925},
archivePrefix = {arXiv},
primaryClass = {cs.SE},
url = {https://arxiv.org/abs/2505.12925}
}