EUVIMEDEUVIMED entdecken
Open Access · CC BY-NC-ND 4.0

Enhancing security in text-to-SQL systems: A novel dataset and agent-based framework

Salmane Chafik, Saad Ezzini, Ismail Berrada

Natural Language Processing · 2025-11 · 31 (6) · 1399-1422

DOI: 10.1017/nlp.2025.10008 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Natural Language Processing, online erschienen am 15.08.2025. Verfasst von Salmane Chafik und 2 weiteren Autor:innen. Die Arbeit wurde bisher 4-mal zitiert (Crossref) und nennt 44 Literaturangaben. Der Volltext ist frei zugänglich (Open Access, CC BY-NC-ND 4.0).

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

This paper explores the significant advancements in generating Structured Query Language (SQL) from natural language, primarily driven by Large Language Models (LLMs). These advancements have led to the development of sophisticated text-to-SQL integrated applications, enabling easier database (DB) querying for users unfamiliar with SQL syntax using natural language queries. However, reliance on LLMs exposes these applications to potential attacks through the introduction of malicious prompts or by compromising models with malicious data during the training phase. Such attacks pose severe risks, including unauthorized data access or even complete DB destruction upon success. To address these concerns, we introduce a novel large-scale dataset comprising malicious and safe prompts along with their corresponding SQL queries, enabling model fine-tuning on malicious query detection tasks. Moreover, we propose the implementation of two transformer-based classification solutions to aid in the detection of malicious attacks. Finally, we present a secure agent-based text-to-SQL architecture that incorporates these solutions to enhance overall system security, resulting in a 70% security enhancement overall compared to solely relying on a conventional text-to-SQL model.

Zitieren

APA

Chafik, S., Ezzini, S., & Berrada, I. (2025). Enhancing security in text-to-SQL systems: A novel dataset and agent-based framework. Natural Language Processing, 31(6), 1399-1422. https://doi.org/10.1017/nlp.2025.10008

Vancouver

Chafik S, Ezzini S, Berrada I. Enhancing security in text-to-SQL systems: A novel dataset and agent-based framework. Natural Language Processing. 2025;31(6):1399-1422. doi:10.1017/nlp.2025.10008

BibTeX
@article{Chafik2025,
  author = {Chafik, Salmane and Ezzini, Saad and Berrada, Ismail},
  title = {Enhancing security in text-to-SQL systems: A novel dataset and agent-based framework},
  journal = {Natural Language Processing},
  year = {2025},
  volume = {31},
  number = {6},
  pages = {1399--1422},
  doi = {10.1017/nlp.2025.10008}
}
Kostenlos starten →