File size: 4,041 Bytes
55e94b1 eed6a23 06a4073 eed6a23 06a4073 eed6a23 06a4073 eed6a23 06a4073 55e94b1 06a4073 f788fe3 06a4073 f788fe3 55e94b1 eed6a23 | 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 | ---
license: apache-2.0
task_categories:
- question-answering
- text-retrieval
language:
- en
tags:
- rag
- narrativeqa
- reading-comprehension
- retrieval
size_categories:
- 10K<n<100K
configs:
- config_name: answers
data_files:
- split: train
path: answers/train*
- split: dev
path: answers/dev*
- split: test
path: answers/test*
- config_name: corpus
data_files:
- split: train
path: corpus/*
- config_name: qrels
data_files:
- split: train
path: qrels/train*
- split: dev
path: qrels/dev*
- split: test
path: qrels/test*
- config_name: queries
data_files:
- split: train
path: queries/train*
- split: dev
path: queries/dev*
- split: test
path: queries/test*
- config_name: retrieved_docs
data_files:
- split: train
path: retrieved_docs/train-*
- split: dev
path: retrieved_docs/dev-*
- split: test
path: retrieved_docs/test-*
dataset_info:
config_name: retrieved_docs
features:
- name: query_id
dtype: string
- name: corpus_id
dtype: string
- name: rank
dtype: int64
- name: retrieval_score
dtype: float64
- name: is_relevant
dtype: bool
splits:
- name: train
num_bytes: 37045044
num_examples: 327470
- name: dev
num_bytes: 3915257
num_examples: 34610
- name: test
num_bytes: 11942607
num_examples: 105570
download_size: 5176527
dataset_size: 52902908
---
# NarrativeQA RAG
Dataset for Retrieval-Augmented Generation (RAG) based on [NarrativeQA](https://huggingface.co/datasets/deepmind/narrativeqa).
## Structure
| Subset | Splits | Description |
|--------|--------|-------------|
| `corpus` | train (default) | Wikipedia plot summaries shared across all query splits |
| `queries` | train, dev, test | Reading comprehension questions |
| `qrels` | train, dev, test | Relevance judgments (query ↔ document) |
| `answers` | train, dev, test | Reference answers (longest annotated answer) |
## Dataset statistics
| Split | Queries | Corpus |
|-------|--------:|-------:|
| train | 32747 | 1572 |
| dev | 3461 | 1572 |
| test | 10557 | 1572 |
The corpus is shared across all splits and contains Wikipedia plot summaries (`document.summary.text`) from the original NarrativeQA documents.
- **Dev split:** mapped from the original `validation` split
- **Corpus source:** unique documents from train, validation and test splits
## Source
| Component | NarrativeQA resource |
|-----------|----------------------|
| Train | `train` split from [deepmind/narrativeqa](https://huggingface.co/datasets/deepmind/narrativeqa) |
| Dev | `validation` split |
| Test | `test` split |
| Corpus | `document.summary.text` (+ `document.summary.title`) |
| Answers | Longest answer text per question |
## Schema
### corpus
```json
{"id": "...", "title": "...", "text": "..."}
```
### queries
```json
{"id": "...", "text": "..."}
```
### qrels
```json
{"query_id": "...", "corpus_id": "...", "score": 1}
```
### answers
```json
{"query_id": "...", "answer": "..."}
```
## Usage
```python
from datasets import load_dataset
corpus = load_dataset("DinoStackAI/narrativeqa-rag", "corpus")["train"]
queries = load_dataset("DinoStackAI/narrativeqa-rag", "queries")
qrels = load_dataset("DinoStackAI/narrativeqa-rag", "qrels")
answers = load_dataset("DinoStackAI/narrativeqa-rag", "answers")
train_queries = queries["train"]
dev_qrels = qrels["dev"]
test_answers = answers["test"]
```
## Citation
NarrativeQA is released under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0).
```bibtex
@article{kocisky-etal-2018-narrativeqa,
title = "The {N}arrative{QA} Reading Comprehension Challenge",
author = "Ko{\v{c}}isk{\'y}, Tom{\'a}{\v{s}} and
Schwarz, Jonathan and
Blunsom, Phil and
Dyer, Chris and
Hermann, Karl Moritz and
Melis, G{\'a}bor and
Grefenstette, Edward",
journal = "Transactions of the Association for Computational Linguistics",
volume = "6",
year = "2018",
pages = "317--328",
}
```
|