CORE-T
COherent REtrieval of Tables
for Text-to-SQL
Retrieving compact, relevant, and join-coherent table sets from pooled open-book collections.
TL;DR
Dense retrieval finds relevant tables but also many distractors. CORE-T enriches tables offline, selects a coherent subset with one LLM call, and restores strongly compatible tables. It improves table-selection F1 by up to 22.7 points and multi-table execution accuracy by up to 24.4 points over dense retrieval, while outperforming join-aware and agentic baselines in nearly every available comparison.
Why open-book retrieval is hard
Without a database identifier, retrieval must disambiguate similar tables and preserve the complete join path.
Open-book setting
Database ID unavailableHow CORE-T works
Build semantic and relational evidence once, then reuse it for every question.
Convert one user question into a compact, join-ready schema with a single selection call.
Retrieval designed for coherent sets
Training-free, join-coherent retrieval
CORE-T combines purpose-enriched relevance with cached table-to-table compatibility, without requiring database IDs, gold foreign keys, or new model training.
Compact online inference
One LLM selection call replaces iterative or multi-draft inference, while the adjustment stage provides targeted recall recovery.
Pooled multi-database evaluation
Experiments span BIRD, SPIDER, MMQA, and BEAVER in open-book settings with table retrieval and end-to-end SQL execution metrics.
Four open-book benchmarks
Tables are pooled across databases or schemas and database identifiers are removed.
1,534 queries
1,034 queries
1,105 queries
209 queries
MMQA uses a stratified one-third subset. BEAVER is already open-book; the other corpora are pooled to approximate integrated multi-source analytics.
Results across every baseline
Complete main-paper results for table selection, downstream SQL execution, and selection efficiency.
Table 2. Table selection
Average number of returned tables, precision, F1, and perfect recall. All methods use UAE-Large-V1 for dense retrieval.
| Method | BIRD (n=1,534, gold avg.=1.95) | SPIDER (n=1,034, gold avg.=1.51) | MMQA (n=1,105, gold avg.=2.20) | BEAVER (n=209, gold avg.=4.44) | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Avg. | P | F1 | PR | Avg. | P | F1 | PR | Avg. | P | F1 | PR | Avg. | P | F1 | PR | |
| Llama-3.1-8B-Instruct selector | ||||||||||||||||
| DR@5 | 5.0 | 34.9 | 49.4 | 83.0 | 5.0 | 29.4 | 43.9 | 95.6 | 5.0 | 30.8 | 42.6 | 50.3 | 5.0 | 33.9 | 36.5 | 13.9 |
| ReAct | 4.8 | 43.1 | 55.6 | 86.1 | 4.5 | 39.7 | 52.2 | 92.8 | 6.1 | 29.6 | 40.4 | 53.1 | 8.4 | 9.3 | 12.2 | 8.1 |
| JAR@5 | 5.0 | 35.5 | 50.1 | 86.0 | 5.0 | 29.6 | 44.2 | 96.7 | - | - | - | - | - | - | - | - |
| REAR | 5.0 | 36.1 | 51.0 | 88.3 | 5.0 | 28.2 | 42.1 | 90.8 | 5.0 | 28.4 | 39.2 | 47.8 | 5.0 | 33.6 | 35.5 | 8.1 |
| ARM | 5.3 | 40.4 | 53.5 | 90.9 | - | - | - | - | - | - | - | - | - | - | - | - |
| CORE-T | 4.1 | 50.0 | 62.3 | 90.0 | 4.2 | 40.2 | 53.8 | 96.6 | 5.1 | 38.4 | 49.2 | 61.3 | 5.1 | 39.3 | 39.5 | 15.3 |
| Qwen-2.5-7B-Instruct selector | ||||||||||||||||
| DR@5 | 5.0 | 35.2 | 49.8 | 84.2 | 5.0 | 29.6 | 44.1 | 96.4 | 5.0 | 31.1 | 43.0 | 51.0 | 5.0 | 34.8 | 37.3 | 14.8 |
| ReAct | 3.3 | 65.6 | 71.6 | 81.3 | 2.7 | 67.6 | 75.5 | 93.4 | 4.9 | 42.1 | 50.4 | 55.4 | 8.2 | 21.0 | 25.3 | 16.3 |
| JAR@5 | 5.0 | 35.5 | 50.1 | 86.0 | 5.0 | 29.5 | 44.1 | 96.3 | - | - | - | - | - | - | - | - |
| REAR | 5.0 | 36.1 | 51.0 | 88.3 | 5.0 | 28.2 | 42.1 | 90.8 | 5.0 | 28.4 | 39.2 | 47.8 | 5.0 | 33.6 | 35.5 | 8.1 |
| ARM | 3.5 | 59.2 | 68.3 | 84.6 | - | - | - | - | - | - | - | - | - | - | - | - |
| CORE-T | 3.1 | 63.1 | 72.3 | 87.0 | 3.0 | 54.4 | 66.8 | 94.9 | 4.1 | 48.3 | 56.4 | 59.4 | 5.3 | 42.8 | 43.0 | 17.7 |
On query-level table-selection F1, with Qwen-2.5-7B-Instruct as selector, CORE-T is significantly better in 17 of 19 dataset-baseline comparisons, tied with ReAct on BIRD, and significantly lower only against ReAct on SPIDER.
Table 3. End-to-end query execution accuracy
Execution accuracy with Llama-3.1-8B-Instruct as table selector, reported for multi-table queries, all queries, and the perfect-recall subset.
| Method | BIRD (n=1,534) | SPIDER (n=1,034) | MMQA (n=1,105) | BEAVER (n=209) | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| EXMT76.4% | EXall100% | EXPR90.0% | EXMT44.4% | EXall100% | EXPR96.6% | EXMT99.6% | EXall100% | EXPR61.3% | EXMT98.6% | EXall100% | EXPR15.3% | |
| Llama-3.2-3B SQL generator | ||||||||||||
| DR@5 | 3.3 | 4.0 | 3.9 | 10.0 | 13.9 | 13.9 | 2.1 | 2.1 | 1.8 | 0.5 | 0.5 | 0.0 |
| ReAct | 9.9 | 10.8 | 10.4 | 12.4 | 20.0 | 20.0 | 2.5 | 2.5 | 2.2 | 0.0 | 0.0 | 0.0 |
| JAR@5 | 7.8 | 8.3 | 8.1 | 10.9 | 14.4 | 14.4 | - | - | - | - | - | - |
| REAR | 9.6 | 10.0 | 9.8 | 26.4 | 29.6 | 29.3 | 8.4 | 8.3 | 6.9 | 1.0 | 1.0 | 0.0 |
| ARM | 4.9 | 5.1 | 5.0 | - | - | - | - | - | - | - | - | - |
| CORE-T | 15.7 | 16.6 | 16.2 | 34.4 | 34.5 | 34.1 | 18.9 | 18.8 | 15.8 | 0.5 | 0.5 | 0.5 |
| Oracle | 24.8 | 27.8 | 27.8 | 45.1 | 58.9 | 58.9 | 45.4 | 45.4 | 45.4 | 1.5 | 1.9 | 1.9 |
| Gemma-3-4B SQL generator | ||||||||||||
| DR@5 | 14.6 | 20.0 | 19.0 | 38.8 | 51.5 | 51.1 | 18.9 | 18.9 | 16.8 | 5.3 | 5.3 | 1.0 |
| ReAct | 15.3 | 21.2 | 20.5 | 40.1 | 51.8 | 51.5 | 18.0 | 17.9 | 15.2 | 3.4 | 3.3 | 0.5 |
| JAR@5 | 18.3 | 23.0 | 22.2 | 41.4 | 51.4 | 51.3 | - | - | - | - | - | - |
| REAR | 15.9 | 20.1 | 19.6 | 35.3 | 45.1 | 44.7 | 16.1 | 16.1 | 12.9 | 4.9 | 4.8 | 0.5 |
| ARM | 16.6 | 22.3 | 21.7 | - | - | - | - | - | - | - | - | - |
| CORE-T | 16.6 | 21.9 | 21.1 | 43.8 | 54.2 | 53.8 | 22.8 | 22.8 | 20.8 | 3.9 | 3.8 | 1.0 |
| Oracle | 24.7 | 30.4 | 30.4 | 53.8 | 65.7 | 65.7 | 47.6 | 47.5 | 47.5 | 4.4 | 4.8 | 4.8 |
| GPT-4o-mini SQL generator | ||||||||||||
| DR@5 | 34.6 | 40.0 | 37.7 | 53.2 | 65.4 | 64.7 | 31.6 | 31.7 | 27.8 | 5.3 | 5.3 | 1.9 |
| ReAct | 38.1 | 42.5 | 40.9 | 50.5 | 63.7 | 63.4 | 33.2 | 33.1 | 28.7 | 3.4 | 3.3 | 0.5 |
| JAR@5 | 36.8 | 41.6 | 40.4 | 55.3 | 66.0 | 65.7 | - | - | - | - | - | - |
| REAR | 38.4 | 42.3 | 40.6 | 52.3 | 62.3 | 61.7 | 28.9 | 29.0 | 25.2 | 4.4 | 4.3 | 0.5 |
| ARM | 37.9 | 42.3 | 41.5 | - | - | - | - | - | - | - | - | - |
| CORE-T | 38.6 | 43.0 | 41.6 | 56.9 | 66.7 | 66.2 | 35.8 | 35.8 | 33.3 | 5.3 | 5.7 | 1.9 |
| Oracle | 47.8 | 50.7 | 50.7 | 64.5 | 71.8 | 71.8 | 65.8 | 65.7 | 65.7 | 6.8 | 7.2 | 7.2 |
Table 4. Selection efficiency
Selection-step tokens in millions with UAE-Large-V1 embeddings and Llama-3.1-8B-Instruct as selector. Factors are relative to CORE-T.
| Method | BIRD | SPIDER | MMQA | BEAVER | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Input M | Output M | Total M | Input M | Output M | Total M | Input M | Output M | Total M | Input M | Output M | Total M | |
| ARM | 51.74.79x | 0.730.43x | 52.44.20x | - | - | - | - | - | - | - | - | - |
| ReAct | 43.54.03x | 1.070.63x | 44.53.57x | 24.24.99x | 0.740.65x | 24.94.16x | 26.64.65x | 0.840.68x | 27.53.95x | 2.61.25x | 1.215.05x | 3.831.64x |
| CORE-T | 10.81.0x | 1.711.0x | 12.51.0x | 4.81.0x | 1.141.0x | 5.991.0x | 5.71.0x | 1.231.0x | 6.961.0x | 2.11.0x | 0.241.0x | 2.331.0x |
Takeaway. CORE-T provides the strongest overall precision-recall and efficiency trade-off: it dominates the dense and join-aware baselines wherever they are available, usually outperforms the agentic alternative, and never produces a significant downstream execution loss.
Remaining challenge. BEAVER's anonymized schemas and many empty tables make it a demanding stress test. CORE-T leads in F1 and perfect recall, but absolute execution accuracy remains low even with oracle tables.
Getting started
The repository exposes each offline and online stage as a standalone Python script.
# Python 3.12 with uv
uv python install 3.12
uv venv .venv
source .venv/bin/activate
uv pip install -r requirements.txt
python offline_preprocessing/table_preprocessor.py \
--dataset bird \
--llm-model "huggingface:Qwen/Qwen2.5-7B-Instruct" \
--embedding-model "fireworks:WhereIsAI/UAE-Large-V1"
python offline_preprocessing/metadata_generator.py \
--dataset bird \
--llm-model "huggingface:Qwen/Qwen2.5-7B-Instruct" \
--embedding-model "fireworks:WhereIsAI/UAE-Large-V1"
python offline_preprocessing/compatibility_calculator.py \
--dataset bird \
--llm-model "huggingface:Qwen/Qwen2.5-7B-Instruct" \
--embedding-model "fireworks:WhereIsAI/UAE-Large-V1"
python dense_retriever.py \
--dataset bird --top-k 10 \
--llm-model "huggingface:Qwen/Qwen2.5-7B-Instruct" \
--embedding-model "fireworks:WhereIsAI/UAE-Large-V1"
python table_selector.py \
--dataset bird --top-k 10 \
--llm-model "huggingface:Qwen/Qwen2.5-7B-Instruct" \
--embedding-model "fireworks:WhereIsAI/UAE-Large-V1"
python table_augmentor.py \
--dataset bird --top-k 10 \
--llm-model "huggingface:Qwen/Qwen2.5-7B-Instruct" \
--embedding-model "fireworks:WhereIsAI/UAE-Large-V1"
Model provider IDs and API credentials are configured through command-line options and a local .env file. See the repository README for complete commands, downloads, SQL generation, and evaluation.
Citation
If you use CORE-T, please cite the current arXiv version.
@misc{soliman2026core-t,
title = {CORE-T: COherent REtrieval of Tables for Text-to-SQL},
author = {Hassan Soliman and Vivek Gupta and Dan Roth and Iryna Gurevych},
year = {2026},
eprint = {2601.13111},
archivePrefix = {arXiv},
primaryClass = {cs.CL},
url = {https://arxiv.org/abs/2601.13111}
}