arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2506.23071cs.CL
收藏

Text2VectorSQL:迈向向量搜索与SQL查询的统一接口

Text2VectorSQL: Towards a Unified Interface for Vector Search and SQL Queries

Peking University(北京大学);Shanghai Jiao Tong University(上海交通大学);OriginHub Technology(OriginHub科技);Institute for Advanced Algorithms Research, Shanghai(上海先进算法研究所);Zhongguancun Academy(中关村学院)

Zhengren Wang, Dongwen Yao, Bozhou Li, Dongsheng Ma, Bo Li, Zhiyu Li, Feiyu Xiong, Bin Cui, Linpeng Tang, Wentao Zhang

AI总结:

本文提出Text2VectorSQL任务,统一自然语言查询结构化与非结构化数据,并构建训练数据流水线、VectorSQLBench基准及新评估指标,实验揭示SQL过滤与向量搜索集成导致的召回率下降挑战。

摘要:

非结构化数据的激增对传统数据库接口构成了根本性挑战。虽然Text-to-SQL已经使结构化数据的访问变得大众化,但它仍然无法解释语义或多模态查询。与此同时,向量搜索已成为查询非结构化数据的事实标准,但其与SQL的集成——称为VectorSQL——仍然依赖人工编写查询,并且缺乏标准化的评估方法,这在其潜力与实际应用之间造成了显著差距。为了弥合这一根本差距,我们引入并形式化了Text2VectorSQL,这是一个新任务,旨在建立统一的自然语言接口,以无缝查询结构化和非结构化数据。为了推动这一新领域的研究,我们提供了一个全面的基础生态系统,包括:(1)一个可扩展且稳健的流水线,用于合成高质量的Text-to-VectorSQL训练数据。(2)VectorSQLBench,这是该任务的首个大规模、多维度基准,涵盖三种数据库后端(SQLite、PostgreSQL、ClickHouse)和四种数据源(BIRD、Spider、arXiv、Wikipedia)的12种不同组合。(3)若干新颖的评估指标,旨在实现更细致的性能分析。大量实验不仅证实了我们训练模型的强大基线性能,还揭示了召回率下降的挑战:与传统的过滤向量搜索相比,SQL过滤器与向量搜索的集成可能导致更明显的结果遗漏。通过定义核心任务、提供必要的数据和评估基础设施,并识别关键研究挑战,我们的工作为构建下一代统一且智能的数据接口奠定了必要基础。我们的代码库可在https://github.com/OpenDCAI/Text2VectorSQL获取。

英文摘要:

The proliferation of unstructured data poses a fundamental challenge to traditional database interfaces. While Text-to-SQL has democratized access to structured data, it remains incapable of interpreting semantic or multi-modal queries. Concurrently, vector search has emerged as the de facto standard for querying unstructured data, but its integration with SQL-termed VectorSQL-still relies on manual query crafting and lacks standardized evaluation methodologies, creating a significant gap between its potential and practical application. To bridge this fundamental gap, we introduce and formalize Text2VectorSQL, a novel task to establish a unified natural language interface for seamlessly querying both structured and unstructured data. To catalyze research in this new domain, we present a comprehensive foundational ecosystem, including: (1) A scalable and robust pipeline for synthesizing high-quality Text-to-VectorSQL training data. (2) VectorSQLBench, the first large-scale, multi-faceted benchmark for this task, encompassing 12 distinct combinations across three database backends (SQLite, PostgreSQL, ClickHouse) and four data sources (BIRD, Spider, arXiv, Wikipedia). (3) Several novel evaluation metrics designed for more nuanced performance analysis. Extensive experiments not only confirm strong baseline performance with our trained models, but also reveal the recall degradation challenge: the integration of SQL filters with vector search can lead to more pronounced result omissions than in conventional filtered vector search. By defining the core task, delivering the essential data and evaluation infrastructure, and identifying key research challenges, our work lays the essential groundwork to build the next generation of unified and intelligent data interfaces. Our repository is available at https://github.com/OpenDCAI/Text2VectorSQL.

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

↑