IDEAS home Printed from https://ideas.repec.org/a/gam/jftint/v17y2025i1p12-d1558964.html
   My bibliography  Save this article

FI-NL2PY2SQL: Financial Industry NL2SQL Innovation Model Based on Python and Large Language Model

Author

Listed:
  • Xiaozheng Du

    (School of Computer Science, Fudan University, Shanghai 200438, China)

  • Shijing Hu

    (School of Computer Science, Fudan University, Shanghai 200438, China)

  • Feng Zhou

    (School of Artificial Intelligence, Shanghai Normal University Tianhua College, No. 1661 Shengxin North Road, Shanghai 201815, China)

  • Cheng Wang

    (Business Analysis BU, GienTech Technology Co., Ltd., Shanghai 200232, China)

  • Binh Minh Nguyen

    (School of Information and Communication Technology, Hanoi University of Science and Technology, No. 1 Dai Co Viet, Hai Ba Trung, Hanoi 100000, Vietnam)

Abstract

With the rapid development of prominent models, NL2SQL has made many breakthroughs, but customers still hope that the accuracy of NL2SQL can be continuously improved through optimization. The method based on large models has brought revolutionary changes to NL2SQL. This paper innovatively proposes a new NL2SQL method based on a large language model (LLM), which could be adapted to an edge-cloud computing platform. First, natural language is converted into Python language, and then SQL is generated through Python. At the same time, considering the traceability characteristics of financial industry regulatory requirements, this paper uses the open-source big model DeepSeek. After testing on the BIRD dataset, compared with most NL2SQL models based on large language models, EX is at least 2.73% higher than the original method, F1 is at least 3.72 higher than the original method, and VES is 6.34% higher than the original method. Through this innovative algorithm, the accuracy of NL2SQL in the financial industry is greatly improved, which can provide business personnel with a robust database access mode.

Suggested Citation

  • Xiaozheng Du & Shijing Hu & Feng Zhou & Cheng Wang & Binh Minh Nguyen, 2025. "FI-NL2PY2SQL: Financial Industry NL2SQL Innovation Model Based on Python and Large Language Model," Future Internet, MDPI, vol. 17(1), pages 1-24, January.
  • Handle: RePEc:gam:jftint:v:17:y:2025:i:1:p:12-:d:1558964
    as

    Download full text from publisher

    File URL: https://www.mdpi.com/1999-5903/17/1/12/pdf
    Download Restriction: no

    File URL: https://www.mdpi.com/1999-5903/17/1/12/
    Download Restriction: no
    ---><---

    References listed on IDEAS

    as
    1. Yinheng Li & Shaofei Wang & Han Ding & Hang Chen, 2023. "Large Language Models in Finance: A Survey," Papers 2311.10723, arXiv.org, revised Jul 2024.
    Full references (including those not matched with items on IDEAS)

    Most related items

    These are the items that most often cite the same works as this one and are cited by the same works as this one.
    1. Qianqian Xie & Dong Li & Mengxi Xiao & Zihao Jiang & Ruoyu Xiang & Xiao Zhang & Zhengyu Chen & Yueru He & Weiguang Han & Yuzhe Yang & Shunian Chen & Yifei Zhang & Lihang Shen & Daniel Kim & Zhiwei Liu, 2024. "Open-FinLLMs: Open Multimodal Large Language Models for Financial Applications," Papers 2408.11878, arXiv.org.
    2. Antoine Kazadi Kayisu & Miroslava Mikusova & Pitshou Ntambu Bokoro & Kyandoghere Kyamakya, 2024. "Exploring Smart Mobility Potential in Kinshasa (DR-Congo) as a Contribution to Mastering Traffic Congestion and Improving Road Safety: A Comprehensive Feasibility Assessment," Sustainability, MDPI, vol. 16(21), pages 1-53, October.
    3. Joel R. Bock, 2024. "Generating long-horizon stock "buy" signals with a neural language model," Papers 2410.18988, arXiv.org.
    4. Han Ding & Yinheng Li & Junhao Wang & Hang Chen, 2024. "Large Language Model Agent in Financial Trading: A Survey," Papers 2408.06361, arXiv.org.

    More about this item

    Keywords

    LLM; NL2SQL; pre-training; prompt; Python;
    All these keywords.

    JEL classification:

    Statistics

    Access and download statistics

    Corrections

    All material on this site has been provided by the respective publishers and authors. You can help correct errors and omissions. When requesting a correction, please mention this item's handle: RePEc:gam:jftint:v:17:y:2025:i:1:p:12-:d:1558964. See general information about how to correct material in RePEc.

    If you have authored this item and are not yet registered with RePEc, we encourage you to do it here. This allows to link your profile to this item. It also allows you to accept potential citations to this item that we are uncertain about.

    If CitEc recognized a bibliographic reference but did not link an item in RePEc to it, you can help with this form .

    If you know of missing items citing this one, you can help us creating those links by adding the relevant references in the same way as above, for each refering item. If you are a registered author of this item, you may also want to check the "citations" tab in your RePEc Author Service profile, as there may be some citations waiting for confirmation.

    For technical questions regarding this item, or to correct its authors, title, abstract, bibliographic or download information, contact: MDPI Indexing Manager (email available below). General contact details of provider: https://www.mdpi.com .

    Please note that corrections may take a couple of weeks to filter through the various RePEc services.

    IDEAS is a RePEc service. RePEc uses bibliographic data supplied by the respective publishers.