DexterSQL: Deep Schema Exploration and Rule-based Correction for Text-to-SQL Generation
Di cosa parla
Conversione di una domanda in linguaggio naturale in una query SQL può fallire per colonne ambigue, errori ricorrenti e condizioni mancanti o posizionate male nelle domande complesse. DexterSQL, senza riaddestrare il modello principale, esplora lo schema per capire meglio i ruoli delle colonne, ricava regole correttive da errori osservati durante l'addestramento e usa la struttura della frase per generare più versioni della query finale, riducendo gli sbagli.
Cosa permette di osservare
Offre spunti su come correggere automaticamente errori ripetuti e risolvere ambiguità dello schema senza modificare i modelli di base, e su quanto regole ricavate da esempi concreti possano funzionare su database diversi.
Dalla fonte
Prompting-based (\textit{i}.\textit{e}., non-fine-tuning) Text-to-SQL methods, where underlying large language model parameters are not changed for the task, face three problems: (\textit{i})~relying on coarse-grained schema information that may not reveal the fine-grained relationships needed to distinguish ambiguous columns, (\textit{ii})~not capturing recurring SQL-generation failures, and (\textit{iii})~suffering from omission, hallucination, or misplacement of conditions in complex questions. This paper develops \textsc{DexterSQL}, a prompting/non-fine-tuning-based Text-to-SQL system that improves SQL generation with three novel components: (\textit{i})~\emph{deep schema explorator} that identifies ambiguous columns, analyzes their individual and joint data distributions to uncover their relationships and the distinct role of each, (\textit{ii})~\emph{database-agnostic rule creator…