--- pretty_name: BEIR · HotpotQA license: cc-by-sa-4.0 language: - en multilinguality: - monolingual task_categories: - text-retrieval task_ids: - document-retrieval tags: - beir - mteb - retrieval - wikipedia configs: - config_name: corpus data_files: - split: test path: corpus/test-*.parquet - config_name: hard-negatives data_files: - split: train path: hard-negatives/train-*.parquet - config_name: judgments data_files: - split: train path: judgments/train-*.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 - config_name: teacher-scores data_files: - split: train path: teacher-scores/train-*.parquet --- # HotpotQA — BEIR, unified schema A normalised copy of the dataset behind the `mteb` task **`HotpotQA`**, 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/hotpotqa`](https://huggingface.co/datasets/mteb/hotpotqa/tree/ab518f4d6fcca38d87c25209f94beba119d02014) @ `ab518f4d6fcc` (the revision pinned in `mteb`) | | Domain · languages | wikipedia · eng | | Queries / documents / qrels (all splits) | 97,852 / 5,233,329 / 195,704 | | Qrels per query | min 2 · mean 2.0 · max 2 | | Score values | 1 ×14,810 | | Layout | `queries` · `corpus` · `qrels`, split `test`; `queries`/`qrels` also carry `train`, `dev` — one shared corpus; `hard-negatives` and `teacher-scores` for `train` | | Splits | `corpus`: test · `hard-negatives`: train · `judgments`: train · `qrels`: train, dev, test · `queries`: train, dev, test · `teacher-scores`: train | | Training extension | `hard-negatives` and `teacher-scores` for the `train` split are the owner's own mining and scoring ([details](#hard-negatives-and-teacher-scores)); `queries`/`qrels` `train` are the benchmark's training data | | Hard negatives | sources: `dense` · 8,366,684 rows | | Teacher scores | `jinaai/jina-reranker-v3.5` · 8,451,684 rows (positives included) | | Judgments | `judgments`: `typesafe/jev-1.13.0` · 1,890,944 rows | | 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 - `dev`: dropped 92,405 queries that have no qrels in this split (mteb does the same at load time) - `test`: dropped 90,447 queries that have no qrels in this split (mteb does the same at load time) - `train`: dropped 12,852 queries that have no qrels in this split (mteb does the same at load time) - cast `qrels.score` double -> int32 - kept 12,694 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` ## 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` | 85,000 (seeded sample, seed 1) | 8,366,684 (8,366,684 dense) | 8,451,684 | ```python from datasets import load_dataset negatives = load_dataset("Hyukkyu/beir-hotpotqa", "hard-negatives", split="train") scores = load_dataset("Hyukkyu/beir-hotpotqa", "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` | 85,000 | 1,890,944 | 21.2 | 772,261 | 0.64 | skipped | ## Load it ```python from datasets import load_dataset queries = load_dataset("Hyukkyu/beir-hotpotqa", "queries", split="test") corpus = load_dataset("Hyukkyu/beir-hotpotqa", "corpus", split="test") qrels = load_dataset("Hyukkyu/beir-hotpotqa", "qrels", split="test") judgments = load_dataset("Hyukkyu/beir-hotpotqa", "judgments", split="train") ``` ## Cross-check against the previous layout This repo previously held the same dataset in BEIR's raw two-repo form (`Hyukkyu/beir-hotpotqa` + `Hyukkyu/beir-hotpotqa-qrels`; that layout is kept under the git tag `legacy-layout`). Before replacing it, the build was compared against it: corpus id set **identical** (5,233,329 documents); qrels rows per split `test` 14,810 = 14,810, `train` 170,000 = 170,000, `dev` 10,894 = 10,894. ## 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. 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 `None`. This card carries the upstream value as the more conservative choice.