Bridge the Last-Mile Gap to Semantic Analytics: Compiling Natural-Language Queries into Semantic Operator Pipelines

2026-06-03Databases

Databases
AI summary

The authors present NL2Pipe, a system that automatically turns natural language questions into steps that computers can run to analyze mixed data like tables, text, and images. Their system works in three parts: matching question parts to actual data, planning out the needed operations without focusing on a specific system, and then creating code that runs on different backend systems. This approach helps non-experts and automated AI systems work with complex data sources more easily. Their tests show NL2Pipe performs much better than previous methods on difficult tasks while keeping costs and speed reasonable.

natural-language reasoningsemantic operatorsdata integrationautomated workflowsquery planningbackend systemscode generationheterogeneous datasemantic analyticscross-source querying
Authors
Wenkai Dong, Ruyu Li, Sairam Gurajada, Yifan Wang
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.