| | --- |
| | dataset_info: |
| | - config_name: bm25 |
| | features: |
| | - name: query-id |
| | dtype: string |
| | - name: corpus-ids |
| | list: string |
| | splits: |
| | - name: go |
| | num_bytes: 578229 |
| | num_examples: 50 |
| | - name: java |
| | num_bytes: 865210 |
| | num_examples: 50 |
| | - name: javascript |
| | num_bytes: 631841 |
| | num_examples: 50 |
| | - name: php |
| | num_bytes: 683511 |
| | num_examples: 50 |
| | - name: python |
| | num_bytes: 673168 |
| | num_examples: 50 |
| | - name: ruby |
| | num_bytes: 635258 |
| | num_examples: 50 |
| | download_size: 669346 |
| | dataset_size: 4067217 |
| | - config_name: corpus |
| | features: |
| | - name: _id |
| | dtype: string |
| | - name: text |
| | dtype: string |
| | splits: |
| | - name: go |
| | num_bytes: 5866161 |
| | num_examples: 10000 |
| | - name: java |
| | num_bytes: 8383266 |
| | num_examples: 10000 |
| | - name: javascript |
| | num_bytes: 6817497 |
| | num_examples: 6483 |
| | - name: php |
| | num_bytes: 8308232 |
| | num_examples: 10000 |
| | - name: python |
| | num_bytes: 12057318 |
| | num_examples: 10000 |
| | - name: ruby |
| | num_bytes: 1456896 |
| | num_examples: 2279 |
| | download_size: 17919374 |
| | dataset_size: 42889370 |
| | - config_name: qrels |
| | features: |
| | - name: query-id |
| | dtype: string |
| | - name: corpus-id |
| | dtype: string |
| | splits: |
| | - name: go |
| | num_bytes: 11666 |
| | num_examples: 50 |
| | - name: java |
| | num_bytes: 17154 |
| | num_examples: 50 |
| | - name: javascript |
| | num_bytes: 12376 |
| | num_examples: 50 |
| | - name: php |
| | num_bytes: 13456 |
| | num_examples: 50 |
| | - name: python |
| | num_bytes: 13454 |
| | num_examples: 50 |
| | - name: ruby |
| | num_bytes: 12948 |
| | num_examples: 50 |
| | download_size: 61488 |
| | dataset_size: 81054 |
| | - config_name: queries |
| | features: |
| | - name: _id |
| | dtype: string |
| | - name: text |
| | dtype: string |
| | splits: |
| | - name: go |
| | num_bytes: 11803 |
| | num_examples: 50 |
| | - name: java |
| | num_bytes: 19923 |
| | num_examples: 50 |
| | - name: javascript |
| | num_bytes: 15444 |
| | num_examples: 50 |
| | - name: php |
| | num_bytes: 19306 |
| | num_examples: 50 |
| | - name: python |
| | num_bytes: 22227 |
| | num_examples: 50 |
| | - name: ruby |
| | num_bytes: 30739 |
| | num_examples: 50 |
| | download_size: 82419 |
| | dataset_size: 119442 |
| | configs: |
| | - config_name: bm25 |
| | data_files: |
| | - split: go |
| | path: bm25/go-* |
| | - split: java |
| | path: bm25/java-* |
| | - split: javascript |
| | path: bm25/javascript-* |
| | - split: php |
| | path: bm25/php-* |
| | - split: python |
| | path: bm25/python-* |
| | - split: ruby |
| | path: bm25/ruby-* |
| | - config_name: corpus |
| | data_files: |
| | - split: go |
| | path: corpus/go-* |
| | - split: java |
| | path: corpus/java-* |
| | - split: javascript |
| | path: corpus/javascript-* |
| | - split: php |
| | path: corpus/php-* |
| | - split: python |
| | path: corpus/python-* |
| | - split: ruby |
| | path: corpus/ruby-* |
| | - config_name: qrels |
| | data_files: |
| | - split: go |
| | path: qrels/go-* |
| | - split: java |
| | path: qrels/java-* |
| | - split: javascript |
| | path: qrels/javascript-* |
| | - split: php |
| | path: qrels/php-* |
| | - split: python |
| | path: qrels/python-* |
| | - split: ruby |
| | path: qrels/ruby-* |
| | - config_name: queries |
| | data_files: |
| | - split: go |
| | path: queries/go-* |
| | - split: java |
| | path: queries/java-* |
| | - split: javascript |
| | path: queries/javascript-* |
| | - split: php |
| | path: queries/php-* |
| | - split: python |
| | path: queries/python-* |
| | - split: ruby |
| | path: queries/ruby-* |
| | --- |
| | |
| | 🚧 This dataset is currently under construction. Specifications may change. |
| |
|
| |
|
| | # NanoCodeSearchNet (with bm25 subset) |
| |
|
| | A lightweight, evaluation-ready subset of [CodeSearchNet](https://huggingface.co/datasets/code-search-net/code_search_net), designed for fast code-retrieval benchmarking. |
| |
|
| | ## What this dataset is |
| |
|
| | - A code-retrieval benchmark with 6 programming-language splits: `go`, `java`, `javascript`, `php`, `python`, `ruby`. |
| | - Each split contains 50 queries and up to 10,000 code snippets. |
| | - Queries are function docstrings and positives are corresponding function bodies. |
| |
|
| | ## Data structure |
| |
|
| | - `corpus`: `_id`, `text` |
| | - `queries`: `_id`, `text` |
| | - `qrels`: `query-id`, `corpus-id`, `score` |
| | - `bm25`: `query-id`, `corpus-ids` (A bm25 subset is included for first-stage retrieval and reranking experiments.) |
| |
|
| | ## Performance Comparison Across Models |
| |
|
| |
|
| | | Model | avg | Go | Java | JavaScript | PHP | Python | Ruby | |
| | |---|---:|---:|---:|---:|---:|---:|---:| |
| | | bm25 | 0.4295 | 0.3644 | 0.3952 | 0.3308 | 0.2311 | 0.9552 | 0.3005 | |
| | | e5-small | 0.7268 | 0.6805 | 0.7884 | 0.6386 | 0.6603 | 0.9142 | 0.6788 | |
| | | e5-large | 0.7836 | 0.7595 | 0.8287 | 0.6942 | 0.7291 | 0.9513 | 0.7391 | |
| | | bge-m3 | 0.7107 | 0.6643 | 0.6934 | 0.6138 | 0.6229 | 0.9852 | 0.6844 | |
| |
|
| | ## Subset names |
| |
|
| | - Split names: `go`, `java`, `javascript`, `php`, `python`, `ruby` |
| | - Config names: `corpus`, `queries`, `qrels`, `bm25` |
| |
|
| | ## BM25 tokenization strategy |
| |
|
| | - `bm25` was generated with `--auto-select-best-splitter`. |
| | - Candidate strategies: `transformer`, `stemmer`, `wordseg`, `nltk_stem`, `nltk_stem_stop`, `english_regex`, `english_porter`, `english_porter_stop`, `whitespace`. |
| | - Selection metric: best `nDCG@100` per split. |
| |
|
| | Selected strategy by split: |
| |
|
| | | Split | Strategy | Details | |
| | |---|---|---| |
| | | `go` | `transformer` | tokenizer: `Qwen/Qwen3-0.6B` | |
| | | `java` | `transformer` | tokenizer: `Qwen/Qwen3-0.6B` | |
| | | `javascript` | `transformer` | tokenizer: `Qwen/Qwen3-0.6B` | |
| | | `php` | `transformer` | tokenizer: `Qwen/Qwen3-0.6B` | |
| | | `python` | `transformer` | tokenizer: `Qwen/Qwen3-0.6B` | |
| | | `ruby` | `transformer` | tokenizer: `Qwen/Qwen3-0.6B` | |
| |
|
| | ## Upstream source |
| |
|
| | - Original dataset: [code-search-net/code_search_net](https://huggingface.co/datasets/code-search-net/code_search_net) |
| | - Paper: [CodeSearchNet Challenge (1909.09436)](https://huggingface.co/papers/1909.09436) |
| |
|
| | ## License |
| |
|
| | Other. This dataset is derived from CodeSearchNet and follows upstream repository licensing and attribution requirements. |