## 3 Research Methodology
### Language Models Under Test  
Table 2 provides an overview of the language models used in this study, highlighting their capabilities, parameter sizes, architectural designs, and whether they are commercial or open-source. The models studied include LLaMA 3.3-70B, Mixtral 8x22B, Gemini-1.5, Claude 3.5, GPT-4o, GPT-4o-Mini, and Qwen-2.5-72b. The models vary widely in terms of their parameter counts and design. LLaMA 3.3-70B, for instance, is an open-source model with 70 billion parameters known for its flexibility and efficiency in token usage. Mixtral 8x22B adopts an ensemble-based approach with 176 billion parameters, leveraging multiple smaller models to enhance scalability. \begin{table}
\begin{tabular}{l l} \hline \hline
**Natural Language Question** & **SQL Query** \\ \hline What are the details of male patients admitted in 2020? & SELECT * FROM demographics WHERE gender=\"M’ AND admission\_year=2020; \\ List all laboratory tests with abnormal results for patient ID 12345. & SELECT test\_name, result FROM lab\_tests WHERE patient\_id=12345 AND abnormal=1; \\ Show prescriptions of antibiotics for patients under 18 years old. & SELECT * FROM prescriptions WHERE drug\_type=\"antibiotic’ AND age<18; \\ Retrieve all diagnoses for patients who underwent surgery in June 2021. & SELECT diagnoses FROM procedures JOIN diagnoses ON procedures.patient\_id = diagnoses.patient\_id WHERE procedures.date BETWEEN *1 June 2021* AND *30 June 2021* AND procedures.type=’surgery’; \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Examples of question–query pairs from the TREQS dataset. Commercial models, such as Gemini-1.5 and Claude 3.5, are designed to balance performance and cost. Gemini focuses on lightweight applications, while Claude is optimized for human-aligned conversational tasks. GPT-4o is a highly capable commercial model with 175 billion parameters, excelling in accuracy but at a premium cost. GPT-4o-Mini provides a compact alternative that offers similar functionality in a more cost-effective package. The architectural differences also reflect their intended applications. Transformer encoder-decoder architectures, like Gemini-1.5, are suitable for tasks requiring balanced input-output token usage. In contrast, decoder-only architectures dominate large-scale models such as GPT-4o and LLaMA, emphasizing generative capabilities. This model diversity ensures that the study captures a broad spectrum of performance, cost, and architectural trade-offs, offering valuable insights into their application in natural language to SQL transformations. LLaMA 3.3-70B: LLaMA (Large Language Model Meta AI) 3.3-70B represents the latest iteration in Meta's LLaMA series, designed for scalability and efficiency. With 70 billion parameters, it excels in contextual understanding and zero-shot learning tasks. Its applications span conversational AI, code generation, and multilingual text processing [29]. Mixtral 8x22B: Mixtral 8x22B is a cutting-edge sparse mixture-of-experts (SMoE) model with 141 billion parameters, of which 39 billion are active during computation. This architecture achieves high performance with reduced computational requirements and excels in large-scale and complex tasks. Its dynamic parameter activation ensures efficiency and adaptability, making it suitable for research and high-demand industry applications [30]. Gemini 1.5 Pro: Gemini Pro by Google DeepMind integrates advanced natural language understanding with Vision-Text alignment, excelling in video analysis, document intelligence, and dynamic content generation. With a focus on scalability and innovation, it serves the enterprise and research needs effectively [31]. Claude 3.5:Anthropic's Claude 3.5 emphasizes ethical principles and human-aligned AI, featuring mechanisms for reinforcement learning and interpretability. It is ideal for applications in conversational AI, educational tools, and customer support systems, adhering to rigorous safety standards [32].