narrativeqa-rag / README.md
dinho1597's picture
Add retrieved_docs subset
06a4073 verified
|
Raw
History Blame Contribute Delete
4.04 kB
---
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: 6206098
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",
}
```