Optimizing Financial Decision-Making in Cloud Environments: A GenAI-driven Approach to Convert Natural Language to SQL
Modern enterprises increasingly leverage public cloud services to host application workloads with underlying cloud components, service tiers, and associated costs. These usage-based charging models introduce complexity. This necessitates the analysis of substantial data volumes to derive valuable insights. In this paper, we aim to address the challenge of enabling business and financial stakeholders to efficiently interpret cloud cost data and its trends without SQL expertise. We present an AI-powered system built on the DSPy framework that translates natural language questions into SQL queries using an enterprise-grade Large Language Model (LLM), delivering context-aware and desired responses. Existing dashboards and NLP approaches rely on rule-based parsing, requiring predefined data schemas and manual configuration. DSPy also uses these schemas but enhances flexibility by adapting them through structured pipelines and multi-step reasoning to improve accuracy. To train and evaluate our model, we augment a small dataset of question-SQL pairs through LLM-based generation and manual refinement. Additionally, we develop a custom recommendation engine using search-based techniques in Python to identify and disambiguate field names and values for both users and the LLM. Our system achieves 90% execution accuracy on our dataset, which indicates that the generated SQL queries return correct results when executed on the target database. These results demonstrate the effectiveness of prompt-tuned LLMs and in-context learning in providing a scalable, accessible solution for enterprise data analysis, ultimately enhancing decision-making in financial management.
Authors
- G. Apparao Naidu (ORCID: https://orcid.org/0000-0002-2289-7213)
- B. L. Manjunatha
- Pratima Chinta
- Anand Ponnath
Institutions
- Human Factors (Norway) (NO)
- Systems, Applications & Products in Data Processing (United Kingdom) (GB)
- Communications & Power Industries (United States) (US)
Publication Details
- Published
- 2025-08-04
- DOI
- https://doi.org/10.1109/coins65080.2025.11125795
- Citations
- 1
- Primary Topic
- Big Data and Business Intelligence
- Type
- article
- Field-Weighted Citation Impact
- 2.28