MPCR-SQL: Enhancing SQL Generation by Multi-path SQL Generation and Collective SQL Refinement

Min Hou, Yiming Huang, Shaopeng Wang

Published: 01 Jan 2026, Last Modified: 07 Jan 2026CrossrefEveryoneRevisionsCC BY-SA 4.0
Abstract: Recent advancements in large language models (LLMs) have markedly enhanced SQL generation. Nevertheless, existing approaches typically generate SQL queries without considering their diversity. In addition, current methods often encounter challenges in selecting the optimal SQL from multiple candidates. To mitigate these limitations, this study presents MPCR-SQL, which synergistically combines two key modules: (1) A Multi-Path SQL Generation module is designed to produce a broader spectrum of SQL queries by leveraging multiple models and prompts. (2) A Collective SQL Refinement module aims to identify the SQL most closely aligning with user intent through the aggregation of SQL candidates. Extensive experiments on multiple datasets substantiate the efficacy of MPCR-SQL in enhancing SQL generation.
Loading