metadata
annotations_creators:
- derived
language:
- code
license: mit
multilinguality: monolingual
source_datasets:
- CoIR-Retrieval/CodeSearchNet-ccr
task_categories:
- text-retrieval
task_ids: []
dataset_info:
- config_name: go-corpus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: title
dtype: string
splits:
- name: test
num_bytes: 34809839
num_examples: 182735
download_size: 15725909
dataset_size: 34809839
- config_name: go-qrels
features:
- name: query-id
dtype: string
- name: corpus-id
dtype: string
- name: score
dtype: int64
splits:
- name: test
num_bytes: 243660
num_examples: 8122
download_size: 99741
dataset_size: 243660
- config_name: go-queries
features:
- name: id
dtype: string
- name: text
dtype: string
splits:
- name: test
num_bytes: 2020824
num_examples: 8122
download_size: 911255
dataset_size: 2020824
- config_name: java-corpus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: title
dtype: string
splits:
- name: test
num_bytes: 49027018
num_examples: 181061
download_size: 19441004
dataset_size: 49027018
- config_name: java-qrels
features:
- name: query-id
dtype: string
- name: corpus-id
dtype: string
- name: score
dtype: int64
splits:
- name: test
num_bytes: 328650
num_examples: 10955
download_size: 137077
dataset_size: 328650
- config_name: java-queries
features:
- name: id
dtype: string
- name: text
dtype: string
splits:
- name: test
num_bytes: 3916921
num_examples: 10955
download_size: 1589683
dataset_size: 3916921
- config_name: javascript-corpus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: title
dtype: string
splits:
- name: test
num_bytes: 18616585
num_examples: 65201
download_size: 8405911
dataset_size: 18616585
- config_name: javascript-qrels
features:
- name: query-id
dtype: string
- name: corpus-id
dtype: string
- name: score
dtype: int64
splits:
- name: test
num_bytes: 92148
num_examples: 3291
download_size: 40493
dataset_size: 92148
- config_name: javascript-queries
features:
- name: id
dtype: string
- name: text
dtype: string
splits:
- name: test
num_bytes: 1506447
num_examples: 3291
download_size: 637355
dataset_size: 1506447
- config_name: php-corpus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: title
dtype: string
splits:
- name: test
num_bytes: 70164589
num_examples: 268237
download_size: 27534526
dataset_size: 70164589
- config_name: php-qrels
features:
- name: query-id
dtype: string
- name: corpus-id
dtype: string
- name: score
dtype: int64
splits:
- name: test
num_bytes: 420420
num_examples: 14014
download_size: 176431
dataset_size: 420420
- config_name: php-queries
features:
- name: id
dtype: string
- name: text
dtype: string
splits:
- name: test
num_bytes: 4928215
num_examples: 14014
download_size: 1879778
dataset_size: 4928215
- config_name: python-corpus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: title
dtype: string
splits:
- name: test
num_bytes: 108454853
num_examples: 280652
download_size: 44304500
dataset_size: 108454853
- config_name: python-qrels
features:
- name: query-id
dtype: string
- name: corpus-id
dtype: string
- name: score
dtype: int64
splits:
- name: test
num_bytes: 447540
num_examples: 14918
download_size: 185025
dataset_size: 447540
- config_name: python-queries
features:
- name: id
dtype: string
- name: text
dtype: string
splits:
- name: test
num_bytes: 8455942
num_examples: 14918
download_size: 3542383
dataset_size: 8455942
- config_name: ruby-corpus
features:
- name: id
dtype: string
- name: text
dtype: string
- name: title
dtype: string
splits:
- name: test
num_bytes: 5489759
num_examples: 27588
download_size: 2546854
dataset_size: 5489759
- config_name: ruby-qrels
features:
- name: query-id
dtype: string
- name: corpus-id
dtype: string
- name: score
dtype: int64
splits:
- name: test
num_bytes: 35308
num_examples: 1261
download_size: 15588
dataset_size: 35308
- config_name: ruby-queries
features:
- name: id
dtype: string
- name: text
dtype: string
splits:
- name: test
num_bytes: 354183
num_examples: 1261
download_size: 164078
dataset_size: 354183
configs:
- config_name: go-corpus
data_files:
- split: test
path: go-corpus/test-*
- config_name: go-qrels
data_files:
- split: test
path: go-qrels/test-*
- config_name: go-queries
data_files:
- split: test
path: go-queries/test-*
- config_name: java-corpus
data_files:
- split: test
path: java-corpus/test-*
- config_name: java-qrels
data_files:
- split: test
path: java-qrels/test-*
- config_name: java-queries
data_files:
- split: test
path: java-queries/test-*
- config_name: javascript-corpus
data_files:
- split: test
path: javascript-corpus/test-*
- config_name: javascript-qrels
data_files:
- split: test
path: javascript-qrels/test-*
- config_name: javascript-queries
data_files:
- split: test
path: javascript-queries/test-*
- config_name: php-corpus
data_files:
- split: test
path: php-corpus/test-*
- config_name: php-qrels
data_files:
- split: test
path: php-qrels/test-*
- config_name: php-queries
data_files:
- split: test
path: php-queries/test-*
- config_name: python-corpus
data_files:
- split: test
path: python-corpus/test-*
- config_name: python-qrels
data_files:
- split: test
path: python-qrels/test-*
- config_name: python-queries
data_files:
- split: test
path: python-queries/test-*
- config_name: ruby-corpus
data_files:
- split: test
path: ruby-corpus/test-*
- config_name: ruby-qrels
data_files:
- split: test
path: ruby-qrels/test-*
- config_name: ruby-queries
data_files:
- split: test
path: ruby-queries/test-*
tags:
- mteb
- text
The dataset is a collection of code snippets. The task is to retrieve the most relevant code snippet for a given code snippet.
| Task category | t2t |
| Domains | Programming, Written |
| Reference | https://arxiv.org/abs/2407.02883 |
Source datasets:
How to evaluate on this task
You can evaluate an embedding model on this dataset using the following code:
import mteb
task = mteb.get_task("CodeSearchNetCCRetrieval")
evaluator = mteb.MTEB([task])
model = mteb.get_model(YOUR_MODEL)
evaluator.run(model)
To learn more about how to run models on mteb task check out the GitHub repository.
Citation
If you use this dataset, please cite the dataset as well as mteb, as this dataset likely includes additional processing as a part of the MMTEB Contribution.
@misc{li2024coircomprehensivebenchmarkcode,
archiveprefix = {arXiv},
author = {Xiangyang Li and Kuicai Dong and Yi Quan Lee and Wei Xia and Yichun Yin and Hao Zhang and Yong Liu and Yasheng Wang and Ruiming Tang},
eprint = {2407.02883},
primaryclass = {cs.IR},
title = {CoIR: A Comprehensive Benchmark for Code Information Retrieval Models},
url = {https://arxiv.org/abs/2407.02883},
year = {2024},
}
@article{enevoldsen2025mmtebmassivemultilingualtext,
title={MMTEB: Massive Multilingual Text Embedding Benchmark},
author={Kenneth Enevoldsen and Isaac Chung and Imene Kerboua and Márton Kardos and Ashwin Mathur and David Stap and Jay Gala and Wissam Siblini and Dominik Krzemiński and Genta Indra Winata and Saba Sturua and Saiteja Utpala and Mathieu Ciancone and Marion Schaeffer and Gabriel Sequeira and Diganta Misra and Shreeya Dhakal and Jonathan Rystrøm and Roman Solomatin and Ömer Çağatan and Akash Kundu and Martin Bernstorff and Shitao Xiao and Akshita Sukhlecha and Bhavish Pahwa and Rafał Poświata and Kranthi Kiran GV and Shawon Ashraf and Daniel Auras and Björn Plüster and Jan Philipp Harries and Loïc Magne and Isabelle Mohr and Mariya Hendriksen and Dawei Zhu and Hippolyte Gisserot-Boukhlef and Tom Aarsen and Jan Kostkan and Konrad Wojtasik and Taemin Lee and Marek Šuppa and Crystina Zhang and Roberta Rocca and Mohammed Hamdy and Andrianos Michail and John Yang and Manuel Faysse and Aleksei Vatolin and Nandan Thakur and Manan Dey and Dipam Vasani and Pranjal Chitale and Simone Tedeschi and Nguyen Tai and Artem Snegirev and Michael Günther and Mengzhou Xia and Weijia Shi and Xing Han Lù and Jordan Clive and Gayatri Krishnakumar and Anna Maksimova and Silvan Wehrli and Maria Tikhonova and Henil Panchal and Aleksandr Abramov and Malte Ostendorff and Zheng Liu and Simon Clematide and Lester James Miranda and Alena Fenogenova and Guangyu Song and Ruqiya Bin Safi and Wen-Ding Li and Alessia Borghini and Federico Cassano and Hongjin Su and Jimmy Lin and Howard Yen and Lasse Hansen and Sara Hooker and Chenghao Xiao and Vaibhav Adlakha and Orion Weller and Siva Reddy and Niklas Muennighoff},
publisher = {arXiv},
journal={arXiv preprint arXiv:2502.13595},
year={2025},
url={https://arxiv.org/abs/2502.13595},
doi = {10.48550/arXiv.2502.13595},
}
@article{muennighoff2022mteb,
author = {Muennighoff, Niklas and Tazi, Nouamane and Magne, Loïc and Reimers, Nils},
title = {MTEB: Massive Text Embedding Benchmark},
publisher = {arXiv},
journal={arXiv preprint arXiv:2210.07316},
year = {2022}
url = {https://arxiv.org/abs/2210.07316},
doi = {10.48550/ARXIV.2210.07316},
}
Dataset Statistics
Dataset Statistics
The following code contains the descriptive statistics from the task. These can also be obtained using:
import mteb
task = mteb.get_task("CodeSearchNetCCRetrieval")
desc_stats = task.metadata.descriptive_stats
{
"test": {
"num_samples": 1058035,
"number_of_characters": 284081702,
"documents_text_statistics": {
"total_text_length": 263684735,
"min_text_length": 16,
"average_text_length": 262.249182972409,
"max_text_length": 139971,
"unique_texts": 995481
},
"documents_image_statistics": null,
"queries_text_statistics": {
"total_text_length": 20396967,
"min_text_length": 23,
"average_text_length": 388.06276516809044,
"max_text_length": 214210,
"unique_texts": 52439
},
"queries_image_statistics": null,
"relevant_docs_statistics": {
"num_relevant_docs": 52561,
"min_relevant_docs_per_query": 1,
"average_relevant_docs_per_query": 1.0,
"max_relevant_docs_per_query": 1,
"unique_relevant_docs": 52561
},
"top_ranked_statistics": null,
"hf_subset_descriptive_stats": {
"python": {
"num_samples": 295570,
"number_of_characters": 109985967,
"documents_text_statistics": {
"total_text_length": 101754313,
"min_text_length": 16,
"average_text_length": 362.56400453230333,
"max_text_length": 10111,
"unique_texts": 280036
},
"documents_image_statistics": null,
"queries_text_statistics": {
"total_text_length": 8231654,
"min_text_length": 38,
"average_text_length": 551.7934039415471,
"max_text_length": 8326,
"unique_texts": 14918
},
"queries_image_statistics": null,
"relevant_docs_statistics": {
"num_relevant_docs": 14918,
"min_relevant_docs_per_query": 1,
"average_relevant_docs_per_query": 1.0,
"max_relevant_docs_per_query": 1,
"unique_relevant_docs": 14918
},
"top_ranked_statistics": null
},
"javascript": {
"num_samples": 68492,
"number_of_characters": 18661880,
"documents_text_statistics": {
"total_text_length": 17201640,
"min_text_length": 17,
"average_text_length": 263.8247879633748,
"max_text_length": 139971,
"unique_texts": 64779
},
"documents_image_statistics": null,
"queries_text_statistics": {
"total_text_length": 1460240,
"min_text_length": 40,
"average_text_length": 443.70707991491946,
"max_text_length": 214210,
"unique_texts": 3291
},
"queries_image_statistics": null,
"relevant_docs_statistics": {
"num_relevant_docs": 3291,
"min_relevant_docs_per_query": 1,
"average_relevant_docs_per_query": 1.0,
"max_relevant_docs_per_query": 1,
"unique_relevant_docs": 3291
},
"top_ranked_statistics": null
},
"go": {
"num_samples": 190857,
"number_of_characters": 33082384,
"documents_text_statistics": {
"total_text_length": 31183720,
"min_text_length": 16,
"average_text_length": 170.64995758885817,
"max_text_length": 51245,
"unique_texts": 179845
},
"documents_image_statistics": null,
"queries_text_statistics": {
"total_text_length": 1898664,
"min_text_length": 23,
"average_text_length": 233.76803742920464,
"max_text_length": 3589,
"unique_texts": 8122
},
"queries_image_statistics": null,
"relevant_docs_statistics": {
"num_relevant_docs": 8122,
"min_relevant_docs_per_query": 1,
"average_relevant_docs_per_query": 1.0,
"max_relevant_docs_per_query": 1,
"unique_relevant_docs": 8122
},
"top_ranked_statistics": null
},
"ruby": {
"num_samples": 28849,
"number_of_characters": 5236077,
"documents_text_statistics": {
"total_text_length": 4899550,
"min_text_length": 19,
"average_text_length": 177.59714368566043,
"max_text_length": 6201,
"unique_texts": 26997
},
"documents_image_statistics": null,
"queries_text_statistics": {
"total_text_length": 336527,
"min_text_length": 36,
"average_text_length": 266.8731165741475,
"max_text_length": 2244,
"unique_texts": 1261
},
"queries_image_statistics": null,
"relevant_docs_statistics": {
"num_relevant_docs": 1261,
"min_relevant_docs_per_query": 1,
"average_relevant_docs_per_query": 1.0,
"max_relevant_docs_per_query": 1,
"unique_relevant_docs": 1261
},
"top_ranked_statistics": null
},
"java": {
"num_samples": 192016,
"number_of_characters": 48626999,
"documents_text_statistics": {
"total_text_length": 44874537,
"min_text_length": 21,
"average_text_length": 247.8420918916829,
"max_text_length": 15046,
"unique_texts": 178984
},
"documents_image_statistics": null,
"queries_text_statistics": {
"total_text_length": 3752462,
"min_text_length": 38,
"average_text_length": 342.5341853035144,
"max_text_length": 5066,
"unique_texts": 10844
},
"queries_image_statistics": null,
"relevant_docs_statistics": {
"num_relevant_docs": 10955,
"min_relevant_docs_per_query": 1,
"average_relevant_docs_per_query": 1.0,
"max_relevant_docs_per_query": 1,
"unique_relevant_docs": 10955
},
"top_ranked_statistics": null
},
"php": {
"num_samples": 282251,
"number_of_characters": 68488395,
"documents_text_statistics": {
"total_text_length": 63770975,
"min_text_length": 20,
"average_text_length": 237.74115800579338,
"max_text_length": 6961,
"unique_texts": 264876
},
"documents_image_statistics": null,
"queries_text_statistics": {
"total_text_length": 4717420,
"min_text_length": 40,
"average_text_length": 336.62194947909234,
"max_text_length": 2995,
"unique_texts": 14003
},
"queries_image_statistics": null,
"relevant_docs_statistics": {
"num_relevant_docs": 14014,
"min_relevant_docs_per_query": 1,
"average_relevant_docs_per_query": 1.0,
"max_relevant_docs_per_query": 1,
"unique_relevant_docs": 14014
},
"top_ranked_statistics": null
}
}
}
}
This dataset card was automatically generated using MTEB