Çoklu Etmen Büyük Dil Modelleri ile Doğal Dilin Niteliksel SQL Arama Sorgularına Dönüştürülmesi
No Thumbnail Available
Date
2025
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Open Access Color
OpenAIRE Downloads
OpenAIRE Views
Abstract
Doğal dilden SQL'e dönüşüm (NL2SQL), kullanıcı tarafından doğal dilde ifade edilen sorguların, aynı anlamı taşıyan yapısal SQL ifadelerine çevrilmesi sürecidir. Bu işlem, uzmanlık seviyesinde SQL bilgisi gerektirir, veri bilimciler ya da iş analistleri tarafından manuel olarak gerçekleştirildiğinde zaman alıcı olabilir. Bu süreci hızlandırmak ve kolaylaştırmak için araştırmacılar, veritabanlarıyla doğal dil üzerinden iletişimi mümkün kılacak yöntemler üzerine çalışmış; kullanıcılarla veri sistemleri arasında etkili bir arayüz oluşturmayı hedeflemişlerdir. Yaklaşık otuz yıllık bir süreçte, bu alandaki yaklaşımlar, kural tabanlı gramer sistemlerinden, veritabanı bilgisinin kodlandığı (database-aware encoding) seq2seq modellere evrilmiştir. Ancak, büyük dil modellerinin (LLM'ler) ortaya çıkmasıyla birlikte bu alanda kaydedilen ilerleme önemli ölçüde hızlanmış ve daha önce ulaşılamayan bir seviyeye erişmiştir. Bu çalışmada, NL2SQL görevi, GPT gibi büyük ölçekli modellere güvenmek yerine, orta ölçekli açık kaynak dil modellerinin etkin akıl yürütme gücünden ve işbirliğinden yararlanılarak ele alınmaya çalışılmıştır. Çalışmanın amacı, çok daha az kaynak gerektiren modellerle rekabetçi bir performansın elde edilip edilemeyeceğini araştırmaktır. Bu araştırma kapsamında, üç orta ölçekli açık kaynak model — Gemma3-IT (Google), Qwen2.5 Instruct (Alibaba) ve Mistral Nemo (Mistral AI) — kullanıldı. Hem modellerin iş birliğinden ve hem de bağlamsal veritabanı içeriğinden yararlanılarak, Spider geliştirme değerlendirme setinde %81,3 yürütme doğruluğuna ulaşıldı. Bu sonuç, her bir modelin bireysel performansının üzerinde olup, C3-SQL'e kıyasla yalnızca %0,6 ve DIN-SQL'e kıyasla %1,5 daha düşüktür. Sonuçlar, çalışmanın ortaya koyduğu yaklaşımın etkinliğini göstermektedir.
Natural Language to SQL (NL2SQL), also known as text-to-SQL, refers to the task of converting natural language questions into equivalent SQL queries. This process traditionally requires specialized SQL knowledge and can be time-consuming when performed manually by data scientists. To address this challenge, researchers have investigated methods for enabling natural language communication with databases, aiming to establish an effective interface that serves as a bridge between users and data systems. Automating NL2SQL tasks has the potential to accelerate data-driven decision-making by streamlining the data retrieval process. Over around thirty years, approaches have evolved from rule-based grammar systems to database-aware sequence-to-SQL models. However, with the emergence of large language models (LLMs), progress in this field has significantly accelerated, achieving breakthroughs that were previously unattainable. In this study, NL2SQL task is attempted to be addressed by leveraging the joint reasoning power of mid-sized context-aware open language models, rather than relying on large-scale models such as GPT. The objective is to explore whether competitive performance can be achieved using models that require significantly fewer computational resources. Three mid-sized open-source models — Gemma3-IT (Google), Qwen2.5 Instruct (Alibaba) and Mistral Nemo (Mistral AI) — are utilized as the base models in this research, and it achieved an execution accuracy of 81.3% on the Spider development evaluation set by harnessing their collaborative work, slightly lower than two baseline studies, by just 0.6% compared to C3-SQL and 1.5% compared to DIN-SQL, indicating the effectiveness of this approach.
Natural Language to SQL (NL2SQL), also known as text-to-SQL, refers to the task of converting natural language questions into equivalent SQL queries. This process traditionally requires specialized SQL knowledge and can be time-consuming when performed manually by data scientists. To address this challenge, researchers have investigated methods for enabling natural language communication with databases, aiming to establish an effective interface that serves as a bridge between users and data systems. Automating NL2SQL tasks has the potential to accelerate data-driven decision-making by streamlining the data retrieval process. Over around thirty years, approaches have evolved from rule-based grammar systems to database-aware sequence-to-SQL models. However, with the emergence of large language models (LLMs), progress in this field has significantly accelerated, achieving breakthroughs that were previously unattainable. In this study, NL2SQL task is attempted to be addressed by leveraging the joint reasoning power of mid-sized context-aware open language models, rather than relying on large-scale models such as GPT. The objective is to explore whether competitive performance can be achieved using models that require significantly fewer computational resources. Three mid-sized open-source models — Gemma3-IT (Google), Qwen2.5 Instruct (Alibaba) and Mistral Nemo (Mistral AI) — are utilized as the base models in this research, and it achieved an execution accuracy of 81.3% on the Spider development evaluation set by harnessing their collaborative work, slightly lower than two baseline studies, by just 0.6% compared to C3-SQL and 1.5% compared to DIN-SQL, indicating the effectiveness of this approach.
Description
Keywords
Bilgisayar Mühendisliği Bilimleri-Bilgisayar ve Kontrol, Computer Engineering and Computer Science and Control
Turkish CoHE Thesis Center URL
Fields of Science
Citation
WoS Q
Scopus Q
Source
Volume
Issue
Start Page
End Page
77
Collections
Sustainable Development Goals
3
GOOD HEALTH AND WELL-BEING
