Add dataset README
Browse files
README.md
CHANGED
|
@@ -1,104 +1,142 @@
|
|
| 1 |
---
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
-
|
| 6 |
-
|
| 7 |
-
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
num_examples: 890
|
| 16 |
-
- name: test
|
| 17 |
-
num_bytes: 215656
|
| 18 |
-
num_examples: 1310
|
| 19 |
-
download_size: 465337
|
| 20 |
-
dataset_size: 652906
|
| 21 |
-
- config_name: corpus
|
| 22 |
-
features:
|
| 23 |
-
- name: id
|
| 24 |
-
dtype: string
|
| 25 |
-
- name: title
|
| 26 |
-
dtype: string
|
| 27 |
-
- name: section_name
|
| 28 |
-
dtype: string
|
| 29 |
-
- name: text
|
| 30 |
-
dtype: string
|
| 31 |
-
splits:
|
| 32 |
-
- name: train
|
| 33 |
-
num_bytes: 49057720
|
| 34 |
-
num_examples: 81550
|
| 35 |
-
download_size: 20240771
|
| 36 |
-
dataset_size: 49057720
|
| 37 |
-
- config_name: qrels
|
| 38 |
-
features:
|
| 39 |
-
- name: query_id
|
| 40 |
-
dtype: string
|
| 41 |
-
- name: corpus_id
|
| 42 |
-
dtype: string
|
| 43 |
-
- name: score
|
| 44 |
-
dtype: int64
|
| 45 |
-
splits:
|
| 46 |
-
- name: train
|
| 47 |
-
num_bytes: 274680
|
| 48 |
-
num_examples: 3815
|
| 49 |
-
- name: dev
|
| 50 |
-
num_bytes: 137736
|
| 51 |
-
num_examples: 1913
|
| 52 |
-
- name: test
|
| 53 |
-
num_bytes: 247248
|
| 54 |
-
num_examples: 3434
|
| 55 |
-
download_size: 253754
|
| 56 |
-
dataset_size: 659664
|
| 57 |
-
- config_name: queries
|
| 58 |
-
features:
|
| 59 |
-
- name: id
|
| 60 |
-
dtype: string
|
| 61 |
-
- name: text
|
| 62 |
-
dtype: string
|
| 63 |
-
splits:
|
| 64 |
-
- name: train
|
| 65 |
-
num_bytes: 210020
|
| 66 |
-
num_examples: 2101
|
| 67 |
-
- name: dev
|
| 68 |
-
num_bytes: 86060
|
| 69 |
-
num_examples: 890
|
| 70 |
-
- name: test
|
| 71 |
-
num_bytes: 125955
|
| 72 |
-
num_examples: 1310
|
| 73 |
-
download_size: 299867
|
| 74 |
-
dataset_size: 422035
|
| 75 |
configs:
|
| 76 |
-
- config_name:
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
- config_name: qrels
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
- config_name:
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
task_categories:
|
| 4 |
+
- question-answering
|
| 5 |
+
- text-retrieval
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- rag
|
| 10 |
+
- qasper
|
| 11 |
+
- scientific-qa
|
| 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 |
+
# QASPER RAG
|
| 47 |
+
|
| 48 |
+
Dataset for Retrieval-Augmented Generation (RAG) based on [QASPER](https://huggingface.co/datasets/allenai/qasper).
|
| 49 |
+
|
| 50 |
+
## Structure
|
| 51 |
+
|
| 52 |
+
| Subset | Splits | Description |
|
| 53 |
+
|--------|--------|-------------|
|
| 54 |
+
| `corpus` | train (default) | Paper chunks (abstract + full-text paragraphs) shared across all query splits |
|
| 55 |
+
| `queries` | train, dev, test | Information-seeking questions over scientific papers |
|
| 56 |
+
| `qrels` | train, dev, test | Relevance judgments (query ↔ paragraph chunk) |
|
| 57 |
+
| `answers` | train, dev, test | Reference answers (longest valid free-form answer) |
|
| 58 |
+
|
| 59 |
+
## Dataset statistics
|
| 60 |
+
|
| 61 |
+
| Split | Queries | Corpus |
|
| 62 |
+
|-------|--------:|-------:|
|
| 63 |
+
| train | 2101 | 81550 |
|
| 64 |
+
| dev | 890 | 81550 |
|
| 65 |
+
| test | 1310 | 81550 |
|
| 66 |
+
|
| 67 |
+
The corpus is shared across all splits and contains paragraph-level chunks from the abstract and full text of each paper.
|
| 68 |
+
|
| 69 |
+
- **Dev split:** mapped from the original `validation` split
|
| 70 |
+
- **Corpus source:** unique papers from train, validation and test splits
|
| 71 |
+
- **Chunking:** one chunk for the abstract (`section_name: abstract`) and one chunk per paragraph in `full_text`
|
| 72 |
+
|
| 73 |
+
## Source
|
| 74 |
+
|
| 75 |
+
| Component | QASPER resource |
|
| 76 |
+
|-----------|-----------------|
|
| 77 |
+
| Train | `train` split from [allenai/qasper](https://huggingface.co/datasets/allenai/qasper) |
|
| 78 |
+
| Dev | `validation` split |
|
| 79 |
+
| Test | `test` split |
|
| 80 |
+
| Corpus | `abstract` + `full_text.paragraphs` |
|
| 81 |
+
| Queries | `qas.question` |
|
| 82 |
+
| Qrels | `qas.answers[*].answer[*].evidence` matched to corpus chunks |
|
| 83 |
+
| Answers | Longest valid answer per question (`free_form_answer`, joined `extractive_spans`, or `Yes`/`No`) |
|
| 84 |
+
|
| 85 |
+
## Filtering
|
| 86 |
+
|
| 87 |
+
Questions are kept only when at least one answer satisfies all of the following:
|
| 88 |
+
|
| 89 |
+
- `unanswerable` is `false`
|
| 90 |
+
- the answer has `free_form_answer`, non-empty `extractive_spans`, or `yes_no`
|
| 91 |
+
- after removing evidence items containing `FLOAT SELECTED`, at least one answer still has evidence that matches the corpus
|
| 92 |
+
|
| 93 |
+
Evidence items containing `FLOAT SELECTED` are removed individually. Questions are omitted only when no valid answer has remaining evidence.
|
| 94 |
+
|
| 95 |
+
## Schema
|
| 96 |
+
|
| 97 |
+
### corpus
|
| 98 |
+
```json
|
| 99 |
+
{"id": "...", "title": "...", "section_name": "...", "text": "..."}
|
| 100 |
+
```
|
| 101 |
+
|
| 102 |
+
### queries
|
| 103 |
+
```json
|
| 104 |
+
{"id": "...", "text": "..."}
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
### qrels
|
| 108 |
+
```json
|
| 109 |
+
{"query_id": "...", "corpus_id": "...", "score": 1}
|
| 110 |
+
```
|
| 111 |
+
|
| 112 |
+
### answers
|
| 113 |
+
```json
|
| 114 |
+
{"query_id": "...", "answer": "..."}
|
| 115 |
+
```
|
| 116 |
+
|
| 117 |
+
## Usage
|
| 118 |
+
|
| 119 |
+
```python
|
| 120 |
+
from datasets import load_dataset
|
| 121 |
+
|
| 122 |
+
corpus = load_dataset("DinoStackAI/qasper-rag", "corpus")["train"]
|
| 123 |
+
queries = load_dataset("DinoStackAI/qasper-rag", "queries")
|
| 124 |
+
qrels = load_dataset("DinoStackAI/qasper-rag", "qrels")
|
| 125 |
+
answers = load_dataset("DinoStackAI/qasper-rag", "answers")
|
| 126 |
+
|
| 127 |
+
train_queries = queries["train"]
|
| 128 |
+
dev_qrels = qrels["dev"]
|
| 129 |
+
test_answers = answers["test"]
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
## Citation
|
| 133 |
+
|
| 134 |
+
QASPER is released under the [CC BY 4.0 License](https://creativecommons.org/licenses/by/4.0/).
|
| 135 |
+
|
| 136 |
+
```bibtex
|
| 137 |
+
@inproceedings{Dasigi2021ADO,
|
| 138 |
+
title={A Dataset of Information-Seeking Questions and Answers Anchored in Research Papers},
|
| 139 |
+
author={Pradeep Dasigi and Kyle Lo and Iz Beltagy and Arman Cohan and Noah A. Smith and Matt Gardner},
|
| 140 |
+
year={2021}
|
| 141 |
+
}
|
| 142 |
+
```
|