A Semantic-Layer-Mediated Agent for Natural Language to SQL over Heterogeneous Enterprise Databases Researchers introduced a semantic-layer-mediated NL2SQL agent that decouples semantic intent from physical SQL execution, achieving 94.15% execution accuracy on the Spider2-snow benchmark and ranking third on the official leaderboard. The system uses a Semantic Model Query (SMQ) intermediate representation and a deterministic compiler to support SQLite, BigQuery, and Snowflake backends, substantially outperforming schema-only approaches. arXiv:2606.31041v1 Announce Type: new Abstract: Natural language-to-SQL NL2SQL over real-world enterprise databases remains significantly more challenging than on academic benchmarks. Enterprise schemas often contain hundreds of physical tables with cryptic column names, heterogeneous SQL dialects, and complex analytical workloads requiring nested aggregations, temporal reasoning, and multi-table joins. We present a semantic-layer-mediated NL2SQL agent that decouples semantic intent from physical SQL execution. Rather than generating SQL directly over raw schemas, the agent reasons over a curated semantic layer through a compact intermediate representation called the Semantic Model Query SMQ . A deterministic compiler translates each SMQ into dialect-specific SQL, providing verified building blocks that the agent composes into the final query. The system employs a constrained think-act loop, supports SQLite, BigQuery, and Snowflake backends, and is integrated into an end-to-end evaluation framework. Using Gemini 3 Pro, the system achieves 94.15% execution accuracy on the 547-task Spider2-snow benchmark, ranking third on the official leaderboard and substantially outperforming schema-only approaches. We describe the system architecture, SMQ representation, agent workflow, evaluation results, and discuss semantic-layer quality and the trade-off between improved grounding and overfitting.