FinLLMs: A Framework for Financial Reasoning Dataset Generation with Large Language Models
Ziqiang Yuan, Kaiyuan Wang, Shoutai Zhu, Ye Yuan, Jingya Zhou, Yanlin Zhu, Wenqi Wei
TL;DR
FinLLMs presents a formula-driven framework for automatic generation of financial question-answering data by building a graph of financial formulas, extending it with temporal relations, and generating synthetic QA pairs using GPT-3.5. The method grounds questions and answers in domain formulas via a DSL program, enabling accurate question formulation and reliable computations from mixed tabular and textual sources. Across FinQA, TAT-QA, and FinLLMs-trained models, synthetic data improves execution and program accuracy by at least 2% and can outperform human-labeled baselines in some settings, with few-shot prompting further boosting performance. The work demonstrates scalable, cost-effective data synthesis for financial numerical reasoning and identifies future directions in fact filtering, privacy, and broader formula coverage.
Abstract
Large Language models (LLMs) usually rely on extensive training datasets. In the financial domain, creating numerical reasoning datasets that include a mix of tables and long text often involves substantial manual annotation expenses. To address the limited data resources and reduce the annotation cost, we introduce FinLLMs, a method for generating financial question-answering data based on common financial formulas using Large Language Models. First, we compile a list of common financial formulas and construct a graph based on the variables these formulas employ. We then augment the formula set by combining those that share identical variables as new elements. Specifically, we explore formulas obtained by manual annotation and merge those formulas with shared variables by traversing the constructed graph. Finally, utilizing GPT-3.5, we generate financial question-answering data that encompasses both tabular information and long textual content, building on the collected formula set. Our experiments demonstrate that synthetic data generated by FinLLMs effectively enhances the performance of several large-scale numerical reasoning models in the financial domain, outperforming two established benchmark financial question-answering datasets.
