Skip to main content
QUICK REVIEW

[Paper Review] Semantic Operators: A Declarative Model for Rich, AI-based Data Processing

Liana Patel, S. N. Jha|arXiv (Cornell University)|Jul 16, 2024
Semantic Web and OntologiesComputer Science9 citations
TL;DR

Semantic Operators introduces a declarative LOTUS programming model that extends the relational paradigm with AI-based semantic operators for bulk processing over structured and unstructured data, demonstrated across fact-checking, extreme multi-label classification, and search tasks.

ABSTRACT

The semantic capabilities of large language models (LLMs) have the potential to enable rich analytics and reasoning over vast knowledge corpora. Unfortunately, existing systems either empirically optimize expensive LLM-powered operations with no performance guarantees, or serve a limited set of row-wise LLM operations, providing limited robustness, expressiveness and usability. We introduce semantic operators, the first formalism for declarative and general-purpose AI-based transformations based on natural language specifications (e.g., filtering, sorting, joining or aggregating records using natural language criteria). Each operator opens a rich space for execution plans, similar to relational operators. Our model specifies the expected behavior of each operator with a high-quality gold algorithm, and we develop an optimization framework that reduces cost, while providing accuracy guarantees with respect to a gold algorithm. Using this approach, we propose several novel optimizations to accelerate semantic filtering, joining, group-by and top-k operations by up to $1,000 imes$. We implement semantic operators in the LOTUS system and demonstrate LOTUS' effectiveness on real, bulk-semantic processing applications, including fact-checking, biomedical multi-label classification, search, and topic analysis. We show that the semantic operator model is expressive, capturing state-of-the-art AI pipelines in a few operator calls, and making it easy to express new pipelines that match or exceed quality of recent LLM-based analytic systems by up to $170\%$, while offering accuracy guarantees. Overall, LOTUS programs match or exceed the accuracy of state-of-the-art AI pipelines for each task while running up to $3.6 imes$ faster than the highest-quality baselines. LOTUS is publicly available at https://github.com/lotus-data/lotus.

Motivation & Objective

  • Motivate the need for bulk semantic processing beyond traditional RAG and LM-UDF approaches.
  • Define a declarative programming interface (semantic operators) that extends the relational model for AI-powered data tasks.
  • Demonstrate LOTUS’s expressiveness and optimization capabilities on diverse applications (fact-checking, multi-label classification, search).
  • Show that semantic operators enable high-quality pipelines with lower development overhead and improved efficiency.

Proposed method

  • Introduce semantic operators (sem_filter, sem_join, sem_sim_join, sem_agg, sem_topk, sem_map, sem_extract, sem_cluster_by, sem_search, sem_index, load_sem_index) as extensible, language-based primitives operating over structured and unstructured data.
  • Provide a Pandas-like API implementation in LOTUS and describe how parameterized natural language expressions (langex) specify AI-driven predicates, aggregations, and projections.
  • Describe optimizer and execution strategies that exploit parallel batched inference, model cascades, semantic indices, and algorithmic approximations for expensive operators.
  • Explain data modeling with tables containing both structured fields and NL text, and the use of semantic similarity indices for efficient querying.
  • Outline the integration with existing LM tooling (vLLM, FAISS) and the ability to reuse or adapt prompts across operators.
  • Present example programs showing how to compose multiple operators to build complex AI-powered pipelines.
Figure 1 . Accuracy versus execution time (log-scale) for 3 short LOTUS programs, shown as Program A, B, and C, which implement distinct query pipelines for fact-checking on the FEVER (Thorne et al . , 2018 ) dataset. The blue circles show the performance of these un-optimized programs, and the blue
Figure 1 . Accuracy versus execution time (log-scale) for 3 short LOTUS programs, shown as Program A, B, and C, which implement distinct query pipelines for fact-checking on the FEVER (Thorne et al . , 2018 ) dataset. The blue circles show the performance of these un-optimized programs, and the blue

Experimental results

Research questions

  • RQ1Can semantic operators provide a scalable and expressive alternative to ad-hoc RAG pipelines for bulk semantic processing?
  • RQ2How can a declarative LOTUS model enable efficient composition of AI-based operations over mixed data types?
  • RQ3What optimizations and algorithms best balance accuracy and execution time for semantic operators?
  • RQ4To what extent can LOTUS reproduce or surpass state-of-the-art pipelines in fact-checking, extreme multi-label classification, and search tasks?

Key findings

  • LOTUS can reproduce and improve upon state-of-the-art fact-checking pipelines (FEVER) with fewer lines of code and significantly lower execution time.
  • Optimized LOTUS programs achieve higher accuracy and up to 7–34× faster execution on FEVER compared to unoptimized counterparts and FacTool.
  • The join-based algorithm in LOTUS for extreme multi-label classification yields up to 800× faster execution than a naive join while matching state-of-the-art result quality.
  • In search and ranking, LOTUS compositions achieve 5.9–49.4% higher nDCG@10 than vanilla retriever and re-ranker setups, with 1.67–10× lower execution time than LM-based ranking methods.
Figure 3 . Table schema of ArXiv papers.
Figure 3 . Table schema of ArXiv papers.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.