Artificial Intelligence Breakthrough: Text2SQL Conversion Empowers Data-Driven Decision Making

A breakthrough in artificial intelligence has been achieved by Anhui University researchers, who have successfully developed a text2SQL conversion system that enables data-driven decision making in modern enterprises. The system, based on the RETRIEVAL-AUGMENTED GENERATION (RAG) framework, combines the advantages of retrieval and generation to improve the accuracy and relevance of answers. This innovation streamlines data retrieval processes and reduces technical barriers for non-specialist users, while achieving state-of-the-art performance in SQL query generation for complex tasks.

Key Takeaways:

  • The RAG framework improves the accuracy and relevance of answers by combining retrieval and generation, making it an effective tool for data-driven decision making.
  • The text2SQL business intelligence system based on RAG enables enterprise users to extract actionable insights from complex databases via intuitive natural language queries.
  • The system uses the BERT (Bidirectional Encoder Representations from Transformers) model for vectorized retrieval and the GPT-4 (Generative Pre-trained Transformer 4) pre-trained model for generation, combined with GNN (Graph Neural Network) modeling database structure.
  • The experimental results show that the BERT + GPT-4 + GNN model performed excellently in matching accuracy for multi-table joins and nested queries, with a query matching accuracy of 52.3% and 55.1% for multi-table joins, and 60.2% and 61.9% for nested queries with multi-table joins.
  • The user satisfaction score of the BERT + GPT-4 + GNN model was the highest, verifying its superiority in practical applications.

Statistics:

  • The query matching accuracy of multi-table joins of BERT + GPT-4 + GNN was 52.3% and 55.1%, respectively, when the beam width was 1 and 10.
  • The query matching accuracy of nested queries with multi-table joins of BERT + GPT-4 + GNN was 60.2% and 61.9%, respectively, when the beam width was 1 and 10.

Sources:

  • "Based on BERT-GPT-GNN Converged Architecture: Intelligent Generation Engine for Complex SQL Queries in Business Intelligence" (Discover Artificial Intelligence, 2025, 5(1): 1-21) - Springer
  • http://dx.doi.org/10.1007/s44163-025-00381-y
  • Shiwei Chu, School of Electronic Information Engineering, Anhui University - Contact for more information