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| 9 |
+
- finance
|
| 10 |
+
- financial-qa
|
| 11 |
+
- benchmark
|
| 12 |
+
- evaluation
|
| 13 |
+
size_categories:
|
| 14 |
+
- 1B<n<10B
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# FinBench Datasets
|
| 18 |
+
|
| 19 |
+
Financial question-answering benchmark datasets for evaluating LLMs on financial reasoning tasks.
|
| 20 |
+
|
| 21 |
+
## Datasets Included
|
| 22 |
+
|
| 23 |
+
| Dataset | Description | Size | Files |
|
| 24 |
+
|---------|-------------|------|-------|
|
| 25 |
+
| **docfinqa** | SEC filings analysis - long document QA | ~5GB | train.json, dev.json, test.json |
|
| 26 |
+
| **finqa** | Financial reports with tables | ~9MB | test.json |
|
| 27 |
+
| **tatqa** | Table and text QA | ~17MB | train, dev, test splits |
|
| 28 |
+
| **docmath_eval** | Document math problems | ~283MB | 8 complexity splits |
|
| 29 |
+
|
| 30 |
+
## Quick Start
|
| 31 |
+
|
| 32 |
+
### Download All Datasets
|
| 33 |
+
|
| 34 |
+
```bash
|
| 35 |
+
# Install huggingface_hub
|
| 36 |
+
pip install huggingface_hub
|
| 37 |
+
|
| 38 |
+
# Download to data/ folder
|
| 39 |
+
huggingface-cli download Ayushnangia/finbench-data --local-dir data --repo-type dataset
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
### Python Download
|
| 43 |
+
|
| 44 |
+
```python
|
| 45 |
+
from huggingface_hub import snapshot_download
|
| 46 |
+
|
| 47 |
+
snapshot_download(
|
| 48 |
+
"Ayushnangia/finbench-data",
|
| 49 |
+
repo_type="dataset",
|
| 50 |
+
local_dir="data",
|
| 51 |
+
local_dir_use_symlinks=False # For Windows compatibility
|
| 52 |
+
)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
## Dataset Structure
|
| 56 |
+
|
| 57 |
+
```
|
| 58 |
+
data/
|
| 59 |
+
├── docfinqa/
|
| 60 |
+
│ ├── train.json
|
| 61 |
+
│ ├── dev.json
|
| 62 |
+
│ ├── test.json
|
| 63 |
+
│ └── docfinqa.json/
|
| 64 |
+
│ ├── train.json
|
| 65 |
+
│ ├── validation.json
|
| 66 |
+
│ └── test.json
|
| 67 |
+
│
|
| 68 |
+
├── finqa/
|
| 69 |
+
│ └── test.json
|
| 70 |
+
│
|
| 71 |
+
├── tatqa/
|
| 72 |
+
│ ├── tatqa_dataset_train.json
|
| 73 |
+
│ ├── tatqa_dataset_dev.json
|
| 74 |
+
│ ├── tatqa_dataset_test.json
|
| 75 |
+
│ └── tatqa_dataset_test_gold.json
|
| 76 |
+
│
|
| 77 |
+
└── docmath_eval/
|
| 78 |
+
└── docmath_eval.json/
|
| 79 |
+
├── complong_test.json
|
| 80 |
+
├── complong_testmini.json
|
| 81 |
+
├── compshort_test.json
|
| 82 |
+
├── compshort_testmini.json
|
| 83 |
+
├── simplong_test.json
|
| 84 |
+
├── simplong_testmini.json
|
| 85 |
+
├── simpshort_test.json
|
| 86 |
+
└── simpshort_testmini.json
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
## Dataset Details
|
| 90 |
+
|
| 91 |
+
### DocFinQA
|
| 92 |
+
- **Source**: SEC financial filings
|
| 93 |
+
- **Task**: Long-document question answering
|
| 94 |
+
- **Context**: Full financial documents (~100k tokens)
|
| 95 |
+
- **Use case**: Testing LLM ability to reason over lengthy financial documents
|
| 96 |
+
|
| 97 |
+
### FinQA
|
| 98 |
+
- **Source**: Financial reports with tables
|
| 99 |
+
- **Task**: Numerical reasoning with tables
|
| 100 |
+
- **Use case**: Testing arithmetic and table understanding
|
| 101 |
+
|
| 102 |
+
### TAT-QA
|
| 103 |
+
- **Source**: Financial reports (tables + text)
|
| 104 |
+
- **Task**: Hybrid table-text QA
|
| 105 |
+
- **Use case**: Testing combined reasoning over structured and unstructured data
|
| 106 |
+
|
| 107 |
+
### DocMath-Eval
|
| 108 |
+
- **Source**: Mathematical documents
|
| 109 |
+
- **Task**: Document-level math problems
|
| 110 |
+
- **Splits**: By complexity (simple/complex) and length (short/long)
|
| 111 |
+
- **Use case**: Testing mathematical reasoning in document context
|
| 112 |
+
|
| 113 |
+
## Usage with FinBench
|
| 114 |
+
|
| 115 |
+
These datasets are designed for use with the [FinBench](https://github.com/ayushnangia/finbench) evaluation framework:
|
| 116 |
+
|
| 117 |
+
```bash
|
| 118 |
+
# Clone FinBench
|
| 119 |
+
git clone -b ananya-setup https://github.com/ayushnangia/finbench.git
|
| 120 |
+
cd finbench
|
| 121 |
+
|
| 122 |
+
# Setup (Windows)
|
| 123 |
+
.\setup-windows.ps1
|
| 124 |
+
|
| 125 |
+
# Download datasets
|
| 126 |
+
huggingface-cli download Ayushnangia/finbench-data --local-dir data --repo-type dataset
|
| 127 |
+
|
| 128 |
+
# Run evaluation
|
| 129 |
+
python finbench.py run docfinqa_vibe_test --limit 10
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
## Citation
|
| 133 |
+
|
| 134 |
+
If you use these datasets, please cite the original sources:
|
| 135 |
+
|
| 136 |
+
- **DocFinQA**: [Kensho DocFinQA](https://huggingface.co/datasets/kensho/DocFinQA)
|
| 137 |
+
- **FinQA**: [ChanceFocus FinQA](https://huggingface.co/datasets/ChanceFocus/finqa)
|
| 138 |
+
- **TAT-QA**: [TAT-QA Dataset](https://github.com/NExTplusplus/TAT-QA)
|
| 139 |
+
- **DocMath-Eval**: [Yale NLP DocMath-Eval](https://huggingface.co/datasets/yale-nlp/DocMath-Eval)
|
| 140 |
+
|
| 141 |
+
## License
|
| 142 |
+
|
| 143 |
+
MIT License - See individual dataset licenses for specific terms.
|