弥合语义分析的最后一步差距:将自然语言查询编译为语义操作符流水线
Bridge the Last-Mile Gap to Semantic Analytics: Compiling Natural-Language Queries into Semantic Operator Pipelines
AI总结:
提出NL2Pipe中间件系统,通过查询-数据链接、语义规划和代码生成三阶段编译,将自然语言问题自动转化为可执行的语义操作符流水线,显著提升跨源工作负载的F1分数。
摘要:
自动化AI工作流越来越依赖异构数据上的自然语言推理,但缺乏通过优化的语义数据系统实际执行它的方式。最近的语义操作符系统(如Palimpzest和LOTUS)公开了声明式操作符,用于使用自然语言谓词对表格、文本和图像进行过滤、连接、映射和聚合。然而,这些系统要求用户手动选择操作符、排序、编写谓词,并使流水线适应后端特定的API。这对非专家来说很困难,跨后端脆弱,并且对于查询和数据在运行时变化的自动化工作流不可行。我们提出NL2Pipe,一个中间件系统,将自然语言问题编译成可执行的语义操作符流水线,将其视为一个三阶段编译问题。首先,查询-数据链接器将问题实体与实际数据关联,并发现连接表格、文本和图像所需的隐式桥梁实体。其次,语义规划器生成语义操作符和自然语言谓词的后端无关动作计划。第三,代码生成器使用自动生成的参考文档(包含操作符签名、示例流水线和后端约束)将计划翻译成目标后端的可执行代码。这将数据感知推理与后端特定代码生成分离,使相同的规划逻辑支持多个后端。评估表明,NL2Pipe在复杂跨源工作负载上显著优于基线(例如,F1分数高达60%),同时保持有界成本和竞争性延迟。这表明从自然语言到语义操作符流水线的自动编译既实用又有效,能够将语义分析带给非专家用户和自动化AI工作流。
英文摘要:
Automated AI workflows increasingly rely on natural-language reasoning over heterogeneous data, but lack a practical way to execute it through optimized semantic data systems. Recent semantic operator systems, such as Palimpzest and LOTUS, expose declarative operators for filtering, joining, mapping, and aggregating over tables, text, and images using natural-language predicates. However, these systems require users to manually choose operators, order them, write predicates, and adapt the pipeline to backend-specific APIs. This is difficult for non-experts, brittle across backends, and infeasible for automated workflows where queries and data vary at runtime. We present NL2Pipe, a middleware system that compiles natural-language questions into executable semantic operator pipelines, treating this as a three-phase compilation problem. First, a Query-Data Linker grounds question entities against the actual data and discovers implicit bridge entities needed to connect tables, text, and images. Second, a Semantic Planner produces a backend-agnostic action plan of semantic operators and natural-language predicates. Third, a Code Generator translates the plan into executable code for a target backend using an auto-generated reference document capturing operator signatures, example pipelines, and backend constraints. This separates data-aware reasoning from backend-specific code generation, letting the same planning logic support multiple backends. Evaluation shows NL2Pipe substantially outperforms baselines on complex cross-source workloads (e.g., up to 60% higher F1) while maintaining bounded cost and competitive latency. This demonstrates that automatic compilation from natural language to semantic operator pipelines is both practical and effective for bringing semantic analytics to non-expert users and automated AI workflows.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。