|
--- |
|
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. |