The Parameterization Gap: Backtracking Multimodal NL2PSQL
摘要
Program synthesis from user intent remains a core challenge in databases and programming languages. Prior neural and symbolic NL2SQL systems can generate executable queries from natural language (NL) or input-output (IO) examples. However, they often struggle with robustness and generalizability in real-world scenarios. Addressing these limitations, we propose the first multimodal pipeline for SQL query synthesis that jointly leverages NL intent and multiple IO example pairs. Our framework fuses large language models with a counter example guided inductive synthesis (CEGIS) inspired, backtracking pipeline—spanning user intent interpretation, schema mapping, and iterative generate-validate-repair loops. Empirical results on TPC-H benchmarks show our method outperforms leading NL2SQL and Multi-Modal SQL synthesis baselines, correctly synthesizing 19/22 parameterized queries demonstrating a twofold improvement over SOTA. Our results show that combining natural language with input-output examples, along with iterative counterexample-driven repair, significantly improves reliability. This approach increases the automation potential of data-centric applications and supports robust query synthesis in complex, real-world scenarios.