CORE-T: COherent REtrieval of Tables for Text-to-SQL
Hassan Soliman, Vivek Gupta, Dan Roth, Iryna Gurevych
TL;DR
CORE-T tackles open-book text-to-SQL over pooled, multi-source tables without db_id or gold foreign keys. It decomposes schema understanding offline via LLM-generated table purposes and a compatibility cache, then uses a single-shot LLM for join-coherent table selection atop a high-recall dense retrieval, followed by a lightweight restoration to recover strongly compatible tables. Across Bird, Spider, and MMQA, CORE-T delivers a higher table-selection F1 with up to $22.7$ points improvement, retrieves up to $42\%$ fewer tables, and boosts multi-table SQL execution accuracy by up to $5.0$ points on Bird and $6.9$ points on MMQA, while reducing LLM-token usage by roughly $4$–$5\times$ compared with heavier baselines. These gains demonstrate that offline schema conditioning plus a concise online decision step can achieve join-coherent, cost-efficient open-book retrieval suitable for realistic data-lake analytics.
Abstract
Realistic text-to-SQL workflows often require joining multiple tables. As a result, accurately retrieving the relevant set of tables becomes a key bottleneck for end-to-end performance. We study an open-book setting where queries must be answered over large, heterogeneous table collections pooled from many sources, without clean scoping signals such as database identifiers. Here, dense retrieval (DR) achieves high recall but returns many distractors, while join-aware alternatives often rely on extra assumptions and/or incur high inference overhead. We propose CORE-T, a scalable, training-free framework that enriches tables with LLM-generated purpose metadata and pre-computes a lightweight table-compatibility cache. At inference time, DR returns top-K candidates; a single LLM call selects a coherent, joinable subset, and a simple additive adjustment step restores strongly compatible tables. Across Bird, Spider, and MMQA, CORE-T improves table-selection F1 by up to 22.7 points while retrieving up to 42% fewer tables, improving multi-table execution accuracy by up to 5.0 points on Bird and 6.9 points on MMQA, and using 4-5x fewer tokens than LLM-intensive baselines.
