FinSQL: Model-Agnostic LLMs-based Text-to-SQL Framework for Financial Analysis (2401.10506v1)
Abstract: Text-to-SQL, which provides zero-code interface for operating relational databases, has gained much attention in financial analysis; because, financial professionals may not well-skilled in SQL programming. However, until now, there is no practical Text-to-SQL benchmark dataset for financial analysis, and existing Text-to-SQL methods have not considered the unique characteristics of databases in financial applications, such as commonly existing wide tables. To address these issues, we collect a practical Text-to-SQL benchmark dataset and propose a model-agnostic LLM (LLMs)-based Text-to-SQL framework for financial analysis. The benchmark dataset, BULL, is collected from the practical financial analysis business of Hundsun Technologies Inc., including databases for fund, stock, and macro economy. Besides, the proposed LLMs-based Text-to-SQL framework, FinSQL, provides a systematic treatment for financial Text-to-SQL from the perspectives of prompt construction, parameter-efficient fine-tuning and output calibration. Extensive experimental results on BULL demonstrate that FinSQL achieves the state-of-the-art Text-to-SQL performance at a small cost; furthermore, FinSQL can bring up to 36.64% performance improvement in scenarios requiring few-shot cross-database model transfer.
- LGESQL: Line Graph Enhanced Text-to-SQL Model with Mixed Local and Non-Local Relations. In ACL.
- PaLM: Scaling Language Modeling with Pathways. Journal Of Machine Learning Research 24 (2023), 240:1–240:113.
- Training Verifiers to Solve Math Word Problems. arXiv preprint arXiv:2110.14168 (2021).
- Revisiting Pre-Trained Models for Chinese Natural Language Processing. In EMNLP Findings.
- AugGPT: Leveraging ChatGPT for Text Data Augmentation. arXiv preprint arXiv:2302.13007 (2023).
- Recent Advances in Text-to-SQL: A Survey of What We Have and What We Expect. In COLING.
- C3: Zero-shot Text-to-SQL with ChatGPT. arXiv preprint arXiv:2307.07306 (2023).
- Natural SQL: Making SQL Easier to Infer from Natural Language Specifications. In EMNLP.
- Text-to-sql empowered by large language models: A benchmark evaluation. arXiv preprint arXiv:2308.15363 (2023).
- Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representation. In ACL.
- Parameter-Efficient Transfer Learning for NLP. In ICML.
- LoRA: Low-Rank Adaptation of Large Language Models. In ICLR.
- S22{{}^{2}}start_FLOATSUPERSCRIPT 2 end_FLOATSUPERSCRIPTSQL: Injecting Syntax to Question-Schema Interaction Graph Encoder for Text-to-SQL Parsers. In ACL.
- Learning a Neural Semantic Parser from User Feedback. In ACL.
- KaggleDBQA: Realistic Evaluation of Text-to-SQL Parsers. In ACL.
- Re-examining the Role of Schema Linking in Text-to-SQL. In EMNLP.
- The Power of Scale for Parameter-Efficient Prompt Tuning. In EMNLP.
- RESDSQL: Decoupling Schema Linking and Skeleton Parsing for Text-to-SQL. In AAAI.
- Graphix-T5: Mixing Pre-trained Transformers with Graph-Aware Layers for Text-to-SQL Parsing. In AAAI.
- Can llm already serve as a database interface? a big bench for large-scale database grounded text-to-sqls. In NeurIPS.
- Xiang Lisa Li and Percy Liang. 2021. Prefix-Tuning: Optimizing Continuous Prompts for Generation. In ACL.
- Teaching Models to Express Their Uncertainty in Words. Transactions on Machine Learning Research (2022).
- RoBERTa: A Robustly Optimized BERT Pretraining Approach. CoRR abs/1907.11692 (2019).
- Mohammadreza Pourreza and Davood Rafiei. 2023. DIN-SQL: Decomposed in-context learning of text-to-sql with self-correction. In NeurIPS.
- A survey on text-to-sql parsing: Concepts, methods, and future directions. arXiv preprint arXiv:2208.13629 (2022).
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer. Jounal Of Machine Learning Research 21 (2020), 140:1–140:67.
- Improving Generalization in Language Model-based Text-to-SQL Semantic Parsing: Two Simple Semantic Boundary-based Techniques. In ACL.
- PICARD: Parsing Incrementally for Constrained Auto-Regressive Decoding from Language Models. In EMNLP.
- SQL-PaLM: Improved Large Language ModelAdaptation for Text-to-SQL. arXiv preprint arXiv:2306.00739 (2023).
- Llama 2: Open foundation and fine-tuned chat models. arXiv preprint arXiv:2307.09288 (2023).
- RAT-SQL: Relation-Aware Schema Encoding and Linking for Text-to-SQL Parsers. In ACL.
- Chain-of-Thought Prompting Elicits Reasoning in Large Language Models. In NeurIPS.
- Chain of Thought Prompting Elicits Knowledge Augmentation. In ACL.
- mT5: A Massively Multilingual Pre-trained Text-to-Text Transformer. In NAACL.
- Baichuan 2: Open large-scale language models. arXiv preprint arXiv:2309.10305 (2023).
- Syntaxsqlnet: Syntax tree networks for complex and cross-domaintext-to-sql task. arXiv preprint arXiv:1810.05237 (2018).
- Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task. In EMNLP.
- John M. Zelle and Raymond J. Mooney. 1996. Learning to Parse Database Queries Using Inductive Logic Programming. In AAAI.
- A survey of large language models. arXiv preprint arXiv:2303.18223 (2023).
- Semantic Evaluation for Text-to-SQL with Distilled Test Suites. In EMNLP.
- Seq2sql: Generating structured queries from natural language using reinforcement learning. arXiv preprint arXiv:1709.00103 (2017).
- Chao Zhang (907 papers)
- Yuren Mao (17 papers)
- Yijiang Fan (3 papers)
- Yu Mi (4 papers)
- Yunjun Gao (67 papers)
- Lu Chen (245 papers)
- Dongfang Lou (3 papers)
- Jinshu Lin (2 papers)