Treffer: A case study using sewage metagenomic data for assessment of text-to-SQL capabilities in large language models.

Title:
A case study using sewage metagenomic data for assessment of text-to-SQL capabilities in large language models.
Authors:
Becsei Á; Department of Physics of Complex Systems, ELTE Eötvös Loránd University, Budapest, Hungary., Stéger J; Department of Physics of Complex Systems, ELTE Eötvös Loránd University, Budapest, Hungary., Visontai D; Department of Physics of Complex Systems, ELTE Eötvös Loránd University, Budapest, Hungary., Munk P; National Food Institute, Technical University of Denmark, Lyngby, Denmark., Aarestrup FM; National Food Institute, Technical University of Denmark, Lyngby, Denmark., Csabai I; Department of Physics of Complex Systems, ELTE Eötvös Loránd University, Budapest, Hungary., Papp K; Department of Physics of Complex Systems, ELTE Eötvös Loránd University, Budapest, Hungary. krisztian.papp@ttk.elte.hu.
Source:
Scientific reports [Sci Rep] 2025 Nov 22; Vol. 15 (1), pp. 44557. Date of Electronic Publication: 2025 Nov 22.
Publication Type:
Journal Article
Language:
English
Journal Info:
Publisher: Nature Publishing Group Country of Publication: England NLM ID: 101563288 Publication Model: Electronic Cited Medium: Internet ISSN: 2045-2322 (Electronic) Linking ISSN: 20452322 NLM ISO Abbreviation: Sci Rep Subsets: MEDLINE
Imprint Name(s):
Original Publication: London : Nature Publishing Group, copyright 2011-
References:
Microb Genom. 2022 Jan;8(1):. (PMID: 35072601)
Nat Commun. 2024 Aug 30;15(1):7551. (PMID: 39215001)
Emerg Infect Dis. 2021 May;27(5):1405-1415. (PMID: 33900177)
ISME J. 2017 Dec;11(12):2864-2868. (PMID: 28742071)
Sci Data. 2016 Mar 15;3:160018. (PMID: 26978244)
Nat Methods. 2023 Aug;20(8):1203-1212. (PMID: 37500759)
Nat Commun. 2019 Mar 8;10(1):1124. (PMID: 30850636)
Gigascience. 2019 Jun 1;8(6):. (PMID: 31220250)
Bioinformatics. 2014 Jul 15;30(14):2068-9. (PMID: 24642063)
Nat Biotechnol. 2017 Aug 8;35(8):725-731. (PMID: 28787424)
Nat Rev Microbiol. 2023 Apr;21(4):213-214. (PMID: 36470999)
Nat Commun. 2022 Dec 1;13(1):7251. (PMID: 36456547)
BMC Bioinformatics. 2018 Aug 29;19(1):307. (PMID: 30157759)
Sci Total Environ. 2023 May 15;873:162209. (PMID: 36796689)
Bioinformatics. 2019 Nov 15;:. (PMID: 31730192)
Grant Information:
U24 AI183840 United States AI NIAID NIH HHS; RRF-2.3.1-21-2022-00004 National Research, Development, and Innovation Office of Hungary within the framework of the MILAB Artificial Intelligence National Laboratory; U24AI183840 National Institute Of Allergy And Infectious Diseases of the National Institutes of Health; No. 874735 (VEO) European Union's Horizon 2020 research and innovation programme
Contributed Indexing:
Keywords: Large language model; Metagenomics; Text-to-SQL
Substance Nomenclature:
0 (Sewage)
Entry Date(s):
Date Created: 20251122 Date Completed: 20251225 Latest Revision: 20251228
Update Code:
20251228
PubMed Central ID:
PMC12738697
DOI:
10.1038/s41598-025-28341-7
PMID:
41274992
Database:
MEDLINE

Weitere Informationen

Relational databases offer an efficient solution for storing and retrieving complex data sets, yet the requirement for SQL programming expertise presents a significant challenge for many life science users. We explore whether a cutting-edge large language model can effectively translate plain English queries into SQL scripts (Text-to-SQL), thereby simplifying database interaction and eliminating the typical usage barriers. A complex database comprising 19 interconnected tables of metagenomic analyses from 239 sewage samples across five European cities was available. A large language model was provided with details of the database's structure and background information on its contents. We evaluated the functionalities of this "SewageGPT" tool and assessed the accuracy of its responses to complex questions and visualisation of results. Providing a detailed description of the database enabled SewageGPT to accurately respond to complex inquiries, accelerating the database querying process. Knowledge of the database content proved beneficial, as it minimized the risk of ambiguities in queries; however, ambiguities can lead to incorrect responses. Therefore, human oversight remains crucial, particularly for questions that lack detail or involve ambiguities. The integration of state-of-the-art large language models with direct database connectivity substantially enhances the efficiency of query generation, statistical analysis and visualization of the results.
(© 2025. The Author(s).)

Declarations. Competing interests: The authors declare no competing interests.