arXiv:2601.06564cs.CL2026-01被引 2

提出高效文本转SQL的检索系统,适配企业级数据库场景。

CSR-RAG: An Efficient Retrieval System for Text-to-SQL on the Enterprise Scale

  • 融合上下文、结构、关系三类检索,提升准确率。
  • 精度达40%,召回超80%,查询延迟仅30ms。
  • 适合需要快速响应的企业级大模型应用。

自然语言转SQL是长期存在的难题,近年受大语言模型(LLMs)推动取得进展。虽然多数学术基准将模式描述作为自然语言输入的一部分,但企业级应用通常需在生成SQL前先进行表检索。为此,我们提出一种新型混合检索增强生成(RAG)系统——上下文、结构、关系检索(CSR-RAG),以实现企业级数据库中计算高效且足够精确的检索。通过大量企业级基准测试,我们证明了CSR-RAG在商用数据中心硬件上平均查询生成延迟仅为30ms,精度最高达40%,召回率超过80%,适用于现代基于LLM的企业级系统。

原文摘要 · Abstract (English)

Natural language to SQL translation (Text-to-SQL) is one of the long-standing problems that has recently benefited from advances in Large Language Models (LLMs). While most academic Text-to-SQL benchmarks request schema description as a part of natural language input, enterprise-scale applications often require table retrieval before SQL query generation. To address this need, we propose a novel hybrid Retrieval Augmented Generation (RAG) system consisting of contextual, structural, and relational retrieval (CSR-RAG) to achieve computationally efficient yet sufficiently accurate retrieval for enterprise-scale databases. Through extensive enterprise benchmarks, we demonstrate that CSR-RAG achieves up to 40% precision and over 80% recall while incurring a negligible average query generation latency of only 30ms on commodity data center hardware, which makes it appropriate for modern LLM-based enterprise-scale systems.

文本转SQLRAG企业级高效检索

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