{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2026,5,29]],"date-time":"2026-05-29T07:02:29Z","timestamp":1780038149821,"version":"3.53.1"},"reference-count":34,"publisher":"Frontiers Media SA","license":[{"start":{"date-parts":[[2026,5,29]],"date-time":"2026-05-29T00:00:00Z","timestamp":1780012800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"DOI":"10.13039\/501100010067","name":"Gobierno de Arag\u00f3n","doi-asserted-by":"publisher","id":[{"id":"10.13039\/501100010067","id-type":"DOI","asserted-by":"publisher"}]}],"content-domain":{"domain":["frontiersin.org"],"crossmark-restriction":true},"short-container-title":["Front. Artif. Intell."],"abstract":"<jats:sec>\n                    <jats:title>Introduction<\/jats:title>\n                    <jats:p>Extracting value from industrial time-series databases such as InfluxDB 2.0 requires expertise in specialized query languages (InfluxQL, Flux) that domain experts typically lack, and no labeled corpora exist for translating natural language into them.<\/jats:p>\n                  <\/jats:sec>\n                  <jats:sec>\n                    <jats:title>Methods<\/jats:title>\n                    <jats:p>We present a modular system that translates questions written in Spanish into executable InfluxQL and Flux queries over an InfluxDB 2.0 instance deployed in a real agro-food production plant operating under a self-consumption energy scheme. It comprises a semantic layer implemented as a knowledge graph encoding the InfluxDB schema and its correspondence with the plant's physical components; a hierarchical entity-linking module; a lightweight language model fine-tuned for NL-to-query generation; and a query validation and sanitization module. To obtain training data, we develop a fully automated synthetic dataset distillation pipeline that uses a large teacher model with contextual retrieval from the official InfluxDB 2.0 documentation; each candidate undergoes parsing, AST extraction, and semantic checking against the knowledge graph, and only validated samples are retained. The corpus fine-tunes compact Small Language Models through domain-level conditioning followed by task-specific instruction tuning.<\/jats:p>\n                  <\/jats:sec>\n                  <jats:sec>\n                    <jats:title>Results<\/jats:title>\n                    <jats:p>Performance is evaluated on a manually curated suite of 56 Spanish queries, evenly distributed across seven operationally relevant query families. Compact models reliably generate syntactically valid queries, but functional evaluation against the live instance reveals a three-layer pattern-high parser validity, moderate execution success, and lower result correctness-that locates the residual gap at the semantic layer.<\/jats:p>\n                  <\/jats:sec>\n                  <jats:sec>\n                    <jats:title>Discussion<\/jats:title>\n                    <jats:p>The contributions are a complete NL-to-InfluxDB pipeline grounded in an explicit semantic representation of a real industrial schema; a documentation-driven synthetic data generation process with automatic syntactic and semantic verification; and a parameter-efficient fine-tuning strategy enabling query generation with lightweight models suitable for resource-constrained environments.<\/jats:p>\n                  <\/jats:sec>","DOI":"10.3389\/frai.2026.1764367","type":"journal-article","created":{"date-parts":[[2026,5,29]],"date-time":"2026-05-29T06:10:39Z","timestamp":1780035039000},"update-policy":"https:\/\/doi.org\/10.3389\/crossmark-policy","source":"Crossref","is-referenced-by-count":0,"title":["LLMs for industrial databases: an agro-food production plant use case"],"prefix":"10.3389","volume":"9","author":[{"given":"Lacramioara","family":"Dranca","sequence":"first","affiliation":[{"name":"Centro Universitario de la Defensa (CUD)","place":["Zaragoza, Spain"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Pablo","family":"Donate","sequence":"additional","affiliation":[{"name":"Department of Computer Science and System Engineering, University of Zaragoza","place":["Teruel, Spain"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Julio A.","family":"Sanguesa","sequence":"additional","affiliation":[{"name":"Department of Computer Science and System Engineering, University of Zaragoza","place":["Teruel, Spain"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Piedad","family":"Garrido","sequence":"additional","affiliation":[{"name":"Department of Computer Science and System Engineering, University of Zaragoza","place":["Teruel, Spain"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Vicente","family":"Torres-Sanz","sequence":"additional","affiliation":[{"name":"Department of Computer Science and System Engineering, University of Zaragoza","place":["Teruel, Spain"]}],"role":[{"vocabulary":"crossref","role":"author"}]},{"given":"Francisco J.","family":"Martinez","sequence":"additional","affiliation":[{"name":"Department of Computer Science and System Engineering, University of Zaragoza","place":["Teruel, Spain"]}],"role":[{"vocabulary":"crossref","role":"author"}]}],"member":"1965","published-online":{"date-parts":[[2026,5,29]]},"reference":[{"key":"B1","unstructured":"Qwen2.5 and qwen2.5-coder models\n          \n          2024"},{"key":"B2","first-page":"249","article-title":"\u201cSurvey and comparison of open source time series databases,\u201d","author":"Bader","year":"2017","journal-title":"Datenbanksysteme f\u00fcr Business, Technologie und Web (BTW 2017)"},{"key":"B3","doi-asserted-by":"publisher","DOI":"10.52202\/075280-1577","article-title":"\u201cDIN-SQL: decomposed in-context learning of text-to-sql with self-correction,\u201d","author":"Baek","year":"2023","journal-title":"Proceedings of the 37th Conference on Neural Information Processing Systems (NeurIPS)"},{"key":"B4","unstructured":"Chase\n              H.\n            \n            \n              Huber\n              J.\n            \n          \n          Chroma: The Open-Source Embedding Database\n          \n          2023"},{"key":"B5","article-title":"Binding language models in symbolic languages","author":"Cheng","year":"2022","journal-title":"arXiv preprint arXiv:2210.02875"},{"key":"B6","doi-asserted-by":"publisher","first-page":"733","DOI":"10.1016\/j.procs.2025.09.193","article-title":"Integrating polyglot persistence with large language models for scalable social network applications","volume":"270","author":"de Curt\u00f3","year":"2025","journal-title":"Procedia Comput. Sci"},{"key":"B7","unstructured":"Gemma 3\n          \n          2025"},{"key":"B8","unstructured":"Han\n              D.\n            \n            \n              Han\n              M.\n            \n          \n          Unsloth\n          \n          2023"},{"key":"B9","doi-asserted-by":"publisher","first-page":"827","DOI":"10.1162\/tacl_a_00492","article-title":"Generate, annotate, and learn: NLP with synthetic text","volume":"10","author":"He","year":"2022","journal-title":"Trans. Assoc. Comput. Linguist"},{"key":"B10","article-title":"Distilling the knowledge in a neural network","author":"Hinton","year":"2015","journal-title":"arXiv preprint arXiv:1503.02531"},{"key":"B11","doi-asserted-by":"publisher","first-page":"7328","DOI":"10.1109\/TKDE.2025.3609486","article-title":"Next-generation database interfaces: a survey of LLM-based text-to-SQL","volume":"37","author":"Hong","year":"2025","journal-title":"IEEE Trans. Knowl. Data Eng"},{"key":"B12","unstructured":"Lora: low-rank adaptation of large language models\n          \n          \n            \n              Hu\n              E. J.\n            \n            \n              Shen\n              Y.\n            \n            \n              Wallis\n              P.\n            \n            \n              Allen-Zhu\n              Z.\n            \n            \n              Li\n              Y.\n            \n            \n              Wang\n              S.\n            \n          \n          arXiv preprint arXiv:2106.09685\n          \n          2022"},{"key":"B13","unstructured":"IBM Granite\n          \n          2025"},{"key":"B14","unstructured":"Flux"},{"key":"B15","unstructured":"The influx query language specification"},{"key":"B16","unstructured":"InfluxDB 3 Core Documentation"},{"key":"B17","unstructured":"Announcing InfluxDB 3 Enterprise free for at-home use and an update on InfluxDB 3 Core's 72-hour limitation"},{"key":"B18","doi-asserted-by":"publisher","first-page":"2581","DOI":"10.1109\/TKDE.2017.2740932","article-title":"Time series management systems: a survey","volume":"29","author":"Jensen","year":"2017","journal-title":"IEEE Trans. Knowl. Data Eng"},{"key":"B19","doi-asserted-by":"publisher","first-page":"84","DOI":"10.1145\/3770084","article-title":"A survey on LLM-based code generation for low-resource and domain-specific programming languages","volume":"377","author":"Joel","year":"2024","journal-title":"ACM Trans. Softw. Eng. Methodol."},{"key":"B20","doi-asserted-by":"publisher","first-page":"905","DOI":"10.1007\/s00778-022-00776-8","article-title":"A survey on deep learning approaches for Text-to-SQL","volume":"32","author":"Katsogiannis-Meimarakis","year":"2023","journal-title":"VLDB J"},{"key":"B21","article-title":"Can llm already serve as a database interface? A big bench for large-scale database grounded text-to-sqls","author":"Li","year":"2023","journal-title":"arXiv preprint arXiv:2304.06015"},{"key":"B22","article-title":"Benchmarking time series databases with iotdb-benchmark for IoT scenarios","author":"Liu","year":"2019","journal-title":"arXiv preprint arXiv:1901.08304"},{"key":"B23","first-page":"1769","article-title":"\u201cTeaching small language models to reason,\u201d","volume-title":"Findings of the Association for Computational Linguistics: EMNLP 2023","author":"Magister","year":"2023"},{"key":"B24","unstructured":"Llama 3.2: Open foundation and instruction models\n          \n          2024"},{"key":"B25","article-title":"Building better datasets: Seven recommendations for responsible design from dataset creators","author":"Orr","year":"2024","journal-title":"arXiv preprint arXiv:2409.00252"},{"key":"B26","doi-asserted-by":"publisher","first-page":"3423","DOI":"10.1109\/TKDE.2024.3352100","article-title":"Unifying large language models and knowledge graphs: a roadmap","volume":"36","author":"Pan","year":"2024","journal-title":"IEEE Trans. Knowl. Data Eng"},{"key":"B27","doi-asserted-by":"publisher","DOI":"10.52202\/075280-1577","article-title":"\u201cDIN-SQL: decomposed in-context learning of Text-to-SQL with self-correction,\u201d","author":"Pourreza","year":"2024","journal-title":"Advances in Neural Information Processing Systems"},{"key":"B28","doi-asserted-by":"publisher","DOI":"10.1145\/3661304.3661901","article-title":"\u201cA benchmark to understand the role of knowledge graphs on large language model's accuracy for question answering on enterprise SQL databases,\u201d","author":"Sequeda","year":"2024","journal-title":"Proceedings of the 7th Joint Workshop on Graph Data Management Experiences &Systems (GRADES) and Network Data Analytics (NDA)"},{"key":"B29","article-title":"Performance study of time series databases","author":"Shah","year":"2022","journal-title":"arXiv preprint arXiv:2208.13982"},{"key":"B30","article-title":"BASE-SQL: a powerful open source Text-to-SQL baseline approach","author":"Sheng","year":"2025","journal-title":"arXiv preprint arXiv:2502.10739"},{"key":"B31","doi-asserted-by":"publisher","first-page":"1857","DOI":"10.1109\/TSE.2019.2937083","article-title":"How does machine learning change software development practices?","volume":"47","author":"Wan","year":"2019","journal-title":"IEEE Trans. Softw. Eng"},{"key":"B32","doi-asserted-by":"publisher","first-page":"13481","DOI":"10.18653\/v1\/2023.acl-long.754","article-title":"\u201cSELF-INSTRUCT: aligning language models with self-generated instructions,\u201d","author":"Wang","year":"2023","journal-title":"Proceedings of the 61st Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)"},{"key":"B33","doi-asserted-by":"publisher","DOI":"10.18653\/v1\/D18-1425","article-title":"\u201cSpider: a large-scale human-labeled dataset for complex and cross-domain semantic parsing and Text-to-SQL task,\u201d","author":"Yu","year":"2018","journal-title":"Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing"},{"key":"B34","doi-asserted-by":"publisher","first-page":"1","DOI":"10.1145\/3737289","article-title":"PromAssistant: Leveraging large language models for Text-to-PromQL","volume":"1","author":"Zhang","year":"2025","journal-title":"ACM Trans. Auton. Adapt. Syst"}],"container-title":["Frontiers in Artificial Intelligence"],"original-title":[],"link":[{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2026.1764367\/full","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2026,5,29]],"date-time":"2026-05-29T06:10:43Z","timestamp":1780035043000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.frontiersin.org\/articles\/10.3389\/frai.2026.1764367\/full"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2026,5,29]]},"references-count":34,"alternative-id":["10.3389\/frai.2026.1764367"],"URL":"https:\/\/doi.org\/10.3389\/frai.2026.1764367","relation":{},"ISSN":["2624-8212"],"issn-type":[{"value":"2624-8212","type":"electronic"}],"subject":[],"published":{"date-parts":[[2026,5,29]]},"article-number":"1764367"}}