This study comprehensively examines recent advancements and persistent challenges in the development of Text-to-SQL systems, specifically focusing on the integration of agentic workflows with a RAG or Graph-Retrieval Augmented Generation (Graph-RAG) approach. The core task of translating natural language queries into Structured Query Language (SQL) statements aims to democratize data access. However, existing methods, including standalone Large Language Models (LLMs), frequently exhibit limitations related to the ambiguity of natural language, the complexity of real-world database schemas, and the generation of factually incorrect or syntactically invalid SQL. This review synthesizes the literature to demonstrate how multi-agentic frameworks with RAG and Graph-RAG architectures address these issues. The decomposition of complex queries into sub-tasks including intent classification, schema linking, and error corrections posited to enhance the system's flexibility, generalization capabilities, and overall reliability. Concurrently, the RAG and Graph-RAG database context approach offers a promising method for grounding LLMs with high-fidelity, structured, and contextual information. By leveraging vector databases or knowledge graphs to represent database schemas and domain-specific knowledge, these RAG systems augment the LLM’s prompt, thereby mitigating hallucinations and improving the accuracy of the generated SQL. TigerVector illustrates the potential of hybrid retrieval methods that combine semantic and relational search within a single graph database, enabling multi-hop reasoning crucial for handling complex enterprise and financial datasets. Despite these advancements, several challenges remain, notably the automation of creating effective, LLM-friendly database representations and achieving fully autonomous continual learning. Future research should focus on fortifying security protocols to facilitate the robust and scalable Text-to-SQL AI Agentic Graph-RAG workflows.
Paper
Full text
Text to SQL AI Agentic Workflow Implementations: A Systematic Literature Review
Semantic Scholar · 2025
Abstract
This study comprehensively examines recent advancements and persistent challenges in the development of Text-to-SQL systems, specifically focusing on the integration of agentic workflows with a RAG or Graph-Retrieval Augmented Generation (Graph-RAG) approach. The core task of translating natural language queries into Structured Query Language (SQL) statements aims to democratize data access. However, existing methods, including standalone Large Language Models (LLMs), frequently exhibit limitations related to the ambiguity of natural language, the complexity of real-world database schemas, and the generation of factually incorrect or syntactically invalid SQL. This review synthesizes the literature to demonstrate how multi-agentic frameworks with RAG and Graph-RAG architectures address these issues. The decomposition of complex queries into sub-tasks including intent classification, schema linking, and error corrections posited to enhance the system's flexibility, generalization capabilities, and overall reliability. Concurrently, the RAG and Graph-RAG database context approach offers a promising method for grounding LLMs with high-fidelity, structured, and contextual information. By leveraging vector databases or knowledge graphs to represent database schemas and domain-specific knowledge, these RAG systems augment the LLM’s prompt, thereby mitigating hallucinations and improving the accuracy of the generated SQL. TigerVector illustrates the potential of hybrid retrieval methods that combine semantic and relational search within a single graph database, enabling multi-hop reasoning crucial for handling complex enterprise and financial datasets. Despite these advancements, several challenges remain, notably the automation of creating effective, LLM-friendly database representations and achieving fully autonomous continual learning. Future research should focus on fortifying security protocols to facilitate the robust and scalable Text-to-SQL AI Agentic Graph-RAG workflows.