File size: 5,651 Bytes
721c635 002dae5 e0fa6d6 002dae5 e0fa6d6 002dae5 e0fa6d6 002dae5 e0fa6d6 002dae5 e0fa6d6 002dae5 e0fa6d6 002dae5 1e97b1e 721c635 aa45377 721c635 aa45377 a43eb48 aa45377 544a30a aa45377 c1a1cee aa45377 fad21e3 aa45377 046ae0f fbd0698 6d3bc5e fbd0698 6d3bc5e 0082e35 6d3bc5e 9294012 6d3bc5e 3bfdddc 6d3bc5e 643e34a 6d3bc5e 6dde7e0 1e97b1e fae18b1 1e97b1e fae18b1 70eff3c fae18b1 9dc042e fae18b1 cc4726e fae18b1 24ec4fb fae18b1 3fc3b74 721c635 002dae5 e0fa6d6 721c635 aa45377 fbd0698 6d3bc5e 1e97b1e fae18b1 721c635 cc2fafe f120750 cc2fafe 2fc483e cc2fafe 68115ab 2fc483e cc2fafe 2fc483e cc2fafe 2fc483e b2c9ead 2fc483e ea1f642 f120750 ea1f642 cc2fafe f120750 ea1f642 cc2fafe 5f0f144 2fc483e cc2fafe 2fc483e cc2fafe 82e9ca9 5e8d2c2 82e9ca9 68115ab 5f0f144 68115ab cc2fafe 2fc483e cc2fafe 2fc483e cc2fafe 2fc483e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 |
---
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-*
---
# 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
- Auto selection chooses the best strategy per split using retrieval metrics.
- Strategy types:
- `transformer`: `Qwen/Qwen3-0.6B` tokenizer
- `wordseg`: language-specific word segmentation (`ja`, `zh`, `th`, `ko`)
- `stemmer`: `PyStemmer`
- `whitespace`: `str.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.
|