Do LLMs Align with My Task? Evaluating Text-to-SQL via Dataset Alignment

2510.04919v1 cs.CL, cs.AI, cs.DB 2025-10-08
Авторы:

Davood Rafiei, Morgan Lindsay Heisler, Weiwei Zhang, Mohammadreza Pourreza, Yong Zhang

Abstract

Supervised Fine-Tuning (SFT) is an effective method for adapting Large Language Models (LLMs) on downstream tasks. However, variability in training data can hinder a model's ability to generalize across domains. This paper studies the problem of dataset alignment for Natural Language to SQL (NL2SQL or text to SQL), examining how well SFT training data matches the structural characteristics of target queries and how this alignment impacts model performance. We hypothesize that alignment can be accurately estimated by comparing the distributions of structural SQL features across the training set, target data, and the model's predictions prior to SFT. Through comprehensive experiments on three large cross-domain NL2SQL benchmarks and multiple model families, we show that structural alignment is a strong predictor of fine-tuning success. When alignment is high, SFT yields substantial gains in accuracy and SQL generation quality; when alignment is low, improvements are marginal or absent. These findings highlight the importance of alignment-aware data selection for effective fine-tuning and generalization in NL2SQL tasks.

Ссылки и действия

Связанные статьи

Play by the Type Rules: Inferring Constraints for LLM Functions in Declarative P...

## Контекст Интеграция LLM-powered operators в declarative query languages позволяет объединить дешевые и интерпретируем...

2025-09-26

Explaining Black-box Language Models with Knowledge Probing Systems: A Post-hoc ...

## Контекст Безрассильные языковые модели (PLM) обучены на больших объемах немаркированных данных и проявляют выдающиеся...

2025-08-27

MoNaCo: More Natural and Complex Questions for Reasoning Across Dozens of Docume...

## Контекст В последние годы технологии текстовой обработки и машинного обучения приобрели неоспоримую роль в решении ра...

2025-08-19