CHASE-SQL: Multi-Path Reasoning and Preference Optimized Candidate Selection in Text-to-SQL
Mohammadreza Pourreza Hailong Li Ruoxi Sun Yeounoh Chung Shayan Talaei Gaurav Tarlok Kakkar Yu Gan Amin Saberi Fatma Ozcan Sercan O Arik
We present CHASE-SQL, a novel framework addressing large language model (LLM) performance challenges for Text-to-SQL tasks by leveraging multi-agent modeling and test-time compute for improved candidate generation and selection. CHASE-SQL uses LLMs to generate diverse SQL candidates with: (1) a divide-and-conquer approach to break down complex queries, (2) chain-of-thought reasoning based on query execution plans, and (3) instance-aware synthetic example generation for tailored few-shot demonstrations. A selection agent ranks candidates via pairwise comparisons using a fine-tuned binary selection LLM, offering robust performance. This framework improves SQL query quality and diversity, achieving state-of-the-art execution accuracy of 73.0% on the BIRD Text-to-SQL benchmark test set, topping the leaderboard at the time of submission.
Text-to-SQL, LLM, Databases
CHASE-SQL is a new framework that improves LLM performance by increasing test-time compute. It achieves state-of-the-art execution accuracy on the BIRD dataset.