Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

NIFT-SQL: Customer-Supervised Table Scoring for Enterprise Text-to-SQL Retrieval

NIFT-SQL trains per-customer table scorers that beat hybrid search for enterprise text-to-SQL

  • Problem Generic table retrieval fails on enterprise schemas with hundreds of cryptic table names. Search ranks tables by wording, so it misses tables a query needs but does not resemble.
  • Method NIFT-SQL trains a small scorer on each customer's example questions. It fuses that scorer with hybrid search over a fine-tuned retriever, using a logistic regression fitted on held-out questions.
  • Results NIFT-SQL reaches 69.2% complete@15 on BEAVER, versus 30.4% for hybrid search.

Why finding tables stalls enterprise text-to-SQL

Schema-linking hints roughly double execution accuracy, so the table step is the first thing worth fixing.

Enterprise schemas defeat generic retrieval for several reasons that compound. Names such as fclt_org_dlc_key carry local conventions that a general embedding model has never seen. A customer's schema can run to hundreds or thousands of tables, and LiveSQLBench-Large has 971 tables in 18 databases, about 54 per database.

The usual responses are a stronger general model, a zero-shot reranker, an LLM that reads the schema, or a hand-built semantic layer. The authors take a different route: many enterprise deployments already have verified example questions with their SQL. A few dozen to about ninety of these examples already give large gains over search, which is the opening the method uses.

The core idea: ask each table whether the query needs it

Search cannot answer that question, because it ranks tables by how closely they match the question's wording. NIFT-SQL keeps hybrid search in the pipeline, but its retriever is fine-tuned on the same example questions. A small learned fusion then merges the scorer's judgment with the search signal.

The scorer's label is a necessity label, not topical relevance. The hard negatives are tables that look relevant to the question but are not used.

The scorer's input is the question, the table's card, and up to six of the table's declared joins. The pre-specified alternative is the Laya decision model, which answers yes or no in a single forward pass.

How one question moves through the pipeline

The two scores combine as 0.6 × dense plus 0.4 × BM25, and the authors leave those weights untuned. NIFT-SQL first fine-tunes BGE per customer with a contrastive loss, using in-batch negatives plus one hard negative. That fine-tuning runs for 2 epochs at learning rate 2e-5 with batch size 32. NIFT-SQL-base keeps the off-the-shelf BGE, and BM25 stays unchanged in both variants.

Figure 1: NIFT-SQL at inference: hybrid search with a retriever fine-tuned per customer, a per-customer
scorer over every table, and a fusion fitted on held-ou…

Figure 1 : NIFT-SQL at inference: hybrid search with a retriever fine-tuned per customer, a per-customer scorer over every table, and a fusion fitted on held-out questions; the optional high-accuracy mode adds two features from a zero-shot reranker over the candidates

Original paper · CC BY 4.0 · Arjun Rao, Nishant Gopinath · NIFT-SQL: Customer-Supervised Table Scoring for Enterprise Text-to-SQL Retrieval · Original paper figure · Extracted the figure area from page 4 of the original PDF.

The scorer estimates, for each question and table, the probability that the table is needed to write the SQL. Its positives are gold tables from the relevance judgments, so join-only tables count as positives even when they look unrelated. Each training question contributes every gold table as a yes, the four top non-gold hybrid results as hard negatives, and one random non-gold table as a no.

The scorer reads the question, the table's card, and up to six declared joins, and it scores every table in the schema. The headline cross-encoder is BAAI/bge-reranker-large, fine-tuned for 4 epochs with binary cross-entropy at learning rate 2e-5. Inputs are truncated at 512 tokens, and no input reached that limit because cards are capped at 700 characters.

Laya, the pre-specified decision model with 421M parameters, reserves 10% of the training rows for temperature scaling. The fusion doesn't treat either scorer's output as a calibrated probability, so it uses the scorer's logit and rank.

Each question's candidates are the union of the scorer's top 50 and search's top 50, about 80 to 90 tables in these collections. The features cover the scorer logit, the scorer rank, the search rank, and the dense and BM25 components. They also include the rank gap between scorer and search, and the best search and scorer ranks inside the candidate's database.

A standardized logistic regression with C = 1 fits per customer on one row per candidate of each validation question. On seed 1, BEA VER gives 63 validation questions and 5,092 rows, with 6.2% positive. Fitting on training questions would use overconfident scores, so validation questions keep the fusion honest.

The optional high-accuracy mode scores every candidate with Qwen3-Reranker-8B, using the prompt in Appendix E. The fusion ranks candidates by probability, and the remaining tables follow in search order.

What is measured, on which collections, and under which split rules

The study uses three collections from a public table-retrieval benchmark: BEA VER, LiveSQLBench, and LiveSQLBench-Large. BEA VER has 463 tables in 6 databases, LiveSQLBench has 244 tables in 22 databases, and LiveSQLBench-Large has 971 tables in 18 databases. Table 1 also shows the mean tables per database, with 77 for BEA VER, 11 for LiveSQLBench, and 54 for LiveSQLBench-Large.

The authors report K equal to 8 and 15 as two table-context budgets, and they add K = 5 and 25 as extra results.

Questions that share a gold-table set, or share the same question text within a customer, are linked, and each linked group goes to exactly one part. The authors used seed 0 for development only and then ran the test evaluations on seeds 1 to 4, with separately trained models for each split. After inspecting these results, they added a supervised cross-encoder to test whether the gains needed Laya or could come from conventional per-customer supervision.

The authors say the comparison between the cross-encoder and Laya doesn't establish statistical equivalence.

Later analyses add a fine-tuned retriever and a zero-shot reranker's scores, and the authors fixed those settings before test scoring.

Does the trained scorer add to search and to a trained retriever

NIFT-SQL-base with the fine-tuned cross-encoder reaches 63.7%, 86.2%, and 80.0% complete@15 on the three collections, averaged over three training runs. The full NIFT-SQL pipeline, with the fine-tuned retriever added, scores 69.2%, 89.5%, and 85.6% complete@15 across the three collections. Among the methods in Table 3, the fine-tuned cross-encoder variant of NIFT-SQL-base takes the top complete@8 on all three collections.

It also takes the top complete@15 on LiveSQLBench, at 86.2%.

The fine-tuned retriever, trained on the training questions only, reaches 58.9%, 73.1%, and 58.1% complete@15 when averaged over its three trainings. Against that matched retriever, NIFT-SQL leads at complete@15 by 8.1, 7.7, and 15.1 points, and at complete@8 by 12.9, 14.4, and 23.7 points. The base pipeline's lead shrinks to 2.6, 4.4, and 9.5 points at complete@15, and only the last interval excludes zero.

So the advantage looks mainly like a matter of the top of the ranking rather than the whole list.

With off-the-shelf search, the zero-shot cross-encoder without fine-tuning sits about 21 points lower on complete@15. That gap suggests per-customer labels, rather than the cross-encoder architecture alone, drive much of the gain. It shows no resolved difference on LiveSQLBench and leads only on LiveSQLBench-Large, by 13.2 points.

Database grouping and the zero-shot reranker

Grouping a ranking by database, with no training, moves LiveSQLBench more than any other step in this comparison. Grouped search rises from 41.0% to 61.1% complete@15 on LiveSQLBench. The same grouping lifts the reranker from 77.1% to 91.8% on that collection. So on these collections, most of what the learned fusion adds over rank averaging is the database grouping.

On LiveSQLBench-Large, the learned fusion still leads by 4.8 [0.4, 9.4].

Against grouped baselines, NIFT-SQL-base with the cross-encoder leads search by 33.9, 25.0, and 53.8 points in the main run. Over three trainings, its lead over the grouped reranker on LiveSQLBench-Large is 35.0 [26.7, 43.9]. On BEA VER, its lead over the grouped reranker is 14.3 points in the main run and 10.7 [−0.7, 22.3] over three trainings, which is not resolved.

On LiveSQLBench, the grouped reranker scores 5.6 points above NIFT-SQL-base, a loss that is resolved over three trainings at −5.7 [−10.7, −0.7]. With the database given, that added value is small on the two LiveSQLBench sets, at +0.6 and +1.1.

Against it, NIFT-SQL leads by 16.3 [4.5, 28.4] points at complete@15 on BEA VER, with the reranker routed by database and its variant chosen on validation. The other differences against the validation-chosen reranker remain unresolved, and NIFT-SQL leads it at complete@8 on LiveSQLBench-Large by 11.5 [3.5, 20.0]. Adding the reranker's scores as two fusion features gives the high-accuracy mode 72.4%, 92.5%, and 88.6% complete@15.

The high-accuracy mode adds 3.2 [−1.9, 8.9] points at complete@15 on BEA VER, and 3.0 [0.5, 5.9] on LiveSQLBench.

How many labeled questions the scorer needs

The authors varied the share of questions used to train the scorer, comparing a 10% setting with the main 50% setting. At 10%, the setting uses 21 training questions for BEA VER and 69 for the LiveSQLBench customer. Figure 2 plots complete@15 against training size, averaged over seeds 1 to 4.

Figure 2: NIFT-SQL-base complete@15 by training size, test, seeds 1 to 4 (values in Table F5)

Figure 2 : NIFT-SQL-base complete@15 by training size, test, seeds 1 to 4 (values in Table F5)

Original paper · CC BY 4.0

At 10%, NIFT-SQL-base with the cross-encoder improves complete@15 over search by 26.2 [10.5, 41.4], 41.8 [34.2, 49.7], and 55.3 [46.8, 63.4] points. These are the gains on BEA VER, LiveSQLBench, and LiveSQLBench-Large, each with its interval. On LiveSQLBench-Large, the same pipeline with Laya rises from 21.5% to 54.7% as the scorer-training fraction goes from 10% to 50%.

Over the same change, NIFT-SQL-base rises from 63.5% to 79.1% on that collection. Gains diminish after 30%, and at 30% the intervals include zero for all three collections.

At 10%, the cross-encoder pipeline scores higher than the Laya pipeline, at 56.5, 82.7, and 77.0 complete@15 against 44.6, 74.7, and 63.5. That comparison rests on a single Laya training, and the authors didn't measure Laya's variation across trainings. Variation at smaller training sizes also remains unmeasured, so the gap may shift.

The fusion also works with few labels, because it can be fitted on a small validation set.

Cost of scoring every table

Scoring every table costs GPU time that grows with schema size, and the paper prices it on one GPU at an assumed $1.50 per GPU hour.

The cross-encoder costs 0.86 s, 0.37 s, and 1.94 s per question when it scores all tables on BEA VER, LiveSQLBench, and LiveSQLBench-Large. Laya's full-schema scoring takes 1.29 s, 0.71 s, and 3.74 s per question on the same three collections. Routed to two databases, the Qwen3-Reranker-8B costs 21.3 ms, 25.4 ms, and 31.6 ms per table, against 1.8 ms, 1.5 ms, and 2.0 ms for the cross-encoder.

The scorer dominates the cost, and because it scores every table, its cost grows linearly with schema size.

The authors estimate that scoring only search's top 50% of tables would halve the number of question-table pairs scored. This restricted budget meets the pre-set validation rule, but they haven't measured its end-to-end gain. That gain will depend on batching and fixed overhead, which the authors haven't measured. On LiveSQLBench-Large that means about 54 tables per database instead of 971.

Where the results stop and what was not tested

The study measures retrieval coverage only, so it doesn't show downstream SQL execution accuracy. Complete retrieval doesn't guarantee correct or fully executable SQL, because generation errors can still arise in mapping question intent to SQL logic. Alternative correct queries may also use different table sets than the reference query. The authors say strong retrieval is an important step, but not sufficient on its own for end-to-end text-to-SQL deployment.

The main analyses use the older BEA VER release with 209 questions over 463 tables. The newer release, with 7,857 synthetic and 121 real questions and one split seed, is not comparable to the BEA VER leaderboard because the private test set wasn't used.

The fine-tuned retriever transfers well to those real questions in the same setting. Training questions are often curated or synthetic in deployment, and they differ from what users ask. Only BEA VER comes from real enterprise data warehouses, and the two LiveSQLBench sets have 42 or fewer test questions per seed in BEA VER's case. The LiveSQLBench sets share databases and many questions, so they count as one customer and their results are correlated.

The fine-tuned retriever and the reranker features were added after analyzing Sections 5 to 7, and the final intervals don't account for those choices. The reranker runs on the BGE hybrid top 100, and its routing variants were chosen per collection on validation questions. A stronger first-stage retriever such as Qwen3-Embedding-8B, or few-shot prompts, weren't tested for the reranker.

The intervals hold each trained model fixed, and retraining variation was measured for the cross-encoder but not for Laya. Speeds are measured with batched scoring, so interactive single-question latency is higher per table. Few-shot customer examples in the reranker prompt weren't tested, and the tables are ranked at a fixed count rather than by a probability threshold.

The main setting searches all databases, and a pipeline trained and fitted for a known database wasn't tested.

Synthetic-to-real transfer on a newer BEA VER release

The newer BEA VER release tests whether the lead holds outside the main collections, and it only partly does. NIFT-SQL beat search by 41.0 points at complete@15 on that release, and it led the matched retriever at complete@8 on synthetic questions by 9.4 points. It did not lead the matched retriever at complete@15, so the lead is narrower than the main results suggest.

The release uses 7,857 synthetic and 121 real questions with one split seed, and the authors did not use its private test set.

The trained cross-encoder alone fell below search on real logged questions, while the fine-tuned retriever transferred well. The authors trained the scorer on synthetic questions, which are often curated and differ from what users ask. Only BEA VER comes from real enterprise data warehouses, while the LiveSQLBench databases were built for a benchmark.

Because of this transfer gap, the authors conclude that a fine-tuned retriever is a strong and cheaper baseline. Without the fine-tuned retriever, complete@15 is 3 to 6 points lower.

Richer schema metadata is one open question the authors leave for later work. Downstream SQL execution is another open question, since the paper measures retrieval coverage only.

Paper info

Authors
Arjun Rao, Nishant Gopinath
Venue
arXiv · Preprint
First published
2026-11-9
Added
2026-11-11
Updated
2026-11-9
Version
v1
arXiv
2611.12731
Category
cs.IR
Original paper terms
CC BY 4.0
What we show
Paper info, commentary and permitted figures from the original paper

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Abstract

Enterprise text-to-SQL starts with finding the tables a question needs, which is hard when a schema spans several databases and hundreds of cryptic tables. We ask whether models trained separately on each customer's example questions, reading only table names, column names, and declared keys, improve table retrieval. NIFT-SQL (Necessity-Informed Fusion for Text-to-SQL) fuses hybrid search over a retriever fine-tuned on the customer's questions with a fine-tuned 560M cross-encoder that scores every table for whether the query needs it, through a logistic regression fitted on held-out questions. On BEAVER, LiveSQLBench, and LiveSQLBench-Large (244 to 971 tables; four splits, three trainings), NIFT-SQL places every reference table in the top 15 for 69.2%, 89.5%, and 85.6% of test questions, against 30.4%, 41.0%, and 21.8% for hybrid search and 61.1%, 81.7%, and 70.4% for the fine-tuned retriever with the same labels. With off-the-shelf search, the cross-encoder without fine-tuning is 21 points lower. A zero-shot 8B reranker needs no labels and, routed by database, shows no resolved complete@15 difference on two collections; adding its scores as two fusion features gives a high-accuracy mode that reaches 72.4%, 92.5%, and 88.6%, ahead of the validation-selected zero-shot reranker variant on two collections, with no resolved difference on the third. Rank fusion of the two trained parts, grouped by database, shows no resolved difference from the learned fusion. Scored once on a newer BEAVER release, NIFT-SQL beats search and leads the label-matched retriever at top 8 on the synthetic test, but trails it at top 15 on real questions.

Quote from the paper

Arjun Rao, Nishant Gopinath (2026). NIFT-SQL: Customer-Supervised Table Scoring for Enterprise Text-to-SQL Retrieval. arXiv:2611.12731v1. https://arxiv.org/abs/2611.12731v1

BibTeX
@misc{rao2026nift,
  title = {{NIFT-SQL: Customer-Supervised Table Scoring for Enterprise Text-to-SQL Retrieval}},
  author = {Arjun Rao and Nishant Gopinath},
  year = {2026},
  eprint = {2611.12731},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.12731v1}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up