Table of Contents
Fetching ...

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.

CORE-T: COherent REtrieval of Tables for Text-to-SQL

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 points improvement, retrieves up to fewer tables, and boosts multi-table SQL execution accuracy by up to points on Bird and points on MMQA, while reducing LLM-token usage by roughly 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.
Paper Structure (82 sections, 5 equations, 6 figures, 9 tables)

This paper contains 82 sections, 5 equations, 6 figures, 9 tables.

Figures (6)

  • Figure 1: Querying setups.Top: Closed-book: each query targets a known database. Bottom: Open-book: queries must be answered over integrated clusters of tables spanning various domains pooled from multiple database schemas.
  • Figure 2: Overview. CORE-T combines offline table enrichment and compatibility caching with a lightweight online pipeline: DR, single-shot LLM selection, and a small additive adjustment.
  • Figure 3: Ablation (EM$_{\ge 2T}$). We compare using only the first stage of our pipeline (DR@10) vs. full CORE-T pipeline. All settings use UAE-Large-V1 embeddings and Llama-3.1-8B-Instruct as the table selector, varying only the SQL generator.
  • Figure 4: Illustration of table-table compatibility scoring. Given two candidate tables (e.g., Car Makers and Countries), we compute similarity based on column headers (exact and semantic) and column values (Jaccard overlap). Additional constraints (e.g., uniqueness or subset relations) refine the compatibility assessment. The maximum similarity score under these constraints is taken as the overall table-table compatibility score.
  • Figure 5: Initial dense retrieval with enriched table embeddings. Offline, each table is serialized into Markdown (with 5-row samples) and augmented with an LLM-generated purpose description; the concatenated text is embedded and indexed. At inference time, the query is embedded in the same space and the top-$K$ tables are retrieved by cosine similarity, forming the high-recall candidate set $T_K(q)$.
  • ...and 1 more figures