File size: 9,678 Bytes
f72249f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
f69de91
 
 
 
f72249f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ddc732d
df4166c
 
 
f72249f
b064391
f72249f
 
 
 
 
 
 
 
 
 
 
 
ddc732d
f72249f
 
 
 
 
 
 
 
cebab6d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
df4166c
cebab6d
 
 
 
 
 
 
f69de91
 
ddc732d
f69de91
ddc732d
 
 
f69de91
 
 
df4166c
 
 
 
 
f69de91
f72249f
 
 
 
ddc732d
 
 
 
f72249f
 
 
 
 
 
 
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
---
pretty_name: Training · AllNLI
license: cc-by-sa-4.0
language:
- en
multilinguality:
- monolingual
task_categories:
- text-retrieval
task_ids:
- document-retrieval
tags:
- train
- mteb
- retrieval
- NLI
configs:
- config_name: corpus
  data_files:
  - split: train
    path: corpus/train-*.parquet
- config_name: hard-negatives
  data_files:
  - split: dev
    path: hard-negatives/dev-*.parquet
  - split: test
    path: hard-negatives/test-*.parquet
  - split: train
    path: hard-negatives/train-*.parquet
- config_name: judgments
  data_files:
  - split: train
    path: judgments/train-*.parquet
- config_name: qrels
  data_files:
  - split: dev
    path: qrels/dev-*.parquet
  - split: test
    path: qrels/test-*.parquet
  - split: train
    path: qrels/train-*.parquet
- config_name: queries
  data_files:
  - split: dev
    path: queries/dev-*.parquet
  - split: test
    path: queries/test-*.parquet
  - split: train
    path: queries/train-*.parquet
- config_name: teacher-scores
  data_files:
  - split: train
    path: teacher-scores/train-*.parquet
---
# AllNLI — Training, unified schema

A normalised copy of the dataset behind the `mteb` task **`AllNLI`**, a retrieval **training** set built from [`sentence-transformers/all-nli`](https://huggingface.co/datasets/sentence-transformers/all-nli). Same queries, documents
and relevance judgements as the benchmark evaluates — reshaped into one strict schema shared by every dataset
in this collection.

|  |  |
|---|---|
| Source | [`sentence-transformers/all-nli`](https://huggingface.co/datasets/sentence-transformers/all-nli/tree/d482672c8e74ce18da116f430137434ba2e52fab) @ `d482672c8e74` (the revision pinned in `mteb`) |
| Domain · languages | NLI · eng |
| Queries / documents / qrels (all splits) | 294,930 / 620,710 / 345,225 |
| Qrels per query | min 1 · mean 1.098 · max 3 |
| Score values | 1 ×6,821 |
| Layout | `queries` · `corpus` · `qrels` · `hard-negatives` · `teacher-scores`, split `train`; `queries`/`qrels`/`hard-negatives` also carry `dev`, `test` — one shared corpus |
| Splits | `corpus`: train · `hard-negatives`: train, dev, test · `judgments`: train · `qrels`: train, dev, test · `queries`: train, dev, test · `teacher-scores`: train |
| Hard negatives | sources: `dataset`, `dense` · 10,242,620 rows |
| Teacher scores | `jinaai/jina-reranker-v3.5` · 10,091,017 rows (positives included) |
| Judgments | `judgments`: `typesafe/jev-1.13.0` · 2,913,796 rows |
| Ids | `sha1(text)[:20]`; identical texts collapse to one document (849,330 collapsed) |
| Pair recovery | 671,325 of 671,325 source pairs reconstructed from `queries` × `qrels` × `corpus` with byte-equal text |
| Direction | symmetric source: the first text is the query, the second the document — a convention, both texts are in the corpus |
| 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 |
| `hard-negatives` | `query-id: string`, `corpus-id: string`, `rank: int32`, `source: string` | one row per mined negative; `(query-id, corpus-id, source)` unique; never a labelled positive of the same query |
| `teacher-scores` | `query-id: string`, `corpus-id: string`, `teacher: string`, `score: float32` | one row per scored pair (positives included); a row *means* scored — never a placeholder |
| `judgments` | `query-id: string`, `corpus-id: string`, `judge: string`, `role: string`, `p_yes: float64`, `round: int32` | one row per judged pair; `role` is `positive` (the training positive) or `candidate` (a mined candidate, never a labelled positive or a labelled negative); `p_yes` in [0, 1]; `round` 0 the first request, 1.. the top-ups |

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

- **byte-preserved** all text — no whitespace, newline, or control-character normalisation

## Hard negatives and teacher scores

Filled by the owner's annotation pipeline (`annotation=jina35`) for the `train` split of the
query set(s) below; queries without a labelled positive are left out.

- **Candidates**: dense retrieval with `jinaai/jina-embeddings-v5-text-small` over the full corpus to depth 1,000;
  100 candidates per query drawn from the rank windows 1–30 (30), 31–100 (30), 101–300 (20), 301–1000 (20), the query's labelled positives excluded.
  `rank` is the dense rank; `source` is `dense` for a mined row and `dataset` for a negative the source labels itself
  (those are kept for every query of the split, sampled or not).
- **Teacher**: `jinaai/jina-reranker-v3.5`, listwise: a query's positive and all of its candidates are scored together in one
  context of up to 32,768 tokens. `score` is the raw cosine score, one row per (query, positive) and per
  (query, candidate); a labelled negative that was also mined is scored once. No filtering is applied to the tables.

| configs | queries | hard negatives | teacher scores |
|---|---:|---:|---:|
| `hard-negatives` · `teacher-scores` | 99,994 (seeded sample, seed 1) | 10,242,620 (324,874 dataset, 9,917,746 dense) | 10,091,017 |

```python
from datasets import load_dataset
negatives = load_dataset("Hyukkyu/train-all-nli", "hard-negatives", split="train")
scores    = load_dataset("Hyukkyu/train-all-nli", "teacher-scores", split="train")
```

## Jev judgments

`judgments` holds, for every query of the training sample (the queries with teacher scores), whether [TypeSafe](https://typesafe.ai)'s Jev (`jev-1.13.0`) judged its training positive and its mined candidates relevant: `p_yes` is Jev's P(yes) for the source's question (e.g. *does the passage answer the query?*). They locate the false negatives among the mined candidates and the mislabelled positives.

- **Requests.** One request per query (`round` 0): its training positive, its candidates whose teacher score taken as (cos + 1) / 2 is at least 0.85 × the positive's (at most 24, the highest scores) and 8 random candidates below that, shuffled under neutral ids, one yes/no question per passage. Queries left with fewer than 7 candidates under their source's cutoff got their next hardest unjudged candidates in rounds 1–2 (25 per request), those still under 10 in rounds 3–8 (12 per request). The dataset's own labelled negatives were never sent. Texts were cut to 256 (query) and 512 (passage) tokens of the `jina-embeddings-v5` small tokenizer. Jev answers a request's passages in one context, so P(yes) is calibrated to these groups: the thresholds below apply to this table, not to single-pair calls.
- **Accuracy** (an audit of 329 pairs from one third of the queries, labelled blind by an LLM (Claude), at the pilot's fixed thresholds 0.35 and 0.15): a candidate at P(yes) ≥ 0.35 was relevant 78% of the time inside the band (n = 89) and 60% below it (n = 30); one under 0.35 was relevant 9% (band, n = 90) and 2% (below the band, n = 45) of the time. A positive under 0.15 was mislabelled 92% of the time (n = 36) in the sources that keep the check; in agnews, hotpotqa, npr, whose positives are right by construction, a further check found Jev's flags right 0%–17% of the time, so their positives are not checked.
- **Use** (the SPARSE loader, `annotation.filter.judge`): a candidate at P(yes) ≥ its source's cutoff (below; fitted on 1,946 labelled pairs) is never a negative; a positive under 0.15 is replaced by the candidate Jev scores highest if that is ≥ 0.8, else the query is dropped; a candidate at ≥ 0.9 can become an extra positive. Compare `p_yes` as a float64 (it is stored as one).

| config | queries | rows | candidates per query | top-up rows | candidate cutoff | positive check |
|---|---:|---:|---:|---:|---:|---|
| `judgments` | 99,994 | 2,913,796 | 28.1 | 869,132 | 0.47 | < 0.15 |

## Decontamination

The training tables (`hard-negatives`, `teacher-scores`, `judgments`) leave out the sampled queries that overlap an evaluation set (6 of 100,000 sampled queries). A query was removed when it equals (normalised) or nearly copies an evaluation query (word 8-grams), or when a labelled positive equals an evaluation document or nearly copies a document that an evaluation query judges relevant (word 13-grams; a near copy shares at least half of the text's sampled shingles with one evaluation text). The evaluation side is the 23 test sets (BEIR, RTEB, LitSearch) and the 6 dev sets. `queries`, `corpus` and `qrels` remain the source's data as converted.

## Load it

```python
from datasets import load_dataset
queries   = load_dataset("Hyukkyu/train-all-nli", "queries", split="train")
corpus    = load_dataset("Hyukkyu/train-all-nli", "corpus", split="train")
qrels     = load_dataset("Hyukkyu/train-all-nli", "qrels", split="train")
judgments = load_dataset("Hyukkyu/train-all-nli", "judgments", split="train")
```

## 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://huggingface.co/datasets/sentence-transformers/all-nli).
This repository is an independent repackaging and is not affiliated with the RTEB or MTEB maintainers.