arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2406.07913cs.CLcs.IR
收藏

DeTriever:基于解码器表示的检索器用于改进NL2SQL上下文学习

DeTriever: Decoder-representation-based Retriever for Improving NL2SQL In-Context Learning

The University of British Columbia(不列颠哥伦比亚大学);Huawei Technologies Canada Co., Ltd.(华为技术加拿大有限公司);University of Alberta(阿尔伯塔大学)

Yuxi Feng, Raymond Li, Zhenan Fan, Giuseppe Carenini, Mohammadreza Pourreza, Weiwei Zhang, Yong Zhang

AI总结:

DeTriever通过学习LLM隐藏状态的加权组合来检索NL2SQL演示示例,并设计代理分数评估示例收益,在单样本任务上显著超越现有基线。

摘要:

虽然上下文学习(ICL)已被证明是一种有效技术,能够提升大语言模型(LLM)在多种复杂任务中的表现,尤其是在将自然语言问题翻译为结构化查询语言(NL2SQL)方面,但如何选择最有益的演示示例仍然是一个尚未解决的研究问题。先前的工作通常采用现成的编码器来动态检索示例,然而外部检索器与LLM之间的表示能力存在固有差异。此外,优化示例选择是一项非平凡的任务,因为在不执行成对推理的情况下,没有直接的方法来评估示例的相对收益。为了解决这些不足,我们提出了DeTriever,这是一种新颖的演示检索框架,它学习LLM隐藏状态的加权组合,其中编码了丰富的语义信息。为了训练该模型,我们提出了一种代理分数,该分数基于输出查询之间的相似性来估计示例的相对收益。在两个流行的NL2SQL基准上的实验表明,我们的方法在单样本NL2SQL任务上显著优于最先进的基线方法。

英文摘要:

While in-context Learning (ICL) has proven to be an effective technique to improve the performance of Large Language Models (LLMs) in a variety of complex tasks, notably in translating natural language questions into Structured Query Language (NL2SQL), the question of how to select the most beneficial demonstration examples remains an open research problem. While prior works often adapted off-the-shelf encoders to retrieve examples dynamically, an inherent discrepancy exists in the representational capacities between the external retrievers and the LLMs. Further, optimizing the selection of examples is a non-trivial task, since there are no straightforward methods to assess the relative benefits of examples without performing pairwise inference. To address these shortcomings, we propose DeTriever, a novel demonstration retrieval framework that learns a weighted combination of LLM hidden states, where rich semantic information is encoded. To train the model, we propose a proxy score that estimates the relative benefits of examples based on the similarities between output queries. Experiments on two popular NL2SQL benchmarks demonstrate that our method significantly outperforms the state-of-the-art baselines on one-shot NL2SQL tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑