arXiv:2605.18766cs.IRcs.AI2026-05ACL

根据查询需求动态调整表格检索数量,提升文本转SQL准确率。

Retrieve Only Relevant Tables Whether Few or Many: Adaptive Table Retrieval Method

论文配图:Retrieve Only Relevant Tables Whether Few or Many: Adaptive Table Retrieval Method
图 1 · 摘自论文原文
  • 用自适应阈值筛选相关表格,不再固定检索k个
  • 在Spider等数据集上提升检索与下游任务性能
  • 适合需要灵活检索的复杂自然语言查询场景

从大型数据库中为自然语言查询检索相关表格,是准确完成文本转SQL等任务的关键。现有方法通常固定选取相似度最高的k个表格,但不同查询所需表格数量差异大,无法预知。强制固定数量会导致检索不足或包含无关表格。为此,我们提出一种自适应表格检索方法,根据每个查询需求动态调整检索数量。具体采用自适应阈值机制筛选表格,并结合滑动窗口重排序算法高效处理大规模表格语料库。在Spider、BIRD和Spider 2.0上的大量实验表明,该方法有效克服了传统top-k策略的局限性,在检索及下游任务中均取得性能提升。代码与数据已开源。

原文摘要 · Abstract (English)

Retrieving relevant tables from extensive databases for a given natural language query is essential for accurately answering questions in tasks such as text-to-SQL. Existing table retrieval approaches select a pre-determined set of k tables with the highest similarity to the query. However, the number of required tables varies across queries and cannot be known in advance. Enforcing a fixed number of retrieved tables regardless of the query may either retrieve an undersized set, failing to obtain all necessary evidence, or retrieve an oversized pool, including irrelevant tables. To address this issue, we propose an adaptive table retrieval method that adjusts the number of tables retrieved according to the requirements of each query. Specifically, we utilize an adaptive thresholding mechanism to selectively retrieve tables and integrate a sliding-window reranking algorithm to efficiently process a large table corpus. Extensive experiments on Spider, BIRD, and Spider 2.0 demonstrate that our method effectively addresses the limitations of the top-k retrieval strategy, improving performance in retrieval and downstream tasks. Our code and data are available at https://github.com/sbY99/Adaptive-Table-Retrieval.

表格检索自适应文本转SQL

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。