Mr-Rosen's picture
Initial dataset release
1a09b95 verified
|
Raw
History Blame Contribute Delete
5.01 kB
metadata
pretty_name: Natively Extended FinQA
license: cc-by-4.0
language:
  - en
task_categories:
  - question-answering
tags:
  - finance
  - finqa
  - financial-question-answering
  - numerical-reasoning
  - long-context
  - rag
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/long_train.json
      - split: validation
        path: data/long_dev.json
      - split: test
        path: data/long_test.json
      - split: private_test
        path: data/long_private_test.json

Natively Extended FinQA

Natively Extended FinQA is a long-context derivative of FinQA for numerical reasoning over financial data.

It preserves the FinQA task while increasing the amount of financial context surrounding each question.

Average context increased from approximately:

611 words per question

to:

5,629 words per question

Splits

Hugging Face Split File Records
train long_train.json 6,251
validation long_dev.json 883
test long_test.json 1,147
private_test long_private_test.json 919

Load with Hugging Face Datasets

from datasets import load_dataset

dataset = load_dataset(
    "Mr-Rosen/Accuracy-Is-Not-Enough-FinQA-Dataset"
)

print(dataset)
print(dataset["train"][0]["qa"]["question"])

To load only one split:

test = load_dataset(
    "Mr-Rosen/Accuracy-Is-Not-Enough-FinQA-Dataset",
    split="test",
)

Load as Standard JSON

import json

with open("data/long_test.json", "r", encoding="utf-8") as f:
    test = json.load(f)

Dataset Structure

Important top-level fields include:

id
pre_text
table
post_text
qa

Important qa fields include:

question
program
exe_ans
gold_inds

Additional FinQA fields may also be present.

Field Usage

Model-Visible Full-Context Input

qa.question
pre_text
table
post_text

Supervised Training Target

qa.program

Evaluation-Only / Gold Information

Do not expose these fields to a model during normal validation or test inference:

qa.program
qa.answer
qa.exe_ans
qa.gold_inds

Example:

def extract_model_input(example):
    return {
        "question": example["qa"]["question"],
        "pre_text": example.get("pre_text", []),
        "table": example.get("table", []),
        "post_text": example.get("post_text", []),
    }

FinQA Program Format

The associated experiments generate structured FinQA programs.

Example:

["subtract(", "5829", "5735", ")", "EOF"]

Multi-step programs can reference previous operations:

[
  "subtract(",
  "5829",
  "5735",
  ")",
  "divide(",
  "#0",
  "5735",
  ")",
  "EOF"
]

These programs should be evaluated with the FinQA evaluator.

Dataset Construction

The expanded version adds additional native financial context around FinQA examples.

The goal is to increase context noise while retaining the original question, financial table data, program targets, execution answers, and supporting-evidence information.

Context blocks were varied so relevant evidence would not always occupy a predictable position.

Ordering within individual source blocks was preserved.

Recommended Usage

train        -> adapter training
validation   -> prompt/checkpoint/config selection
test         -> final evaluation
private_test -> private-test-style use

If reproducing the accompanying study, do not use the test split for tuning.

Associated Research

The dataset supports a six-method comparison using:

Qwen/Qwen2.5-7B-Instruct

Methods:

  • Baseline
  • RAG
  • LoRA
  • QLoRA
  • RAG + LoRA
  • RAG + QLoRA

Research repository:

MarkPaulRosenthal/Accuracy-Is-Not-Enough-Practical-Financial-QA

GitHub dataset repository:

MarkPaulRosenthal/Accuracy-Is-Not-Enough-FinQA-Dataset

Retrieval Data

The fixed practical retrieval artifacts used by the RAG-family methods are published in the companion research repository rather than this dataset repository.

They are derived model inputs, not primary benchmark splits.

Intended Uses

Appropriate uses include:

  • long-context financial QA
  • numerical reasoning
  • structured program generation
  • retrieval evaluation
  • RAG
  • LoRA/QLoRA
  • context-noise analysis
  • full-context versus retrieved-context comparisons

Limitations

This is a controlled FinQA-derived benchmark rather than a random sample of complete production financial documents.

Results should not automatically be generalized to arbitrary financial reports or other financial domains without external evaluation.

License

CC BY 4.0

This dataset remains a derivative of FinQA and should be attributed accordingly.

Attribution

Natively Extended FinQA builds on:

FinQA: A Dataset of Numerical Reasoning over Financial Data

Users should cite the original FinQA work when using this derivative dataset.