FinStat2SQL: A Text2SQL Pipeline for Financial Statement Analysis
Quang Hung Nguyen, Phuong Anh Trinh, Phan Quoc Hung Mai, Tuan Phong Trinh

TL;DR
FinStat2SQL is a lightweight, domain-specific text2sql pipeline that enables natural language querying of financial statements, combining large and small models for entity extraction, SQL generation, and self-correction, achieving high accuracy and efficiency.
Contribution
It introduces a tailored multi-agent text2sql pipeline for financial statements, addressing domain-specific challenges and demonstrating effective performance on a synthetic dataset.
Findings
Achieves 61.33% accuracy with a 7B model.
Responds in under 4 seconds on consumer hardware.
Outperforms GPT-4o-mini in accuracy.
Abstract
Despite the advancements of large language models, text2sql still faces many challenges, particularly with complex and domain-specific queries. In finance, database designs and financial reporting layouts vary widely between financial entities and countries, making text2sql even more challenging. We present FinStat2SQL, a lightweight text2sql pipeline enabling natural language queries over financial statements. Tailored to local standards like VAS, it combines large and small language models in a multi-agent setup for entity extraction, SQL generation, and self-correction. We build a domain-specific database and evaluate models on a synthetic QA dataset. A fine-tuned 7B model achieves 61.33\% accuracy with sub-4-second response times on consumer hardware, outperforming GPT-4o-mini. FinStat2SQL offers a scalable, cost-efficient solution for financial analysis, making AI-powered querying…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsStock Market Forecasting Methods · Financial Reporting and XBRL · Auditing, Earnings Management, Governance
