Datasets:

Modalities:
Text
Formats:
parquet
Languages:
English
ArXiv:
Libraries:
Datasets
pandas
License:
File size: 6,372 Bytes
50d3740
0938ea8
 
 
 
 
 
 
91f0fc7
3cfd544
eedd702
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3cfd544
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4a8f6e5
3cfd544
 
4a8f6e5
3cfd544
 
4a8f6e5
3cfd544
4a8f6e5
 
3cfd544
eedd702
 
 
 
 
 
 
 
3cfd544
 
 
 
 
 
 
 
50d3740
32b0aa1
fffba32
50d3740
4184f5c
32b0aa1
 
91f0fc7
4184f5c
32b0aa1
 
91f0fc7
4184f5c
32b0aa1
4184f5c
24c3e35
32b0aa1
4184f5c
32b0aa1
4184f5c
 
 
 
 
91f0fc7
 
32b0aa1
4184f5c
 
 
 
32b0aa1
 
91f0fc7
 
179b939
91f0fc7
 
 
 
 
179b939
91f0fc7
4184f5c
 
 
32b0aa1
4184f5c
91f0fc7
 
 
 
 
 
4184f5c
3547964
4184f5c
00da89f
12a379c
 
24c3e35
3547964
 
 
 
 
 
00da89f
3547964
 
 
 
12a379c
00da89f
12a379c
91f0fc7
4184f5c
 
91f0fc7
4184f5c
91f0fc7
 
8737219
 
4bd7b8b
 
 
 
91f0fc7
4bd7b8b
 
 
 
8737219
 
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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
---
language:
- en
license: apache-2.0
size_categories:
- 10K<n<100K
task_categories:
- question-answering
pretty_name: AQuA-RAT with Calculator
dataset_info:
- config_name: default
  features:
  - name: id
    dtype: string
  - name: question
    dtype: string
  - name: chain
    dtype: string
  - name: result
    dtype: string
  - name: options
    struct:
    - name: A
      dtype: string
    - name: B
      dtype: string
    - name: C
      dtype: string
    - name: D
      dtype: string
    - name: E
      dtype: string
  - name: question_without_options
    dtype: string
  splits:
  - name: train
    num_bytes: 72917721
    num_examples: 94760
  - name: validation
    num_bytes: 212928
    num_examples: 254
  - name: test
    num_bytes: 206180
    num_examples: 254
  download_size: 42057527
  dataset_size: 73336829
- config_name: original-splits
  features:
  - name: id
    dtype: string
  - name: question
    dtype: string
  - name: chain
    dtype: string
  - name: result
    dtype: string
  - name: options
    struct:
    - name: A
      dtype: string
    - name: B
      dtype: string
    - name: C
      dtype: string
    - name: D
      dtype: string
    - name: E
      dtype: string
  - name: question_without_options
    dtype: string
  splits:
  - name: train
    num_bytes: 74265737
    num_examples: 97467
  - name: validation
    num_bytes: 212928
    num_examples: 254
  - name: test
    num_bytes: 206180
    num_examples: 254
  download_size: 42873590
  dataset_size: 74684845
configs:
- config_name: default
  data_files:
  - split: train
    path: data/train-*
  - split: validation
    path: data/validation-*
  - split: test
    path: data/test-*
- config_name: original-splits
  data_files:
  - split: train
    path: original-splits/train-*
  - split: validation
    path: original-splits/validation-*
  - split: test
    path: original-splits/test-*
---

# Dataset Card for Calc-aqua_rat


## Summary

This dataset is an instance of [AQuA-RAT](https://huggingface.co/datasets/aqua_rat) dataset extended with in-context calls of a sympy calculator.


## Supported Tasks

The dataset is intended for training Chain-of-Thought reasoning models able to use external tools to enhance the factuality of their responses.
This dataset presents in-context scenarios where models can outsource the computations in the reasoning chain to a calculator.


## Construction Process

The dataset was constructed automatically by evaluating all candidate calls to a `sympy` library that were extracted from the originally annotated 
*rationale*s. The selection of candidates is pivoted by the matching of equals ('=') symbols in the chain, where the left-hand side of the equation is evaluated,
and accepted as a correct gadget call, if the result occurs closely on the right-hand side. 
Therefore, the extraction of calculator calls may inhibit false negatives (where the calculator could have been used but was not), but not any known
false positives.

We also perform in-dataset and cross-dataset data-leak detection within the [Calc-X collection](https://huggingface.co/collections/MU-NLPC/calc-x-652fee9a6b838fd820055483). Specifically for AQuA-RAT, we removed a few percent of the train split that were near-duplicates with some of the test or validation examples.

A full description of the extraction process can be found in the [corresponding parse script](https://github.com/prompteus/calc-x/blob/7799a7841940b15593d4667219424ee71c74327e/gadgets/aqua.py#L19),

**If you find an issue in the dataset or in the fresh version of the parsing script, we'd be happy if you report it, or create a PR.**


## Data splits

The dataset with the near-duplicates removed can be loaded in the default config using:

```python
datasets.load_dataset("MU-NLPC/calc-aqua_rat")
```

If you want the unfiltered version, you can use:

```python
datasets.load_dataset("MU-NLPC/calc-aqua_rat", "original-splits")
```


## Attributes

- **id**: an id of the example
- **question**: A natural language definition of the problem to solve, including the options to choose from
- **chain**: A natural language step-by-step solution with automatically inserted calculator calls and outputs of the sympy calculator
- **result**: The correct option (one of A...E)
- **options**: a dictionary with 5 possible options (A, B, C, D and E), among which one is correct
- **question_without_options**: same as **question** but without the options inserted

Attributes **id**, **question**, **chain**, and **result** are present in all datasets in [Calc-X collection](https://huggingface.co/collections/MU-NLPC/calc-x-652fee9a6b838fd820055483).


## Related work

This dataset was created as a part of a larger effort in training models capable of using a calculator during inference, which we call Calcformers.

- [**Calc-X collection**](https://huggingface.co/collections/MU-NLPC/calc-x-652fee9a6b838fd820055483) - datasets for training Calcformers
- [**Calcformers collection**](https://huggingface.co/collections/MU-NLPC/calcformers-65367392badc497807b3caf5) - calculator-using models we trained and published on HF
- [**Calc-X and Calcformers paper**](https://arxiv.org/abs/2305.15017)
- [**Calc-X and Calcformers repo**](https://github.com/prompteus/calc-x)

Here are links to the original dataset:

- [**original AQuA-RAT dataset**](https://huggingface.co/datasets/aqua_rat)
- [**original AQuA-RAT paper**](https://arxiv.org/pdf/1705.04146.pdf)
- [**original AQuA-RAT repo**](https://github.com/google-deepmind/AQuA)


## License

Apache-2.0, consistently with the original aqua-rat dataset.


## Cite

If you use this dataset in research, please cite the original [AQuA-RAT paper](https://arxiv.org/pdf/1705.04146.pdf), and [Calc-X paper](https://arxiv.org/abs/2305.15017) as follows:

```bibtex
@inproceedings{kadlcik-etal-2023-soft,
    title = "Calc-X and Calcformers: Empowering Arithmetical Chain-of-Thought through Interaction with Symbolic Systems",
    author = "Marek Kadlčík and Michal Štefánik and Ondřej Sotolář and Vlastimil Martinek",
    booktitle = "Proceedings of the The 2023 Conference on Empirical Methods in Natural Language Processing: Main track",
    month = dec,
    year = "2023",
    address = "Singapore, Singapore",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/2305.15017",
}
```