Datasets:
Tasks:
Text Retrieval
Modalities:
Text
Formats:
parquet
Languages:
English
Size:
100K - 1M
Tags:
Synthetic
long-documents
document-retrieval
information-retrieval
contrastive-learning
graded-relevance
License:
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -1,9 +1,18 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: cc-by-sa-4.0
|
| 3 |
-
task_categories:
|
| 4 |
-
- text-retrieval
|
| 5 |
language:
|
| 6 |
- en
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
size_categories:
|
| 8 |
- 10K<n<100K
|
| 9 |
configs:
|
|
@@ -25,73 +34,238 @@ configs:
|
|
| 25 |
path: default/test.parquet
|
| 26 |
---
|
| 27 |
|
| 28 |
-
# GoodWiki-Long
|
| 29 |
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
(originals → queries) and [`devrim/goodwiki_long_synthetic`](https://huggingface.co/datasets/devrim/goodwiki_long_synthetic)
|
| 34 |
-
(LLM-rephrased pairs + topical distractors → corpus).
|
| 35 |
|
| 36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
| `queries` | `queries` | 17,854 |
|
| 42 |
-
| `default` | `train`, `val`, `test` | 30,000 / 6,000 / 17,562 |
|
| 43 |
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
| `test` | 5,854 | 17,562 |
|
| 53 |
|
| 54 |
-
|
| 55 |
-
upload. A query's split is determined by which qrels split it appears in.
|
| 56 |
|
| 57 |
-
|
|
|
|
|
|
|
| 58 |
|
| 59 |
-
|
| 60 |
-
|
|
| 61 |
-
|
|
| 62 |
-
| `
|
| 63 |
-
| `
|
| 64 |
-
| `
|
| 65 |
-
| `
|
| 66 |
-
| `other_article_id` | string | id of the secondary article mixed in (only meaningful for `distractor`) |
|
| 67 |
-
| `primary_topic` | string | source article title + short description |
|
| 68 |
-
| `integration_topic` | string | secondary article title + short description |
|
| 69 |
|
| 70 |
### `queries`
|
| 71 |
-
|
| 72 |
-
|
|
| 73 |
-
|
|
| 74 |
-
| `
|
| 75 |
-
| `
|
| 76 |
-
| `
|
| 77 |
-
| `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 78 |
|
| 79 |
### `default` (qrels)
|
| 80 |
-
| field | type | notes |
|
| 81 |
-
|---|---|---|
|
| 82 |
-
| `query-id` | string | reference to `queries._id` |
|
| 83 |
-
| `corpus-id` | string | reference to `corpus._id` |
|
| 84 |
-
| `score` | int | 2 if the corpus doc is a `pair` (true paraphrase), 1 if `distractor` (partial topical overlap) |
|
| 85 |
|
| 86 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 87 |
|
| 88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 89 |
|
| 90 |
```python
|
| 91 |
from datasets import load_dataset
|
| 92 |
|
| 93 |
-
corpus = load_dataset("devrim/goodwiki_long_synthetic_ir", "corpus", split="corpus")
|
| 94 |
queries = load_dataset("devrim/goodwiki_long_synthetic_ir", "queries", split="queries")
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: GoodWiki-Long-Synthetic (IR format)
|
| 3 |
license: cc-by-sa-4.0
|
|
|
|
|
|
|
| 4 |
language:
|
| 5 |
- en
|
| 6 |
+
task_categories:
|
| 7 |
+
- text-retrieval
|
| 8 |
+
tags:
|
| 9 |
+
- synthetic
|
| 10 |
+
- long-documents
|
| 11 |
+
- document-retrieval
|
| 12 |
+
- information-retrieval
|
| 13 |
+
- contrastive-learning
|
| 14 |
+
- graded-relevance
|
| 15 |
+
- beir
|
| 16 |
size_categories:
|
| 17 |
- 10K<n<100K
|
| 18 |
configs:
|
|
|
|
| 34 |
path: default/test.parquet
|
| 35 |
---
|
| 36 |
|
| 37 |
+
# GoodWiki-Long-Synthetic (IR format)
|
| 38 |
|
| 39 |
+
A long-document, **document-to-document** retrieval dataset for training and evaluating
|
| 40 |
+
retrievers over multi-thousand-word inputs, published in the canonical BEIR/MTEB
|
| 41 |
+
tri-config layout (`queries`, `corpus`, `default` qrels).
|
|
|
|
|
|
|
| 42 |
|
| 43 |
+
Queries are complete English Wikipedia articles taken from GoodWiki and filtered to
|
| 44 |
+
long-form content: every query exceeds 16,000 characters, and the pool averages
|
| 45 |
+
**5,123 words / 6,912 tokens** per document (median 4,305 words / 5,817 tokens,
|
| 46 |
+
`tiktoken` `cl100k_base`). The corpus holds model-generated documents about those
|
| 47 |
+
articles: one **fully relevant** rephrased counterpart per query, plus two
|
| 48 |
+
**partially relevant** topical distractors that centre a different article and weave
|
| 49 |
+
the query's subject through it. Relevance is therefore **graded** (`score` 2 / 1 / 0),
|
| 50 |
+
which makes the dataset usable both as contrastive training data with hard negatives
|
| 51 |
+
and as a ranking-robustness benchmark.
|
| 52 |
|
| 53 |
+
The asymmetry is deliberate: the long-context burden sits on the query side
|
| 54 |
+
(thousands of tokens), while corpus documents are shorter (median 1,726 tokens),
|
| 55 |
+
which is the regime that document-level retrieval systems have to handle.
|
|
|
|
|
|
|
| 56 |
|
| 57 |
+
| | |
|
| 58 |
+
| --- | --- |
|
| 59 |
+
| Task | Document-to-document retrieval (graded relevance) |
|
| 60 |
+
| Language | English |
|
| 61 |
+
| Queries | 17,854 long-form Wikipedia articles |
|
| 62 |
+
| Corpus | 53,562 model-generated documents (17,854 fully relevant + 35,708 distractors) |
|
| 63 |
+
| Qrels | 53,562 judgements across three query-disjoint splits |
|
| 64 |
+
| Relevance | `2` = fully relevant rephrasal · `1` = topical distractor · `0` = everything else |
|
| 65 |
+
| Query length | mean 6,912 / median 5,817 / p95 13,840 / max 35,927 tokens |
|
| 66 |
+
| Corpus doc length | mean 1,815 / median 1,726 / p95 2,527 / max 32,364 tokens |
|
| 67 |
|
| 68 |
+
Length statistics are measured on the released files with `tiktoken` `cl100k_base`,
|
| 69 |
+
computed on the decoded document text (see [Usage](#usage)). The paper's Table 1
|
| 70 |
+
reports slightly different token statistics for the corpus side, consistent with
|
| 71 |
+
measurement over the raw serialized strings rather than the decoded text.
|
|
|
|
| 72 |
|
| 73 |
+
## Dataset structure
|
|
|
|
| 74 |
|
| 75 |
+
Three configs. `queries` and `corpus` are **single shared pools** with one split each;
|
| 76 |
+
splits exist only on the qrels config, so a query from any split is scored against the
|
| 77 |
+
*entire* corpus and documents belonging to other queries act as hard negatives.
|
| 78 |
|
| 79 |
+
| config | split | rows |
|
| 80 |
+
| --- | --- | --- |
|
| 81 |
+
| `queries` | `queries` | 17,854 |
|
| 82 |
+
| `corpus` | `corpus` | 53,562 |
|
| 83 |
+
| `default` | `train` | 30,000 |
|
| 84 |
+
| `default` | `val` | 6,000 |
|
| 85 |
+
| `default` | `test` | 17,562 |
|
|
|
|
|
|
|
|
|
|
| 86 |
|
| 87 |
### `queries`
|
| 88 |
+
|
| 89 |
+
| field | type | description |
|
| 90 |
+
| --- | --- | --- |
|
| 91 |
+
| `_id` | `string` | Wikipedia article id; referenced by `query-id` in qrels and by `reference_article_id` in the corpus |
|
| 92 |
+
| `text` | `string` | Full article body in structured markdown, opening with a `#` title heading |
|
| 93 |
+
| `title` | `string` | Article title |
|
| 94 |
+
| `description` | `string` | One-line article description |
|
| 95 |
+
| `categories` | `list[string]` | Wikipedia categories of the article |
|
| 96 |
+
|
| 97 |
+
### `corpus`
|
| 98 |
+
|
| 99 |
+
| field | type | description |
|
| 100 |
+
| --- | --- | --- |
|
| 101 |
+
| `_id` | `string` | Document id of the form `req-<hash>-<i>-<k>`; `k=1` is the fully relevant document, `k=2` and `k=3` its two distractors |
|
| 102 |
+
| `text` | `string` | Model-generated document, stored as a **JSON-encoded string literal** (decode with `json.loads`, see [Usage](#usage)) |
|
| 103 |
+
| `article_type` | `string` | `pair` (17,854 rows, fully relevant) or `distractor` (35,708 rows, partially relevant) |
|
| 104 |
+
| `reference_article_id` | `string` | `_id` of the query article this document is judged against |
|
| 105 |
+
| `other_article_id` | `string` | `_id` of the second article involved in generation (always another article from the query pool; 16,957 distinct values) |
|
| 106 |
+
| `primary_topic` | `string` | Title + description of the document's main subject: the reference article for `pair` rows, the other article for `distractor` rows |
|
| 107 |
+
| `integration_topic` | `string` | Title + description of the secondary subject woven into the document: the other article for `pair` rows, the reference article for `distractor` rows |
|
| 108 |
+
|
| 109 |
+
Every query article has exactly three corpus documents — one `pair` and two `distractor`
|
| 110 |
+
rows — and every corpus document appears in exactly one qrels row.
|
| 111 |
|
| 112 |
### `default` (qrels)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
+
| field | type | description |
|
| 115 |
+
| --- | --- | --- |
|
| 116 |
+
| `query-id` | `string` | Reference to `queries._id` |
|
| 117 |
+
| `corpus-id` | `string` | Reference to `corpus._id` |
|
| 118 |
+
| `score` | `int64` | `2` if the document is the fully relevant rephrasal, `1` if it is a topical distractor |
|
| 119 |
+
|
| 120 |
+
| split | unique queries | qrels rows | `score=2` | `score=1` |
|
| 121 |
+
| --- | --- | --- | --- | --- |
|
| 122 |
+
| `train` | 10,000 | 30,000 | 10,000 | 20,000 |
|
| 123 |
+
| `val` | 2,000 | 6,000 | 2,000 | 4,000 |
|
| 124 |
+
| `test` | 5,854 | 17,562 | 5,854 | 11,708 |
|
| 125 |
|
| 126 |
+
The three splits are query-disjoint and together cover all 17,854 queries. Each query
|
| 127 |
+
carries exactly three judgements: one at `score=2` and two at `score=1`. A query's split
|
| 128 |
+
membership is defined solely by which qrels split it appears in.
|
| 129 |
+
|
| 130 |
+
## Usage
|
| 131 |
|
| 132 |
```python
|
| 133 |
from datasets import load_dataset
|
| 134 |
|
|
|
|
| 135 |
queries = load_dataset("devrim/goodwiki_long_synthetic_ir", "queries", split="queries")
|
| 136 |
+
corpus = load_dataset("devrim/goodwiki_long_synthetic_ir", "corpus", split="corpus")
|
| 137 |
+
|
| 138 |
+
train = load_dataset("devrim/goodwiki_long_synthetic_ir", "default", split="train")
|
| 139 |
+
val = load_dataset("devrim/goodwiki_long_synthetic_ir", "default", split="val")
|
| 140 |
+
test = load_dataset("devrim/goodwiki_long_synthetic_ir", "default", split="test")
|
| 141 |
+
```
|
| 142 |
+
|
| 143 |
+
Corpus documents are stored as JSON string literals (surrounding quotes, escaped
|
| 144 |
+
newlines and unicode). Decode them before use — this holds for all 53,562 rows:
|
| 145 |
+
|
| 146 |
+
```python
|
| 147 |
+
import json
|
| 148 |
+
|
| 149 |
+
corpus = corpus.map(lambda r: {"text": json.loads(r["text"])})
|
| 150 |
+
```
|
| 151 |
+
|
| 152 |
+
Assembling BEIR-style qrels and pools for evaluation:
|
| 153 |
+
|
| 154 |
+
```python
|
| 155 |
+
from collections import defaultdict
|
| 156 |
+
|
| 157 |
+
qrels = defaultdict(dict)
|
| 158 |
+
for row in test:
|
| 159 |
+
qrels[row["query-id"]][row["corpus-id"]] = row["score"]
|
| 160 |
+
|
| 161 |
+
query_pool = {r["_id"]: r["text"] for r in queries if r["_id"] in qrels}
|
| 162 |
+
doc_pool = {r["_id"]: json.loads(r["text"]) for r in corpus} # full pool, all splits
|
| 163 |
+
```
|
| 164 |
+
|
| 165 |
+
## Relevance semantics and intended use
|
| 166 |
+
|
| 167 |
+
Labels are graded rather than binary:
|
| 168 |
+
|
| 169 |
+
- **`score = 2` — fully relevant.** A rephrased counterpart of the query article,
|
| 170 |
+
covering the same subject. This is the single correct answer for the query.
|
| 171 |
+
- **`score = 1` — partially relevant.** A topical distractor: a document primarily
|
| 172 |
+
about a *different* article, with the query's subject integrated into it. It shares
|
| 173 |
+
real content with the query but is not the right answer.
|
| 174 |
+
- **`score = 0` — irrelevant.** Every other document in the pool (the default; these
|
| 175 |
+
are not materialised as rows).
|
| 176 |
+
|
| 177 |
+
**Training.** The fully relevant document is the positive of a contrastive pair; the two
|
| 178 |
+
distractors enter as partial matches at a reduced target weight rather than as hard
|
| 179 |
+
negatives with a fully negative target, and the remaining in-batch documents are
|
| 180 |
+
negatives. This gives every anchor a graded three-way supervision signal — full match,
|
| 181 |
+
partial match, negative — instead of the usual positive/negative split.
|
| 182 |
+
|
| 183 |
+
**Evaluation.** Graded metrics (nDCG with the standard `2^rel - 1` gain) let distractors
|
| 184 |
+
earn partial credit, so a run is measured not only on whether it retrieves the correct
|
| 185 |
+
document, but on whether it ranks near-miss documents above unrelated ones. Because the
|
| 186 |
+
corpus is a single shared pool, every query competes against all 53,562 documents,
|
| 187 |
+
including those attached to queries in other splits.
|
| 188 |
+
|
| 189 |
+
## Construction
|
| 190 |
+
|
| 191 |
+
1. **Source selection.** Long-form English Wikipedia articles from GoodWiki, a cleaned
|
| 192 |
+
Wikipedia release in structured markdown, filtered to articles above 16,000
|
| 193 |
+
characters (roughly a four-thousand-token floor). These become the query pool
|
| 194 |
+
unchanged, with their original text, title, description and categories.
|
| 195 |
+
2. **Fully relevant document generation.** For each query article, GPT-4o-mini writes a
|
| 196 |
+
rephrased document whose main subject is that article, with a second, unrelated
|
| 197 |
+
article named as a secondary theme that the text typically weaves in as framing or
|
| 198 |
+
analogy. The result remains about the query's subject and is labelled `score = 2`.
|
| 199 |
+
3. **Topical distractor generation.** For each query article, two further documents are
|
| 200 |
+
generated with the roles reversed: another article from the pool is the main subject
|
| 201 |
+
and the query's article is the integrated secondary theme. These share genuine
|
| 202 |
+
content with the query without answering it, and are labelled `score = 1`.
|
| 203 |
+
The shared generation recipe is what makes the distractors topically entangled with
|
| 204 |
+
the query rather than randomly sampled.
|
| 205 |
+
4. **Validation.** The assembled dataset is checked for duplicate ids in either pool and
|
| 206 |
+
for referential integrity of every qrels row against both pools; the released files
|
| 207 |
+
pass with unique ids throughout and no dangling references.
|
| 208 |
+
5. **IR assembly.** Documents are collected into one shared corpus, source articles into
|
| 209 |
+
one shared query pool, and judgements into query-disjoint `train` / `val` / `test`
|
| 210 |
+
qrels — the tri-config layout above.
|
| 211 |
+
|
| 212 |
+
All `corpus` text is **model output**, not human-written Wikipedia prose. Only the
|
| 213 |
+
`queries` config contains original article text.
|
| 214 |
+
|
| 215 |
+
## Provenance and licensing
|
| 216 |
+
|
| 217 |
+
Query text comes from English Wikipedia by way of GoodWiki
|
| 218 |
+
([source](https://github.com/euirim/goodwiki)), a cleaned markdown release of Good and
|
| 219 |
+
Featured English Wikipedia articles. Wikipedia article text is licensed
|
| 220 |
+
**CC BY-SA 4.0**, and this dataset is released under the same license so that
|
| 221 |
+
share-alike and attribution are preserved downstream. The GoodWiki extraction tooling
|
| 222 |
+
and its own packaging are separately MIT-licensed by their author.
|
| 223 |
+
|
| 224 |
+
Corpus documents are machine-generated with GPT-4o-mini and are marked as synthetic
|
| 225 |
+
through the `article_type` field and this card; they are model output about Wikipedia
|
| 226 |
+
subjects, not verbatim Wikipedia content, and they are not a factual reference. Beyond
|
| 227 |
+
what is already public in Wikipedia articles, the dataset contains no personal or
|
| 228 |
+
personally identifying information, and no human subjects were involved in its creation.
|
| 229 |
+
|
| 230 |
+
## Limitations and considerations
|
| 231 |
+
|
| 232 |
+
- **Synthetic corpus text.** Rephrased and distractor documents carry the stylistic and
|
| 233 |
+
factual artifacts of the generating model — reformulated emphasis, occasional
|
| 234 |
+
embellishment, and drift from the source article's facts. They should not be treated
|
| 235 |
+
as an accurate account of their subject.
|
| 236 |
+
- **Not a clean paraphrase.** A `score = 2` document is a condensed restatement, not a
|
| 237 |
+
length-matched paraphrase: it is far shorter than its source article (median 1,726
|
| 238 |
+
vs. 5,817 tokens) and it carries a woven-in secondary theme from an unrelated article,
|
| 239 |
+
as recorded in `integration_topic`.
|
| 240 |
+
- **Heuristic partial labels.** The `score = 1` label follows from how a document was
|
| 241 |
+
constructed (the query's article was the injected secondary theme), not from human
|
| 242 |
+
judgement of topical closeness. The actual degree of overlap varies, and unlabelled
|
| 243 |
+
documents elsewhere in the pool may be more related to a query than its own
|
| 244 |
+
distractors are.
|
| 245 |
+
- **Lexical leakage.** Because a fully relevant document restates its source article, it
|
| 246 |
+
retains considerable surface overlap with the query, which flatters lexical matching
|
| 247 |
+
and inflates absolute scores relative to harder retrieval benchmarks.
|
| 248 |
+
- **Text encoding.** Corpus `text` values are JSON string literals rather than plain
|
| 249 |
+
strings and must be decoded; skipping this leaves escape sequences and enclosing
|
| 250 |
+
quotes in the input.
|
| 251 |
+
- **Coverage.** English only, and Wikipedia's Good and Featured articles skew toward
|
| 252 |
+
well-documented, encyclopedically popular subjects.
|
| 253 |
+
|
| 254 |
+
## Citation
|
| 255 |
+
|
| 256 |
+
```bibtex
|
| 257 |
+
@inproceedings{cavusoglu2026reign,
|
| 258 |
+
title = {{REIGN}: Refurbished Embeddings with Integrated Guidance Networks for Efficient Context-Length Scaling},
|
| 259 |
+
author = {{\c{C}}avu{\c{s}}o{\u{g}}lu, Devrim and Akba{\c{s}}, Emre},
|
| 260 |
+
booktitle = {Findings of the Association for Computational Linguistics: {EMNLP} 2026},
|
| 261 |
+
year = {2026},
|
| 262 |
+
publisher = {Association for Computational Linguistics},
|
| 263 |
+
note = {To appear}
|
| 264 |
+
}
|
| 265 |
```
|
| 266 |
+
|
| 267 |
+
## Links
|
| 268 |
+
|
| 269 |
+
- Code: https://github.com/devrimcavusoglu/reign
|
| 270 |
+
- Project page: https://devrimcavusoglu.github.io/reign
|
| 271 |
+
- Paper: arXiv link coming soon
|