train-all-nli / README.md
Hyukkyu's picture
decontamination: training queries that overlap an evaluation set removed from the training tables (strict)
df4166c verified
|
Raw History Blame Contribute Delete
9.68 kB
metadata
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. 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 @ 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
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'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

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.