# openbookqa

<br />

- **Description**:

The dataset contains 5,957 4-way multiple choice questions. Additionally, they
provide 5,167 crowd-sourced common knowledge facts, and an expanded version of
the train/dev/test questions where each question is associated with its
originating core fact, a human accuracy score, a clarity score, and an
anonymized crowd-worker ID.

- **Additional Documentation** :
  [Explore on Papers With Code](https://paperswithcode.com/dataset/openbookqa)

- **Homepage** :
  <https://leaderboard.allenai.org/open_book_qa/submissions/get-started>

- **Source code** :
  [`tfds.datasets.openbookqa.Builder`](https://github.com/tensorflow/datasets/tree/master/tensorflow_datasets/datasets/openbookqa/openbookqa_dataset_builder.py)

- **Versions**:

  - **`0.1.0`** (default): No release notes.
- **Download size** : `1.38 MiB`

- **Dataset size** : `2.40 MiB`

- **Auto-cached**
  ([documentation](https://www.tensorflow.org/datasets/performances#auto-caching)):
  Yes

- **Splits**:

| Split | Examples |
|---|---|
| `'test'` | 500 |
| `'train'` | 4,957 |
| `'validation'` | 500 |

- **Feature structure**:

    FeaturesDict({
        'answerKey': ClassLabel(shape=(), dtype=int64, num_classes=4),
        'clarity': float32,
        'fact1': Text(shape=(), dtype=string),
        'humanScore': float32,
        'question': FeaturesDict({
            'choice_A': Text(shape=(), dtype=string),
            'choice_B': Text(shape=(), dtype=string),
            'choice_C': Text(shape=(), dtype=string),
            'choice_D': Text(shape=(), dtype=string),
            'stem': Text(shape=(), dtype=string),
        }),
        'turkIdAnonymized': Text(shape=(), dtype=string),
    })

- **Feature documentation**:

| Feature | Class | Shape | Dtype | Description |
|---|---|---|---|---|
|   | FeaturesDict |   |   |   |
| answerKey | ClassLabel |   | int64 |   |
| clarity | Tensor |   | float32 |   |
| fact1 | Text |   | string |   |
| humanScore | Tensor |   | float32 |   |
| question | FeaturesDict |   |   |   |
| question/choice_A | Text |   | string |   |
| question/choice_B | Text |   | string |   |
| question/choice_C | Text |   | string |   |
| question/choice_D | Text |   | string |   |
| question/stem | Text |   | string |   |
| turkIdAnonymized | Text |   | string |   |

- **Supervised keys** (See
  [`as_supervised` doc](https://www.tensorflow.org/datasets/api_docs/python/tfds/load#args)):
  `('question', 'answerKey')`

- **Figure**
  ([tfds.show_examples](https://www.tensorflow.org/datasets/api_docs/python/tfds/visualization/show_examples)):
  Not supported.

- **Examples**
  ([tfds.as_dataframe](https://www.tensorflow.org/datasets/api_docs/python/tfds/as_dataframe)):

<button id="displaydataframe">Display examples...</button>

- **Citation**:

    @article{mihaylov2018can,
      title={Can a suit of armor conduct electricity? a new dataset for open book question answering},
      author={Mihaylov, Todor and Clark, Peter and Khot, Tushar and Sabharwal, Ashish},
      journal={arXiv preprint arXiv:1809.02789},
      year={2018}
    }