让自然语言同时查询结构化和非结构化数据,打通文本与数据库的壁垒。
Text2VectorSQL: Towards a Unified Interface for Vector Search and SQL Queries
- 提出Text2VectorSQL任务,用自然语言统一访问结构化与非结构化数据。
- 构建包含12种组合的VectorSQLBench基准,覆盖3种数据库和4个数据源。
- 发现加入SQL过滤后向量搜索召回率下降明显,揭示新挑战。
非结构化数据的泛滥给传统数据库接口带来根本性挑战。尽管Text-to-SQL已降低结构化数据访问门槛,却无法理解语义或跨模态查询。与此同时,向量搜索已成为非结构化数据查询的标准方法,但其与SQL结合的VectorSQL仍依赖人工编写查询,缺乏标准化评估体系,导致实际应用与潜力之间存在巨大鸿沟。为弥合这一差距,我们提出并形式化了Text2VectorSQL这一新任务,建立统一的自然语言接口,无缝查询结构化与非结构化数据。为推动该领域研究,我们构建了完整基础生态:(1) 高质量、可扩展的Text-to-VectorSQL训练数据合成管道;(2) VectorSQLBench,首个大规模、多维度基准,涵盖3种数据库后端(SQLite、PostgreSQL、ClickHouse)和4个数据源(BIRD、Spider、arXiv、Wikipedia),共12种组合;(3) 多项新型评估指标,支持更细致的性能分析。大量实验验证了模型基线性能,也揭示关键问题:将SQL过滤与向量搜索结合时,结果遗漏比传统带过滤的向量搜索更严重。通过定义核心任务、提供数据与评估基础设施,并识别关键挑战,本工作为下一代统一智能数据接口奠定基础。代码仓库见 https://github.com/OpenDCAI/Text2VectorSQL。
原文摘要 · Abstract (English)
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.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。