Datasets:
Tasks:
Text Retrieval
Modalities:
Text
Formats:
parquet
Sub-tasks:
document-retrieval
Languages:
English
Size:
100K - 1M
License:
File size: 4,275 Bytes
09720da c556d02 09720da c556d02 09720da c556d02 09720da c556d02 0b3e22b cd0d968 c556d02 cd0d968 c556d02 0b3e22b c556d02 0b3e22b c556d02 09720da c556d02 09720da c556d02 09720da c556d02 09720da c556d02 09720da c556d02 09720da c556d02 09720da c556d02 | 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 | ---
pretty_name: BEIR · NFCorpus
license: cc-by-sa-4.0
language:
- en
multilinguality:
- monolingual
task_categories:
- text-retrieval
task_ids:
- document-retrieval
tags:
- beir
- mteb
- retrieval
- biomedical
configs:
- config_name: corpus
data_files:
- split: test
path: corpus/test-*.parquet
- config_name: qrels
data_files:
- split: test
path: qrels/test-*.parquet
- split: train
path: qrels/train-*.parquet
- split: dev
path: qrels/dev-*.parquet
- config_name: queries
data_files:
- split: test
path: queries/test-*.parquet
- split: train
path: queries/train-*.parquet
- split: dev
path: queries/dev-*.parquet
---
# NFCorpus — BEIR, unified schema
A normalised copy of the dataset behind the `mteb` task **`NFCorpus`**, one of the tasks of the [BEIR](https://github.com/beir-cellar/beir) benchmark as `mteb` defines it. Same queries, documents
and relevance judgements as the benchmark evaluates — reshaped into one strict schema shared by every dataset
in this collection.
| | |
|---|---|
| Source | [`mteb/nfcorpus`](https://huggingface.co/datasets/mteb/nfcorpus/tree/ec0fa4fe99da2ff19ca1214b7966684033a58814) @ `ec0fa4fe99da` (the revision pinned in `mteb`) |
| Domain · languages | biomedical · eng |
| Queries / documents / qrels (all splits) | 3,237 / 3,633 / 134,294 |
| Qrels per query | min 1 · mean 38.186 · max 475 |
| Score values | 1 ×11,758, 2 ×576 |
| Layout | `queries` · `corpus` · `qrels`, split `test`; `queries`/`qrels` also carry `train`, `dev` — one shared corpus |
| Splits | `qrels`: train, dev, test · `queries`: train, dev, test |
| License | `cc-by-sa-4.0` |
## Schema
| config | columns | rules |
|---|---|---|
| `queries` | `id: string`, `text: string` | ids unique and non-empty; every query has ≥ 1 qrel |
| `corpus` | `id: string`, `title: string`, `text: string` | `title` is always present (`""` when the source has none) |
| `qrels` | `query-id: string`, `corpus-id: string`, `score: int32` | referential integrity to both tables; no duplicate pairs; no floats |
Files are Parquet, sorted by id, zstd-compressed, sharded at 500 MB. Every rule above is enforced by a validator
before publishing; `provenance.json` records the source file hashes, what changed, and the output file hashes.
## What changed from the source
- `dev`: dropped 2,913 queries that have no qrels in this split (mteb does the same at load time)
- `test`: dropped 2,914 queries that have no qrels in this split (mteb does the same at load time)
- `train`: dropped 647 queries that have no qrels in this split (mteb does the same at load time)
- cast `qrels.score` double -> int32
- kept 40 documents whose text is identical to another document's — a property of the source; note that models embed such documents identically and retrieval ties among them are broken by corpus order
- renamed `_id` → `id`
- renamed source splits (`queries`←`queries/queries`, `corpus`←`corpus/corpus`) to `test`
## Load it
```python
from datasets import load_dataset
queries = load_dataset("Hyukkyu/beir-nfcorpus", "queries", split="test")
corpus = load_dataset("Hyukkyu/beir-nfcorpus", "corpus", split="test")
qrels = load_dataset("Hyukkyu/beir-nfcorpus", "qrels", split="test")
```
## Cross-check against the previous layout
This repo previously held the same dataset in BEIR's raw two-repo form (`Hyukkyu/beir-nfcorpus` + `Hyukkyu/beir-nfcorpus-qrels`; that layout is kept under the git tag `legacy-layout`). Before replacing it, the build was compared against it: corpus id set **identical** (3,633 documents); qrels rows per split `test` 12,334 = 12,334, `train` 110,575 = 110,575, `dev` 11,385 = 11,385.
## License and attribution
The data is redistributed under the source's terms — `cc-by-sa-4.0`. All credit belongs to the
original authors; see the source repository and the references in `mteb`'s task metadata (https://www.cl.uni-heidelberg.de/statnlpgroup/nfcorpus/).
This repository is an independent repackaging and is not affiliated with the RTEB or MTEB maintainers.
> **License discrepancy.** The upstream dataset card declares `cc-by-sa-4.0` while `mteb`'s `TaskMetadata` declares `not specified`. This card carries the upstream value as the more conservative choice.
|