Datasets:
mteb
/

Modalities:
Text
Formats:
parquet
Languages:
code
ArXiv:
Libraries:
Datasets
pandas
License:
Samoed commited on
Commit
68e8f07
·
verified ·
1 Parent(s): ab8f8ff

Add dataset card

Browse files
Files changed (1) hide show
  1. README.md +307 -0
README.md CHANGED
@@ -1,4 +1,15 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
2
  dataset_info:
3
  - config_name: go-corpus
4
  features:
@@ -313,4 +324,300 @@ configs:
313
  data_files:
314
  - split: test
315
  path: ruby-queries/test-*
 
 
 
316
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ annotations_creators:
3
+ - derived
4
+ language:
5
+ - code
6
+ license: mit
7
+ multilinguality: monolingual
8
+ source_datasets:
9
+ - code-search-net/code_search_net
10
+ task_categories:
11
+ - text-retrieval
12
+ task_ids: []
13
  dataset_info:
14
  - config_name: go-corpus
15
  features:
 
324
  data_files:
325
  - split: test
326
  path: ruby-queries/test-*
327
+ tags:
328
+ - mteb
329
+ - text
330
  ---
331
+ <!-- adapted from https://github.com/huggingface/huggingface_hub/blob/v0.30.2/src/huggingface_hub/templates/datasetcard_template.md -->
332
+
333
+ <div align="center" style="padding: 40px 20px; background-color: white; border-radius: 12px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); max-width: 600px; margin: 0 auto;">
334
+ <h1 style="font-size: 3.5rem; color: #1a1a1a; margin: 0 0 20px 0; letter-spacing: 2px; font-weight: 700;">CodeSearchNetRetrieval</h1>
335
+ <div style="font-size: 1.5rem; color: #4a4a4a; margin-bottom: 5px; font-weight: 300;">An <a href="https://github.com/embeddings-benchmark/mteb" style="color: #2c5282; font-weight: 600; text-decoration: none;" onmouseover="this.style.textDecoration='underline'" onmouseout="this.style.textDecoration='none'">MTEB</a> dataset</div>
336
+ <div style="font-size: 0.9rem; color: #2c5282; margin-top: 10px;">Massive Text Embedding Benchmark</div>
337
+ </div>
338
+
339
+ The dataset is a collection of code snippets and their corresponding natural language queries. The task is to retrieve the most relevant code snippet for a given query.
340
+
341
+ | | |
342
+ |---------------|---------------------------------------------|
343
+ | Task category | t2t |
344
+ | Domains | Programming, Written |
345
+ | Reference | https://huggingface.co/datasets/code_search_net/ |
346
+
347
+ Source datasets:
348
+ - [code-search-net/code_search_net](https://huggingface.co/datasets/code-search-net/code_search_net)
349
+
350
+
351
+ ## How to evaluate on this task
352
+
353
+ You can evaluate an embedding model on this dataset using the following code:
354
+
355
+ ```python
356
+ import mteb
357
+
358
+ task = mteb.get_task("CodeSearchNetRetrieval")
359
+ evaluator = mteb.MTEB([task])
360
+
361
+ model = mteb.get_model(YOUR_MODEL)
362
+ evaluator.run(model)
363
+ ```
364
+
365
+ <!-- Datasets want link to arxiv in readme to autolink dataset with paper -->
366
+ To learn more about how to run models on `mteb` task check out the [GitHub repository](https://github.com/embeddings-benchmark/mteb).
367
+
368
+ ## Citation
369
+
370
+ If you use this dataset, please cite the dataset as well as [mteb](https://github.com/embeddings-benchmark/mteb), as this dataset likely includes additional processing as a part of the [MMTEB Contribution](https://github.com/embeddings-benchmark/mteb/tree/main/docs/mmteb).
371
+
372
+ ```bibtex
373
+
374
+ @article{husain2019codesearchnet,
375
+ author = {Husain, Hamel and Wu, Ho-Hsiang and Gazit, Tiferet and Allamanis, Miltiadis and Brockschmidt, Marc},
376
+ journal = {arXiv preprint arXiv:1909.09436},
377
+ title = {{CodeSearchNet} challenge: Evaluating the state of semantic code search},
378
+ year = {2019},
379
+ }
380
+
381
+
382
+ @article{enevoldsen2025mmtebmassivemultilingualtext,
383
+ title={MMTEB: Massive Multilingual Text Embedding Benchmark},
384
+ 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},
385
+ publisher = {arXiv},
386
+ journal={arXiv preprint arXiv:2502.13595},
387
+ year={2025},
388
+ url={https://arxiv.org/abs/2502.13595},
389
+ doi = {10.48550/arXiv.2502.13595},
390
+ }
391
+
392
+ @article{muennighoff2022mteb,
393
+ author = {Muennighoff, Niklas and Tazi, Nouamane and Magne, Loïc and Reimers, Nils},
394
+ title = {MTEB: Massive Text Embedding Benchmark},
395
+ publisher = {arXiv},
396
+ journal={arXiv preprint arXiv:2210.07316},
397
+ year = {2022}
398
+ url = {https://arxiv.org/abs/2210.07316},
399
+ doi = {10.48550/ARXIV.2210.07316},
400
+ }
401
+ ```
402
+
403
+ # Dataset Statistics
404
+ <details>
405
+ <summary> Dataset Statistics</summary>
406
+
407
+ The following code contains the descriptive statistics from the task. These can also be obtained using:
408
+
409
+ ```python
410
+ import mteb
411
+
412
+ task = mteb.get_task("CodeSearchNetRetrieval")
413
+
414
+ desc_stats = task.metadata.descriptive_stats
415
+ ```
416
+
417
+ ```json
418
+ {
419
+ "test": {
420
+ "num_samples": 12000,
421
+ "number_of_characters": 6496327,
422
+ "documents_text_statistics": {
423
+ "total_text_length": 4552253,
424
+ "min_text_length": 69,
425
+ "average_text_length": 758.7088333333334,
426
+ "max_text_length": 334374,
427
+ "unique_texts": 6000
428
+ },
429
+ "documents_image_statistics": null,
430
+ "queries_text_statistics": {
431
+ "total_text_length": 1944074,
432
+ "min_text_length": 2,
433
+ "average_text_length": 324.01233333333334,
434
+ "max_text_length": 17533,
435
+ "unique_texts": 5765
436
+ },
437
+ "queries_image_statistics": null,
438
+ "relevant_docs_statistics": {
439
+ "num_relevant_docs": 6000,
440
+ "min_relevant_docs_per_query": 1,
441
+ "average_relevant_docs_per_query": 1.0,
442
+ "max_relevant_docs_per_query": 1,
443
+ "unique_relevant_docs": 6000
444
+ },
445
+ "top_ranked_statistics": null,
446
+ "hf_subset_descriptive_stats": {
447
+ "python": {
448
+ "num_samples": 2000,
449
+ "number_of_characters": 1329388,
450
+ "documents_text_statistics": {
451
+ "total_text_length": 862842,
452
+ "min_text_length": 91,
453
+ "average_text_length": 862.842,
454
+ "max_text_length": 10914,
455
+ "unique_texts": 1000
456
+ },
457
+ "documents_image_statistics": null,
458
+ "queries_text_statistics": {
459
+ "total_text_length": 466546,
460
+ "min_text_length": 8,
461
+ "average_text_length": 466.546,
462
+ "max_text_length": 8636,
463
+ "unique_texts": 982
464
+ },
465
+ "queries_image_statistics": null,
466
+ "relevant_docs_statistics": {
467
+ "num_relevant_docs": 1000,
468
+ "min_relevant_docs_per_query": 1,
469
+ "average_relevant_docs_per_query": 1.0,
470
+ "max_relevant_docs_per_query": 1,
471
+ "unique_relevant_docs": 1000
472
+ },
473
+ "top_ranked_statistics": null
474
+ },
475
+ "javascript": {
476
+ "num_samples": 2000,
477
+ "number_of_characters": 1601650,
478
+ "documents_text_statistics": {
479
+ "total_text_length": 1415632,
480
+ "min_text_length": 95,
481
+ "average_text_length": 1415.632,
482
+ "max_text_length": 334374,
483
+ "unique_texts": 1000
484
+ },
485
+ "documents_image_statistics": null,
486
+ "queries_text_statistics": {
487
+ "total_text_length": 186018,
488
+ "min_text_length": 2,
489
+ "average_text_length": 186.018,
490
+ "max_text_length": 7657,
491
+ "unique_texts": 951
492
+ },
493
+ "queries_image_statistics": null,
494
+ "relevant_docs_statistics": {
495
+ "num_relevant_docs": 1000,
496
+ "min_relevant_docs_per_query": 1,
497
+ "average_relevant_docs_per_query": 1.0,
498
+ "max_relevant_docs_per_query": 1,
499
+ "unique_relevant_docs": 1000
500
+ },
501
+ "top_ranked_statistics": null
502
+ },
503
+ "go": {
504
+ "num_samples": 2000,
505
+ "number_of_characters": 688942,
506
+ "documents_text_statistics": {
507
+ "total_text_length": 563729,
508
+ "min_text_length": 69,
509
+ "average_text_length": 563.729,
510
+ "max_text_length": 15904,
511
+ "unique_texts": 1000
512
+ },
513
+ "documents_image_statistics": null,
514
+ "queries_text_statistics": {
515
+ "total_text_length": 125213,
516
+ "min_text_length": 14,
517
+ "average_text_length": 125.213,
518
+ "max_text_length": 1501,
519
+ "unique_texts": 988
520
+ },
521
+ "queries_image_statistics": null,
522
+ "relevant_docs_statistics": {
523
+ "num_relevant_docs": 1000,
524
+ "min_relevant_docs_per_query": 1,
525
+ "average_relevant_docs_per_query": 1.0,
526
+ "max_relevant_docs_per_query": 1,
527
+ "unique_relevant_docs": 1000
528
+ },
529
+ "top_ranked_statistics": null
530
+ },
531
+ "ruby": {
532
+ "num_samples": 2000,
533
+ "number_of_characters": 891452,
534
+ "documents_text_statistics": {
535
+ "total_text_length": 577634,
536
+ "min_text_length": 79,
537
+ "average_text_length": 577.634,
538
+ "max_text_length": 8171,
539
+ "unique_texts": 1000
540
+ },
541
+ "documents_image_statistics": null,
542
+ "queries_text_statistics": {
543
+ "total_text_length": 313818,
544
+ "min_text_length": 5,
545
+ "average_text_length": 313.818,
546
+ "max_text_length": 17533,
547
+ "unique_texts": 978
548
+ },
549
+ "queries_image_statistics": null,
550
+ "relevant_docs_statistics": {
551
+ "num_relevant_docs": 1000,
552
+ "min_relevant_docs_per_query": 1,
553
+ "average_relevant_docs_per_query": 1.0,
554
+ "max_relevant_docs_per_query": 1,
555
+ "unique_relevant_docs": 1000
556
+ },
557
+ "top_ranked_statistics": null
558
+ },
559
+ "java": {
560
+ "num_samples": 2000,
561
+ "number_of_characters": 1110647,
562
+ "documents_text_statistics": {
563
+ "total_text_length": 420287,
564
+ "min_text_length": 106,
565
+ "average_text_length": 420.287,
566
+ "max_text_length": 9142,
567
+ "unique_texts": 1000
568
+ },
569
+ "documents_image_statistics": null,
570
+ "queries_text_statistics": {
571
+ "total_text_length": 690360,
572
+ "min_text_length": 2,
573
+ "average_text_length": 690.36,
574
+ "max_text_length": 6473,
575
+ "unique_texts": 956
576
+ },
577
+ "queries_image_statistics": null,
578
+ "relevant_docs_statistics": {
579
+ "num_relevant_docs": 1000,
580
+ "min_relevant_docs_per_query": 1,
581
+ "average_relevant_docs_per_query": 1.0,
582
+ "max_relevant_docs_per_query": 1,
583
+ "unique_relevant_docs": 1000
584
+ },
585
+ "top_ranked_statistics": null
586
+ },
587
+ "php": {
588
+ "num_samples": 2000,
589
+ "number_of_characters": 874248,
590
+ "documents_text_statistics": {
591
+ "total_text_length": 712129,
592
+ "min_text_length": 108,
593
+ "average_text_length": 712.129,
594
+ "max_text_length": 15584,
595
+ "unique_texts": 1000
596
+ },
597
+ "documents_image_statistics": null,
598
+ "queries_text_statistics": {
599
+ "total_text_length": 162119,
600
+ "min_text_length": 5,
601
+ "average_text_length": 162.119,
602
+ "max_text_length": 1240,
603
+ "unique_texts": 911
604
+ },
605
+ "queries_image_statistics": null,
606
+ "relevant_docs_statistics": {
607
+ "num_relevant_docs": 1000,
608
+ "min_relevant_docs_per_query": 1,
609
+ "average_relevant_docs_per_query": 1.0,
610
+ "max_relevant_docs_per_query": 1,
611
+ "unique_relevant_docs": 1000
612
+ },
613
+ "top_ranked_statistics": null
614
+ }
615
+ }
616
+ }
617
+ }
618
+ ```
619
+
620
+ </details>
621
+
622
+ ---
623
+ *This dataset card was automatically generated using [MTEB](https://github.com/embeddings-benchmark/mteb)*