Abstract
Power grid data often contain highly abstract metadata, ambiguous business terms, and complex statistical scopes. These characteristics make general large language models prone to semantic deviation and SQL hallucination in Text-to-SQL tasks. To address this problem, this paper proposes SQL-GRID, a grounded retrieval and interactive disambiguation agent for Text-to-SQL over power grid data. The framework is based on a multi-agent collaboration mechanism. It integrates retrieval, validation, disambiguation, and SQL generation modules to transform natural language intent into accurate SQL statements. To bridge the gap between business semantics and database structures, this paper constructs a Business Knowledge Representation(BKR) based knowledge base, which integrates database structural information, business descriptions, real data samples, and statistical rules. A multi-strategy RAG method is also designed. It combines semantic vector retrieval with keyword matching and provides accurate domain knowledge for SQL generation. To address business ambiguity, this paper further proposes a closed-loop mechanism consisting of pre-generation disambiguation, interactive clarification, and post-generation validation. Through explicit human-machine interaction, the framework guides users to clarify statistical granularity and statistical scope constraints. This process effectively reduces uncertainty during SQL generation. Experimental results show that the proposed method achieves a metadata recall rate of 94% on the power grid dataset. The SQL execution rate increases from 40.2% in the traditional baseline to 84.6%. The semantic matching score reaches 4.85. These results show that the proposed framework significantly improves the accuracy and reliability of self-service queries in complex power grid scenarios.