Mr-Rosen commited on
Commit
1a09b95
·
verified ·
1 Parent(s): 6f29df6

Initial dataset release

Browse files
.gitattributes CHANGED
@@ -58,3 +58,7 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
 
58
  # Video files - compressed
59
  *.mp4 filter=lfs diff=lfs merge=lfs -text
60
  *.webm filter=lfs diff=lfs merge=lfs -text
61
+ data/long_dev.json filter=lfs diff=lfs merge=lfs -text
62
+ data/long_private_test.json filter=lfs diff=lfs merge=lfs -text
63
+ data/long_test.json filter=lfs diff=lfs merge=lfs -text
64
+ data/long_train.json filter=lfs diff=lfs merge=lfs -text
LICENSE.md ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Dataset License: CC BY 4.0
2
+
3
+ The expanded-context dataset in this directory is a modified derivative of
4
+ FinQA and is released under the Creative Commons Attribution 4.0 International
5
+ license (CC BY 4.0).
6
+
7
+ License reference: https://creativecommons.org/licenses/by/4.0/
8
+
9
+ When sharing or adapting this dataset:
10
+
11
+ - give appropriate credit to FinQA and its authors;
12
+ - cite the original FinQA paper;
13
+ - identify this release as modified by expanding the document context;
14
+ - provide a link to CC BY 4.0; and
15
+ - indicate whether further changes were made.
16
+
17
+ This release must not be described as the original, unmodified FinQA dataset.
18
+
19
+ The MIT license for original capstone code does not apply to this dataset.
README.md ADDED
@@ -0,0 +1,254 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: Natively Extended FinQA
3
+ license: cc-by-4.0
4
+ language:
5
+ - en
6
+ task_categories:
7
+ - question-answering
8
+ tags:
9
+ - finance
10
+ - finqa
11
+ - financial-question-answering
12
+ - numerical-reasoning
13
+ - long-context
14
+ - rag
15
+ configs:
16
+ - config_name: default
17
+ data_files:
18
+ - split: train
19
+ path: data/long_train.json
20
+ - split: validation
21
+ path: data/long_dev.json
22
+ - split: test
23
+ path: data/long_test.json
24
+ - split: private_test
25
+ path: data/long_private_test.json
26
+ ---
27
+
28
+ # Natively Extended FinQA
29
+
30
+ Natively Extended FinQA is a long-context derivative of FinQA for numerical reasoning over financial data.
31
+
32
+ It preserves the FinQA task while increasing the amount of financial context surrounding each question.
33
+
34
+ Average context increased from approximately:
35
+
36
+ `611 words per question`
37
+
38
+ to:
39
+
40
+ `5,629 words per question`
41
+
42
+ ## Splits
43
+
44
+ | Hugging Face Split | File | Records |
45
+ |---|---|---:|
46
+ | `train` | `long_train.json` | 6,251 |
47
+ | `validation` | `long_dev.json` | 883 |
48
+ | `test` | `long_test.json` | 1,147 |
49
+ | `private_test` | `long_private_test.json` | 919 |
50
+
51
+ ## Load with Hugging Face Datasets
52
+
53
+ ```python
54
+ from datasets import load_dataset
55
+
56
+ dataset = load_dataset(
57
+ "Mr-Rosen/Accuracy-Is-Not-Enough-FinQA-Dataset"
58
+ )
59
+
60
+ print(dataset)
61
+ print(dataset["train"][0]["qa"]["question"])
62
+ ````
63
+
64
+ To load only one split:
65
+
66
+ ```python
67
+ test = load_dataset(
68
+ "Mr-Rosen/Accuracy-Is-Not-Enough-FinQA-Dataset",
69
+ split="test",
70
+ )
71
+ ```
72
+
73
+ ## Load as Standard JSON
74
+
75
+ ```python
76
+ import json
77
+
78
+ with open("data/long_test.json", "r", encoding="utf-8") as f:
79
+ test = json.load(f)
80
+ ```
81
+
82
+ ## Dataset Structure
83
+
84
+ Important top-level fields include:
85
+
86
+ ```text
87
+ id
88
+ pre_text
89
+ table
90
+ post_text
91
+ qa
92
+ ```
93
+
94
+ Important `qa` fields include:
95
+
96
+ ```text
97
+ question
98
+ program
99
+ exe_ans
100
+ gold_inds
101
+ ```
102
+
103
+ Additional FinQA fields may also be present.
104
+
105
+ ## Field Usage
106
+
107
+ ### Model-Visible Full-Context Input
108
+
109
+ ```text
110
+ qa.question
111
+ pre_text
112
+ table
113
+ post_text
114
+ ```
115
+
116
+ ### Supervised Training Target
117
+
118
+ ```text
119
+ qa.program
120
+ ```
121
+
122
+ ### Evaluation-Only / Gold Information
123
+
124
+ Do not expose these fields to a model during normal validation or test inference:
125
+
126
+ ```text
127
+ qa.program
128
+ qa.answer
129
+ qa.exe_ans
130
+ qa.gold_inds
131
+ ```
132
+
133
+ Example:
134
+
135
+ ```python
136
+ def extract_model_input(example):
137
+ return {
138
+ "question": example["qa"]["question"],
139
+ "pre_text": example.get("pre_text", []),
140
+ "table": example.get("table", []),
141
+ "post_text": example.get("post_text", []),
142
+ }
143
+ ```
144
+
145
+ ## FinQA Program Format
146
+
147
+ The associated experiments generate structured FinQA programs.
148
+
149
+ Example:
150
+
151
+ ```json
152
+ ["subtract(", "5829", "5735", ")", "EOF"]
153
+ ```
154
+
155
+ Multi-step programs can reference previous operations:
156
+
157
+ ```json
158
+ [
159
+ "subtract(",
160
+ "5829",
161
+ "5735",
162
+ ")",
163
+ "divide(",
164
+ "#0",
165
+ "5735",
166
+ ")",
167
+ "EOF"
168
+ ]
169
+ ```
170
+
171
+ These programs should be evaluated with the FinQA evaluator.
172
+
173
+ ## Dataset Construction
174
+
175
+ The expanded version adds additional native financial context around FinQA examples.
176
+
177
+ The goal is to increase context noise while retaining the original question, financial table data, program targets, execution answers, and supporting-evidence information.
178
+
179
+ Context blocks were varied so relevant evidence would not always occupy a predictable position.
180
+
181
+ Ordering within individual source blocks was preserved.
182
+
183
+ ## Recommended Usage
184
+
185
+ ```text
186
+ train -> adapter training
187
+ validation -> prompt/checkpoint/config selection
188
+ test -> final evaluation
189
+ private_test -> private-test-style use
190
+ ```
191
+
192
+ If reproducing the accompanying study, do not use the test split for tuning.
193
+
194
+ ## Associated Research
195
+
196
+ The dataset supports a six-method comparison using:
197
+
198
+ `Qwen/Qwen2.5-7B-Instruct`
199
+
200
+ Methods:
201
+
202
+ * Baseline
203
+ * RAG
204
+ * LoRA
205
+ * QLoRA
206
+ * RAG + LoRA
207
+ * RAG + QLoRA
208
+
209
+ Research repository:
210
+
211
+ `MarkPaulRosenthal/Accuracy-Is-Not-Enough-Practical-Financial-QA`
212
+
213
+ GitHub dataset repository:
214
+
215
+ [MarkPaulRosenthal/Accuracy-Is-Not-Enough-FinQA-Dataset](https://github.com/MarkPaulRosenthal/Accuracy-Is-Not-Enough-FinQA-Dataset)
216
+
217
+ ## Retrieval Data
218
+
219
+ The fixed practical retrieval artifacts used by the RAG-family methods are published in the companion research repository rather than this dataset repository.
220
+
221
+ They are derived model inputs, not primary benchmark splits.
222
+
223
+ ## Intended Uses
224
+
225
+ Appropriate uses include:
226
+
227
+ * long-context financial QA
228
+ * numerical reasoning
229
+ * structured program generation
230
+ * retrieval evaluation
231
+ * RAG
232
+ * LoRA/QLoRA
233
+ * context-noise analysis
234
+ * full-context versus retrieved-context comparisons
235
+
236
+ ## Limitations
237
+
238
+ This is a controlled FinQA-derived benchmark rather than a random sample of complete production financial documents.
239
+
240
+ Results should not automatically be generalized to arbitrary financial reports or other financial domains without external evaluation.
241
+
242
+ ## License
243
+
244
+ **CC BY 4.0**
245
+
246
+ This dataset remains a derivative of FinQA and should be attributed accordingly.
247
+
248
+ ## Attribution
249
+
250
+ Natively Extended FinQA builds on:
251
+
252
+ **FinQA: A Dataset of Numerical Reasoning over Financial Data**
253
+
254
+ Users should cite the original FinQA work when using this derivative dataset.
data/long_dev.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4c06380e3d18177425f76d9438e1682fb27fe83cd370e685e277f9070454ead
3
+ size 43827692
data/long_private_test.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7af8f254859098a2d1662322230f96b96c8ede95722cfd24e52c99b776e9d165
3
+ size 38843927
data/long_test.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:90a26b356fcecbf3c40a611c8f5a65450fb2d18a2c0853f3281923d18126ffbb
3
+ size 56107429
data/long_train.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:142e6cdfd43b1c9470c728677b16118c24bb44d980bc3b65c20a616877c33894
3
+ size 309703244