Add dataset README
Browse files
README.md
CHANGED
|
@@ -1,102 +1,138 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
-
|
| 6 |
-
|
| 7 |
-
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
num_examples: 3461
|
| 16 |
-
- name: test
|
| 17 |
-
num_bytes: 912283
|
| 18 |
-
num_examples: 10557
|
| 19 |
-
download_size: 1741986
|
| 20 |
-
dataset_size: 4028131
|
| 21 |
-
- config_name: corpus
|
| 22 |
-
features:
|
| 23 |
-
- name: id
|
| 24 |
-
dtype: string
|
| 25 |
-
- name: title
|
| 26 |
-
dtype: string
|
| 27 |
-
- name: text
|
| 28 |
-
dtype: string
|
| 29 |
-
splits:
|
| 30 |
-
- name: train
|
| 31 |
-
num_bytes: 5422604
|
| 32 |
-
num_examples: 1572
|
| 33 |
-
download_size: 3371037
|
| 34 |
-
dataset_size: 5422604
|
| 35 |
-
- config_name: qrels
|
| 36 |
-
features:
|
| 37 |
-
- name: query_id
|
| 38 |
-
dtype: string
|
| 39 |
-
- name: corpus_id
|
| 40 |
-
dtype: string
|
| 41 |
-
- name: score
|
| 42 |
-
dtype: int64
|
| 43 |
-
splits:
|
| 44 |
-
- name: train
|
| 45 |
-
num_bytes: 3438435
|
| 46 |
-
num_examples: 32747
|
| 47 |
-
- name: dev
|
| 48 |
-
num_bytes: 363405
|
| 49 |
-
num_examples: 3461
|
| 50 |
-
- name: test
|
| 51 |
-
num_bytes: 1108485
|
| 52 |
-
num_examples: 10557
|
| 53 |
-
download_size: 769624
|
| 54 |
-
dataset_size: 4910325
|
| 55 |
-
- config_name: queries
|
| 56 |
-
features:
|
| 57 |
-
- name: id
|
| 58 |
-
dtype: string
|
| 59 |
-
- name: text
|
| 60 |
-
dtype: string
|
| 61 |
-
splits:
|
| 62 |
-
- name: train
|
| 63 |
-
num_bytes: 3417437
|
| 64 |
-
num_examples: 32747
|
| 65 |
-
- name: dev
|
| 66 |
-
num_bytes: 359091
|
| 67 |
-
num_examples: 3461
|
| 68 |
-
- name: test
|
| 69 |
-
num_bytes: 1105671
|
| 70 |
-
num_examples: 10557
|
| 71 |
-
download_size: 2031982
|
| 72 |
-
dataset_size: 4882199
|
| 73 |
configs:
|
| 74 |
-
- config_name:
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
- config_name: qrels
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
- config_name:
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- question-answering
|
| 5 |
+
- text-retrieval
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- rag
|
| 10 |
+
- narrativeqa
|
| 11 |
+
- reading-comprehension
|
| 12 |
+
- retrieval
|
| 13 |
+
size_categories:
|
| 14 |
+
- 10K<n<100K
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
configs:
|
| 16 |
+
- config_name: corpus
|
| 17 |
+
data_files:
|
| 18 |
+
- split: train
|
| 19 |
+
path: corpus/*
|
| 20 |
+
- config_name: queries
|
| 21 |
+
data_files:
|
| 22 |
+
- split: train
|
| 23 |
+
path: queries/train*
|
| 24 |
+
- split: dev
|
| 25 |
+
path: queries/dev*
|
| 26 |
+
- split: test
|
| 27 |
+
path: queries/test*
|
| 28 |
+
- config_name: qrels
|
| 29 |
+
data_files:
|
| 30 |
+
- split: train
|
| 31 |
+
path: qrels/train*
|
| 32 |
+
- split: dev
|
| 33 |
+
path: qrels/dev*
|
| 34 |
+
- split: test
|
| 35 |
+
path: qrels/test*
|
| 36 |
+
- config_name: answers
|
| 37 |
+
data_files:
|
| 38 |
+
- split: train
|
| 39 |
+
path: answers/train*
|
| 40 |
+
- split: dev
|
| 41 |
+
path: answers/dev*
|
| 42 |
+
- split: test
|
| 43 |
+
path: answers/test*
|
| 44 |
---
|
| 45 |
+
|
| 46 |
+
# NarrativeQA RAG
|
| 47 |
+
|
| 48 |
+
Dataset for Retrieval-Augmented Generation (RAG) based on [NarrativeQA](https://huggingface.co/datasets/deepmind/narrativeqa).
|
| 49 |
+
|
| 50 |
+
## Structure
|
| 51 |
+
|
| 52 |
+
| Subset | Splits | Description |
|
| 53 |
+
|--------|--------|-------------|
|
| 54 |
+
| `corpus` | train (default) | Wikipedia plot summaries shared across all query splits |
|
| 55 |
+
| `queries` | train, dev, test | Reading comprehension questions |
|
| 56 |
+
| `qrels` | train, dev, test | Relevance judgments (query ↔ document) |
|
| 57 |
+
| `answers` | train, dev, test | Reference answers (longest annotated answer) |
|
| 58 |
+
|
| 59 |
+
## Dataset statistics
|
| 60 |
+
|
| 61 |
+
| Split | Queries | Corpus |
|
| 62 |
+
|-------|--------:|-------:|
|
| 63 |
+
| train | 32747 | 1572 |
|
| 64 |
+
| dev | 3461 | 1572 |
|
| 65 |
+
| test | 10557 | 1572 |
|
| 66 |
+
|
| 67 |
+
The corpus is shared across all splits and contains Wikipedia plot summaries (`document.summary.text`) from the original NarrativeQA documents.
|
| 68 |
+
|
| 69 |
+
- **Dev split:** mapped from the original `validation` split
|
| 70 |
+
- **Corpus source:** unique documents from train, validation and test splits
|
| 71 |
+
|
| 72 |
+
## Source
|
| 73 |
+
|
| 74 |
+
| Component | NarrativeQA resource |
|
| 75 |
+
|-----------|----------------------|
|
| 76 |
+
| Train | `train` split from [deepmind/narrativeqa](https://huggingface.co/datasets/deepmind/narrativeqa) |
|
| 77 |
+
| Dev | `validation` split |
|
| 78 |
+
| Test | `test` split |
|
| 79 |
+
| Corpus | `document.summary.text` (+ `document.summary.title`) |
|
| 80 |
+
| Answers | Longest answer text per question |
|
| 81 |
+
|
| 82 |
+
## Schema
|
| 83 |
+
|
| 84 |
+
### corpus
|
| 85 |
+
```json
|
| 86 |
+
{"id": "...", "title": "...", "text": "..."}
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
### queries
|
| 90 |
+
```json
|
| 91 |
+
{"id": "...", "text": "..."}
|
| 92 |
+
```
|
| 93 |
+
|
| 94 |
+
### qrels
|
| 95 |
+
```json
|
| 96 |
+
{"query_id": "...", "corpus_id": "...", "score": 1}
|
| 97 |
+
```
|
| 98 |
+
|
| 99 |
+
### answers
|
| 100 |
+
```json
|
| 101 |
+
{"query_id": "...", "answer": "..."}
|
| 102 |
+
```
|
| 103 |
+
|
| 104 |
+
## Usage
|
| 105 |
+
|
| 106 |
+
```python
|
| 107 |
+
from datasets import load_dataset
|
| 108 |
+
|
| 109 |
+
corpus = load_dataset("DinoStackAI/narrativeqa-rag", "corpus")["train"]
|
| 110 |
+
queries = load_dataset("DinoStackAI/narrativeqa-rag", "queries")
|
| 111 |
+
qrels = load_dataset("DinoStackAI/narrativeqa-rag", "qrels")
|
| 112 |
+
answers = load_dataset("DinoStackAI/narrativeqa-rag", "answers")
|
| 113 |
+
|
| 114 |
+
train_queries = queries["train"]
|
| 115 |
+
dev_qrels = qrels["dev"]
|
| 116 |
+
test_answers = answers["test"]
|
| 117 |
+
```
|
| 118 |
+
|
| 119 |
+
## Citation
|
| 120 |
+
|
| 121 |
+
NarrativeQA is released under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
|
| 122 |
+
|
| 123 |
+
```bibtex
|
| 124 |
+
@article{kocisky-etal-2018-narrativeqa,
|
| 125 |
+
title = "The {N}arrative{QA} Reading Comprehension Challenge",
|
| 126 |
+
author = "Ko{\v{c}}isk{\'y}, Tom{\'a}{\v{s}} and
|
| 127 |
+
Schwarz, Jonathan and
|
| 128 |
+
Blunsom, Phil and
|
| 129 |
+
Dyer, Chris and
|
| 130 |
+
Hermann, Karl Moritz and
|
| 131 |
+
Melis, G{\'a}bor and
|
| 132 |
+
Grefenstette, Edward",
|
| 133 |
+
journal = "Transactions of the Association for Computational Linguistics",
|
| 134 |
+
volume = "6",
|
| 135 |
+
year = "2018",
|
| 136 |
+
pages = "317--328",
|
| 137 |
+
}
|
| 138 |
+
```
|