File size: 7,665 Bytes
5a28b58 cef953d 5a28b58 4eb3e64 0a735a1 5a28b58 bdf5f78 5a28b58 cef953d 5a28b58 4eb3e64 0a735a1 92f6e66 cef953d 92f6e66 5a28b58 bdf5f78 5a28b58 cef953d 5a28b58 4eb3e64 0a735a1 5a28b58 bdf5f78 5a28b58 cef953d 5a28b58 4eb3e64 0a735a1 5a28b58 bdf5f78 5a28b58 cef953d 5a28b58 4eb3e64 0a735a1 5a28b58 bdf5f78 5a28b58 66b5d3b 5a28b58 66b5d3b |
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 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 |
---
configs:
- config_name: ConditionalQA-corpus
data_files:
- split: test
path: ConditionalQA/corpus/*
- config_name: ConditionalQA-docs
data_files:
- split: test
path: ConditionalQA/docs/*
- config_name: ConditionalQA-corpus_coref
data_files:
- split: test
path: ConditionalQA/corpus_coref/*
- config_name: ConditionalQA-queries
data_files:
- split: train
path: ConditionalQA/queries/train.parquet
- split: dev
path: ConditionalQA/queries/dev.parquet
- split: test
path: ConditionalQA/queries/test.parquet
- config_name: ConditionalQA-qrels
data_files:
- split: train
path: ConditionalQA/qrels/train.parquet
- split: dev
path: ConditionalQA/qrels/dev.parquet
- split: test
path: ConditionalQA/qrels/test.parquet
- config_name: ConditionalQA-keyphrases
data_files:
- split: test
path: ConditionalQA/keyphrases/*
- config_name: NaturalQuestions-corpus
data_files:
- split: test
path: NaturalQuestions/corpus/*
- config_name: NaturalQuestions-docs
data_files:
- split: test
path: NaturalQuestions/docs/*
- config_name: NaturalQuestions-corpus_coref
data_files:
- split: test
path: NaturalQuestions/corpus_coref/*
- config_name: nq-hard
data_files:
- split: test
path: NaturalQuestions/nq-hard/*
- config_name: NaturalQuestions-queries
data_files:
- split: train
path: NaturalQuestions/queries/train.parquet
- split: dev
path: NaturalQuestions/queries/dev.parquet
- split: test
path: NaturalQuestions/queries/test.parquet
- config_name: NaturalQuestions-qrels
data_files:
- split: train
path: NaturalQuestions/qrels/train.parquet
- split: dev
path: NaturalQuestions/qrels/dev.parquet
- split: test
path: NaturalQuestions/qrels/test.parquet
- config_name: NaturalQuestions-keyphrases
data_files:
- split: test
path: NaturalQuestions/keyphrases/*
- config_name: Genomics-corpus
data_files:
- split: test
path: Genomics/corpus/*
- config_name: Genomics-docs
data_files:
- split: test
path: Genomics/docs/*
- config_name: Genomics-corpus_coref
data_files:
- split: test
path: Genomics/corpus_coref/*
- config_name: Genomics-queries
data_files:
- split: test
path: Genomics/queries/test.parquet
- config_name: Genomics-qrels
data_files:
- split: test
path: Genomics/qrels/test.parquet
- config_name: Genomics-keyphrases
data_files:
- split: test
path: Genomics/keyphrases/*
- config_name: MSMARCO-corpus
data_files:
- split: test
path: MSMARCO/corpus/*
- config_name: MSMARCO-docs
data_files:
- split: test
path: MSMARCO/docs/*
- config_name: MSMARCO-corpus_coref
data_files:
- split: test
path: MSMARCO/corpus_coref/*
- config_name: MSMARCO-queries
data_files:
- split: train
path: MSMARCO/queries/train.parquet
- split: dev
path: MSMARCO/queries/dev.parquet
- split: test
path: MSMARCO/queries/test.parquet
- config_name: MSMARCO-qrels
data_files:
- split: train
path: MSMARCO/qrels/train.parquet
- split: dev
path: MSMARCO/qrels/dev.parquet
- split: test
path: MSMARCO/qrels/test.parquet
- config_name: MSMARCO-keyphrases
data_files:
- split: test
path: MSMARCO/keyphrases/*
- config_name: MIRACL-corpus
data_files:
- split: test
path: MIRACL/corpus/*
- config_name: MIRACL-docs
data_files:
- split: test
path: MIRACL/docs/*
- config_name: MIRACL-corpus_coref
data_files:
- split: test
path: MIRACL/corpus_coref/*
- config_name: MIRACL-queries
data_files:
- split: train
path: MIRACL/queries/train.parquet
- split: dev
path: MIRACL/queries/dev.parquet
- split: test
path: MIRACL/queries/test.parquet
- config_name: MIRACL-qrels
data_files:
- split: train
path: MIRACL/qrels/train.parquet
- split: dev
path: MIRACL/qrels/dev.parquet
- split: test
path: MIRACL/qrels/test.parquet
- config_name: MIRACL-keyphrases
data_files:
- split: test
path: MIRACL/keyphrases/*
---
# DAPR: Document-Aware Passage Retrieval
This datasets repo contains the queries, passages/documents and judgements for the data used in the [DAPR](https://arxiv.org/abs/2305.13915) paper.
## Overview
For the DAPR benchmark, it contains 5 datasets:
| Dataset | #Queries (test) | #Documents | #Passages
| --- | --- | --- | --- |
| MS MARCO | 2,722 | 1,359,163 | 2,383,023* |
| Natural Questions | 3,610 | 108,626 | 2,682,017|
| MIRACL | 799 | 5,758,285 |32,893,221|
| Genomics | 62 | 162,259 |12,641,127|
| ConditionalQA | 271 | 652 |69,199|
And additionally, NQ-hard, the hard subset of queries from Natural Questions is also included (516 in total). These queries are hard because understanding the document context (e.g. coreference, main topic, multi-hop reasoning, and acronym) is necessary for retrieving the relevant passages.
> Notes: for MS MARCO, its documents do not provide the gold paragraph segmentation and we only segment the document by keeping the judged passages (from the MS MARCO Passage Ranking task) standing out while leaving the rest parts surrounding these passages. These passages are marked by `is_candidate==true`.
## Load the dataset
### Loading the passages
One can load the passages like this:
```python
from datasets import load_dataset
dataset_name = "ConditionalQA"
passages = load_dataset("kwang2049/dapr", f"{dataset_name}-corpus", split="test")
for passage in passages:
passage["_id"] # passage id
passage["text"] # passage text
passage["title"] # doc title
passage["doc_id"]
passage["paragraph_no"] # the paragraph number within the document
passage["total_paragraphs"] # how many paragraphs/passages in total in the document
passage["is_candidate"] # is this passage a candidate for retrieval
```
Or strem the dataset without downloading it beforehand:
```python
from datasets import load_dataset
dataset_name = "ConditionalQA"
passages = load_dataset(
"kwang2049/dapr", f"{dataset_name}-corpus", split="test", streaming=True
)
for passage in passages:
passage["_id"] # passage id
passage["text"] # passage text
passage["title"] # doc title
passage["doc_id"]
passage["paragraph_no"] # the paragraph number within the document
passage["total_paragraphs"] # how many paragraphs/passages in total in the document
passage["is_candidate"] # is this passage a candidate for retrieval
```
### Loading the qrels
The qrels split contains the query relevance annotation, i.e., it contains the relevance score for (query, passage) pairs.
```python
from datasets import load_dataset
dataset_name = "ConditionalQA"
qrels = load_dataset("kwang2049/dapr", f"{dataset_name}-qrels", split="test")
for qrel in qrels:
qrel["query_id"] # query id (the text is available in ConditionalQA-queries)
qrel["corpus_id"] # passage id
qrel["score"] # gold judgement
```
We present the NQ-hard dataset in an extended format of the normal qrels with additional columns:
```python
from datasets import load_dataset
qrels = load_dataset("kwang2049/dapr", "nq-hard", split="test")
for qrel in qrels:
qrel["query_id"] # query id (the text is available in ConditionalQA-queries)
qrel["corpus_id"] # passage id
qrel["score"] # gold judgement
# Additional columns:
qrel["query"] # query text
qrel["text"] # passage text
qrel["title"] # doc title
qrel["doc_id"]
qrel["categories"] # list of categories about this query-passage pair
qrel["url"] # url to the document in Wikipedia
```
## Note
This dataset was created with `datasets==2.15.0`. Make sure to use this or a newer version of the datasets library. |