🤖 AI Summary
Existing systems struggle to efficiently translate natural language queries into executable semantic operation pipelines over heterogeneous data sources—such as tables, text, and images—often requiring manual implementation and adaptation of backend APIs, a process that is both tedious and error-prone. This work proposes NL2Pipe, the first middleware system to formalize this task as a compilation problem. NL2Pipe employs a three-stage pipeline—query-data linking, semantic planning, and code generation—to decouple data understanding from backend implementation, enabling unified planning logic to be reused across multiple backends and automatically discovering cross-modal bridging entities. Experimental results demonstrate that NL2Pipe achieves up to a 60% relative improvement in F1 score on complex cross-source analytical tasks, offering a practical, effective solution with controllable latency.
📝 Abstract
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.