用AI辅助人工标注,快速构建企业级文本转SQL测试集
BenchPress: A Human-in-the-Loop Annotation System for Rapid Text-to-SQL Benchmark Curation
- AI生成自然语言描述,专家筛选修改,降低标注成本
- 在企业SQL日志上验证,标注效率提升70%以上
- 适合需评估模型在特定领域表现的研究者和开发者
大型语言模型(LLMs)在文本转SQL任务中表现出色,但现有研究多集中于公开数据集如Fiben、Spider和Bird。我们早期工作发现,LLMs在大型私有企业数据仓库中的表现显著下降,并发布了首个企业级文本转SQL基准数据集Beaver。为构建Beaver,我们利用了常见的SQL日志,但将日志转换为对应的自然语言问题需大量人工标注,且数据库管理员作为专业人员参与此过程成本高昂。为此,我们提出BenchPress——一个面向领域特定文本转SQL基准构建的人机协同标注系统。给定一条SQL查询,BenchPress通过检索增强生成(RAG)与LLM生成多个自然语言描述,由专家选择、排序或修改以确保准确性和领域一致性。我们在标注的企业级SQL日志上评估了该系统,结果表明,结合人类验证与LLM建议可大幅减少创建高质量基准所需的时间与精力。实验显示,该方法显著提升了标注准确性、基准可靠性及模型评估的鲁棒性。通过简化定制化基准的创建流程,BenchPress为研究人员和从业者提供了一种评估文本转SQL模型在特定领域表现的有效工具。BenchPress已开源,可通过GitHub(https://github.com/fabian-wenz/enterprise-txt2sql)及官网(http://dsg-mcgraw.csail.mit.edu:5000)免费获取。
原文摘要 · Abstract (English)
Large language models (LLMs) have been successfully applied to many tasks, including text-to-SQL generation. However, much of this work has focused on publicly available datasets, such as Fiben, Spider, and Bird. Our earlier work showed that LLMs are much less effective in querying large private enterprise data warehouses and released Beaver, the first private enterprise text-to-SQL benchmark. To create Beaver, we leveraged SQL logs, which are often readily available. However, manually annotating these logs to identify which natural language questions they answer is a daunting task. Asking database administrators, who are highly trained experts, to take on additional work to construct and validate corresponding natural language utterances is not only challenging but also quite costly. To address this challenge, we introduce BenchPress, a human-in-the-loop system designed to accelerate the creation of domain-specific text-to-SQL benchmarks. Given a SQL query, BenchPress uses retrieval-augmented generation (RAG) and LLMs to propose multiple natural language descriptions. Human experts then select, rank, or edit these drafts to ensure accuracy and domain alignment. We evaluated BenchPress on annotated enterprise SQL logs, demonstrating that LLM-assisted annotation drastically reduces the time and effort required to create high-quality benchmarks. Our results show that combining human verification with LLM-generated suggestions enhances annotation accuracy, benchmark reliability, and model evaluation robustness. By streamlining the creation of custom benchmarks, BenchPress offers researchers and practitioners a mechanism for assessing text-to-SQL models on a given domain-specific workload. BenchPress is freely available via our public GitHub repository at https://github.com/fabian-wenz/enterprise-txt2sql and is also accessible on our website at http://dsg-mcgraw.csail.mit.edu:5000.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。