Pith. sign in

REVIEW 4 major objections 4 minor 23 references

SABER: A SQL-Compatible Semantic Document Processing System Based on Extended Relational Algebra

T0 review · 4 major / 4 minor · reviewed 2026-08-05 · deepseek-v4-flash

Pith's one-line read This paper argues that LLM-powered document processing can be grounded in an extended relational algebra, so semantic queries inherit SQL's rewrite rules and can run over any compatible backend.

desk verdict A well-framed design for a semantic relational algebra, with a genuinely useful cross-system operator comparison; the load-bearing rule-transfer claim is asserted, not proven, and the embedding-based operators make it implausible as stated. read the letter →

arxiv 2509.00277 v1 pith:QSF2IHBR submitted 2025-08-29 cs.DB cs.AI

classification cs.DBcs.AI
keywords semanticalgebrarelationalLLM-poweredqueryprocessingSQLextensionunstructureddataoperatorsoptimizationdocument
verification ladder T0 review T1 audit T2 compute T3 formal

The pith

A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.

The reading

SABER (Semantic Algebra Based on Extended Relational algebra) aims to give LLM-powered document processing the same formal backbone that made SQL successful: a relational algebra. It defines ten semantic counterparts of classical operators—semantic selection, projection, join, difference, intersection, grouping, aggregation, deduplication, and sorting—and states that algebraic rewrite rules valid for the classical operators carry over to the semantic ones under semantic equivalence. If true, semantic pipelines become composable, reason-able, and optimizable like ordinary SQL queries, and existing semantic data processing systems can be treated as interchangeable physical backends behind one SQL-compatible interface. The paper also shows which of those systems lack core operators such as difference and intersection, and fills those gaps with embedding-based implementations.

What carries the argument

The load-bearing mechanism is the extended relational algebra over ordered lists, following the framework of [21], augmented with ten semantic operators denoted with a superscript 'sem'. The transfer principle in Section 3.1—that conventional relational rewrite rules remain valid when every operator and predicate is replaced by its semantic counterpart—is what turns SABER from a convenient API into an algebraic foundation. The implementation mechanism is a SQL-compatible UDF syntax and a regex-based query rewriter that dispatches semantic calls to an SDPS backend, materializes the intermediate tables, and lets the relational engine finish the query.

What would settle it

Construct a three-element chain A, B, C where the stored embeddings make A similar to B and B to C above the threshold but A not similar to C. Issue a semantic query that depends on deduplication or set difference, such as SEM_DISTINCT over {A, B, C} or SEM_EXCEPT_ALL, and check whether the result is order-independent and matches the rewritten relational plan. If results change when the same query is expressed through different but algebraically equivalent plans, the transfer principle fails.

Watch

Extended reading notes

Core claim

The central claim is that a semantic operator can be defined for each classical relational operator by replacing the data transformation or comparison with an LLM-based one, and that this replacement preserves algebraic reasoning. Concretely, the paper states the transfer principle: if e1 ≡ e2 is a valid rewrite in the conventional algebraic setting, then the corresponding semantic expressions e_sem1 and e_sem2 are semantically equivalent and can be interchanged. On this basis, SABER provides ten semantic operators as SQL-compatible UDFs, plus a regex-based runtime that materializes their outputs so ordinary relational engines continue processing. The paper further analyzes three existing se

Load-bearing premise

The paper assumes semantic equivalence behaves enough like ordinary equality that relational rewrite rules carry over; in particular, the embedding-similarity equality used for difference, intersection, and deduplication is not guaranteed to be transitive, so set and bag semantics may not hold.

Editorial extensions

If this is right

  • All classical algebraic rewrite rules—selection pushdown, projection composition, duplicate elimination propagation, join reordering—apply to semantic plans, enabling logical plan construction and optimization for LLM pipelines.
  • Existing SDPSs can be treated as physical implementations behind one SQL interface; SABER can pick or mix implementations from any backend and fall back to its own for missing operators.
  • Semantic difference and intersection, currently absent from all three analyzed SDPSs, become expressible and executable via SABER's SQL syntax.
  • The operator-coverage table gives each SDPS a concrete gap list, so the systems can evolve toward full semantic relational support.
  • Mixed structured and unstructured queries can be written in one SQL query and executed as a hybrid semantic-plus-relational plan.

Reading between the lines

Editorial extensions of the paper, not claims the author makes directly.

  • The transfer principle quietly assumes semantic equivalence is a congruence for the operators; since the prototype implements difference and intersection via embedding similarity, which is not transitive, set and bag identities such as duplicate elimination or EXCEPT may fail on adversarial data—this is a testable condition rather than a proven property.
  • If the algebra is accepted, the natural next step the paper leaves open is cost-based optimization that estimates LLM invocation costs per operator and decides backend choice and materialization; nothing in SABER's design prevents this.
  • Because the operator signatures are defined at the level of logical semantics, the same algebra could carry other LLM modalities such as image or table reasoning, as long as a backend implements the semantic operator—extending the unified interface beyond text.
Share X Bluesky LinkedIn Reddit HN

Editorial analysis

A structured set of objections, weighed in public.

Desk editor's note, referee report, and a circularity audit.

Referee Report

4 major / 4 minor

Summary. The paper proposes SABER, a semantic algebra that extends list-based extended relational algebra with ten semantic operators (semantic selection, projection, join, difference, intersection, group-by, aggregation, deduplication, sorting). The central claim is that because semantic operators are implemented as type-checked black boxes (LLM-backed predicates/transformations), all classical relational rewrite rules carry over: if e1 ≡ e2 conventionally, then e_sem1 ≡_sem e_sem2. The paper also presents a SQL-compatible UDF interface, maps the operators of LOTUS, DocETL, and Palimpzest onto SABER operators, and reports a single illustrative query over IMDb data using the three backends. The conclusion acknowledges that LLM responses lack formal guarantees and that formal verification is future work.

Significance. If the algebraic foundation were sound, SABER would address a real gap: a common formal basis for LLM-powered document processing systems, with SQL compatibility and cross-system operator integration. The comparative analysis of LOTUS, DocETL, and Palimpzest is useful, and the modular UDF-based architecture is a practical contribution. However, the formal core is asserted rather than proven, and the one-query experiment provides only anecdotal evidence. The paper would be strengthened by a precise definition of semantic equivalence, proofs or explicit assumptions for the rewrite-rule transfer, and a more substantial evaluation.

major comments (4)
  1. [§3.1] The central claim—"if a rule e1 ≡ e2 holds in the conventional setting, the corresponding semantic rule e_sem1 ≡_sem e_sem2 can be applied under the appropriate semantic equivalence"—is asserted without defining ≡_sem or proving that the semantic operators are congruences for it. This is load-bearing for the paper's claimed correctness and optimization guarantees. Please provide a formal definition of semantic equivalence and prove, or at least state precisely under which assumptions, each semantic operator preserves the relevant algebraic identities.
  2. [§4.1 and Table 1] Semantic difference and intersection are implemented with embedding-based similarity using a fixed threshold. Similarity under a threshold is not transitive, so the resulting isInsem relation is not an equivalence relation. Consequently, δ_sem is not guaranteed to be idempotent, and identities such as R − (S ∪ T) = (R−S) ∩ (R−T) fail for the implemented operators. Since these are the very operators SABER adds beyond existing SDPSs, the inheritance claim is not merely unproven but false for the system as implemented. Please either change the implementation to use a transitive equivalence relation (e.g., transitive closure) or restrict the formal claims to operators for which the rule transfer is actually valid.
  3. [§5 and Table 3] The evaluation is a single natural-language query executed on one small dataset, with no quantitative metrics, baselines, or error analysis. The claims of "validity and practicality," "portability, compositionality, and expressive power" are not supported by this experiment. Please report multiple queries, quantitative measures (e.g., precision/recall or human judgments of semantic output), comparisons with non-semantic or alternative semantic pipelines, and some assessment of cost/runtime.
  4. [§6] The conclusion concedes that "underlying LLM responses—such as prompt interpretation and similarity scoring—lack formal guarantees" and that formal verification is future work. This directly undercuts the paper's stated goal of "formal correctness guarantees." The authors should reconcile these statements: either define the exact class of semantic operators for which algebraic rules provably hold, or present the system as a heuristic approximation with no formal inheritance claim.
minor comments (4)
  1. [§3.2 footnote 1] The restriction to equi-joins for Zsem is an important limitation and should be stated in the main text, not only in a footnote, since θ-joins are essential for full relational composability.
  2. [Figure 2] There are formatting artifacts such as "m. year" with a space and inconsistent SQL punctuation. Please clean up the query listings.
  3. [§3.1, Table 1] The text says SABER comprises 12 conventional and 10 semantic operators, but Table 1 appears to list fewer. Please verify the counts and make the table consistent with the text.
  4. [§5.1] The experimental description does not mention code availability, exact prompt templates, model names, or hyperparameters (e.g., similarity thresholds), which limits reproducibility. Please include these details.

Circularity Check

0 steps flagged · score 0.0 of 10

No circularity: SABER's rule-inheritance claim is an unproven correctness assertion, not a reduction to its inputs.

full rationale

SABER proposes semantic operators by definitionally replacing conventional relational predicates/transformations with LLM-based semantic ones. The central claim in Section 3.1 that conventional rewrite rules transfer to semantic operators is asserted, not derived: the paper never defines the semantic equivalence relation ≡_sem, nor proves that the implemented similarity-based equality used by δ_sem, −sem, and ∩sem is an equivalence relation. This is a formal correctness gap, explicitly conceded in Section 6 ('the underlying LLM responses—such as prompt interpretation and similarity scoring—lack formal guarantees'), but it is not circularity: there is no equation in the paper that reduces the claimed theorem to its own assumptions, no fitted parameter renamed as a prediction, and no load-bearing self-citation. The citations to [21] and other relational-algebra works are used only as the conventional algebraic backdrop, not to establish SABER's semantic rule inheritance. The comparison with LOTUS, DocETL, and Palimpzest is an external analysis of existing systems, not an input to SABER's formal claims. An unsupported conjecture is a soundness risk, not a circularity, and under the given criteria no specific reduction by construction can be exhibited.

Assumptions & free parameters 1 free parameters · 4 assumptions · 0 invented entities

The paper introduces no new physical or mathematical entity. Its unstated similarity threshold for difference/intersection is the only hidden free parameter. The main axioms are inherited from the cited relational algebra framework and the unproven assumption that LLM semantic predicates behave like well-behaved black boxes.

free parameters (1)
  • similarity threshold for embedding-based semantic difference/intersection
    Section 4.1: semantic difference and intersection are implemented using embedding-based similarity, but no threshold is specified; the threshold determines results and is effectively a free parameter.
assumptions (4)
  • standard math Extended relational algebra with ordered lists and bag semantics from Slivinskas et al. 2002
    Section 3.1 cites [21] as the foundation for SABER's formal framework.
  • domain assumption LLM-based semantic operators are modeled as type-checked black boxes whose outputs are deterministic
    Section 3.1 treats predicates as black boxes; actually LLM outputs are stochastic and prompt-sensitive.
  • ad hoc to paper Semantic equivalence is an equivalence relation that preserves algebraic rewrite rules
    Section 3.1 asserts rewrite rules transfer 'under the appropriate semantic equivalence' without defining this equivalence or proving congruence.
  • domain assumption Compatibility mapping of LOTUS, DocETL, and Palimpzest operators to SABER based on documented APIs is correct
    Section 3.2 and Table 2: mapping is based on reading API documentation, not on executable tests.

how reviews work

0 comments
Cite this review

Pith. "Pith review of SABER: A SQL-Compatible Semantic Document Processing System Based on Extended Relational Algebra." pith.science (2026). https://pith.science/paper/QSF2IHBR

@misc{pith2026250900277,
  author       = {Pith},
  title        = {Pith review of: SABER: A SQL-Compatible Semantic Document Processing System Based on Extended Relational Algebra},
  year         = {2026},
  howpublished = {\url{https://pith.science/paper/QSF2IHBR}},
  note         = {Machine review of arXiv:2509.00277}
}
read the original abstract

The emergence of large-language models (LLMs) has enabled a new class of semantic data processing systems (SDPSs) to support declarative queries against unstructured documents. Existing SDPSs are, however, lacking a unified algebraic foundation, making their queries difficult to compose, reason, and optimize. We propose a new semantic algebra, SABER (Semantic Algebra Based on Extended Relational algebra), opening the possibility of semantic operations' logical plan construction, optimization, and formal correctness guarantees. We further propose to implement SABER in a SQL-compatible syntax so that it natively supports mixed structured/unstructured data processing. With SABER, we showcase the feasibility of providing a unified interface for existing SDPSs so that it can effectively mix and match any semantically-compatible operator implementation from any SDPS, greatly enhancing SABER's applicability for community contributions.

Figures

Figures reproduced from arXiv: 2509.00277 by the authors.

Figure 1
Figure 1. Backend-free SABER SQL query We construct a normalized semantic database by integrating IMDb metadata from the official IMDb non-commercial dataset2 and the Cinemagoer (IMDbPY) library3 . The integration process begins by extracting mappings between movies and their direc￾tors from the title.crew.tsv.gz file. We then retrieve the top 250 movies via the IMDbPY API, collecting metadata such as title, year, rating, and… view at source ↗
Figure 2
Figure 2. Backend-specific SABER SQL queries Backend Title Director Year Rating Director Summary LOTUS The Shawshank Redemption Frank Darabont 1994 9.3 Frank Darabont, born in a refugee camp in France and raised in Los Angeles, overcame... One Flew Over the Cuckoo’s Nest Milos Forman 1975 8.7 Milos Forman, orphaned during World War II after losing his parents to the Nazis, overcame... The Pianist Roman Polanski 2002 8.5 Roman… view at source ↗

Discussion (0). Sign in to comment.

Reference graph

Works this paper leans on

23 extracted references · 18 canonical work pages

  1. [1]

    Divy Agrawal, Sanjay Chawla, Bertty Contreras-Rojas, Ahmed Elmagarmid, Yasser Idris, Zoi Kaoudi, Sebastian Kruse, Ji Lucas, Essam Mansour, Mourad Ouzzani, Paolo Papotti, Jorge-Arnulfo Quiané-Ruiz, Nan Tang, Saravanan Thiru- muruganathan, and Anis Troudi. 2018. RHEEM: enabling cross-platform data processing: may the big data be with you! Proc. VLDB Endow. ...

  2. [2]

    Joseph Albert. 1991. Algebraic Properties of Bag Data Types. In Proceedings of the 17th International Conference on Very Large Data Bases (VLDB ’91) . Morgan Kaufmann Publishers Inc., San Francisco, CA, USA, 211–219

  3. [3]

    Kaustubh Beedkar, Bertty Contreras-Rojas, Haralampos Gavriilidis, Zoi Kaoudi, Volker Markl, Rodrigo Pardo-Meza, and Jorge-Arnulfo Quiané-Ruiz. 2023. Apache Wayang: A Unified Data Analytics Framework. SIGMOD Rec. 52, 3 (Nov. 2023), 30–35. doi:10.1145/3631504.3631510

  4. [4]

    Véronique Benzaken and Évelyne Contejean. 2019. A Coq mechanised formal semantics for realistic SQL queries: formally reconciling SQL and bag relational algebra. In Proceedings of the 8th ACM SIGPLAN International Conference on Certified Programs and Proofs (Cascais, Portugal) (CPP 2019). Association for Com- puting Machinery, New York, NY, USA, 249–261. ...

  5. [5]

    Smith, and Tao Yu

    Zhoujun Cheng, Tianbao Xie, Peng Shi, Chengzu Li, Rahul Nadkarni, Yushi Hu, Caiming Xiong, Dragomir Radev, Mari Ostendorf, Luke Zettlemoyer, Noah A. Smith, and Tao Yu. 2023. Binding Language Models in Symbolic Languages. In The Eleventh International Conference on Learning Representations . https: //openreview.net/forum?id=lH1PV42cbF

  6. [6]

    Marco Console, Paolo Guagliardo, and Leonid Libkin. 2022. Fragments of bag relational algebra: Expressiveness and certain answers. Information Systems 105 (2022), 101604. doi:10.1016/j.is.2020.101604 Changjae Lee, Zhuoyue Zhao, and Jinjun Xiong LOTUS SELECT m.title, d.name AS director, m. year, ↩→ m.rating, SEM_SELECT('Summarize {d.biography} ↩→ focusing ...

  7. [7]

    Hanjun Dai, Bethany Yixin Wang, Xingchen Wan, Bo Dai, Sherry Yang, Azade Nova, Pengcheng Yin, Phitchaya Mangpo Phothilimthana, Charles Sutton, and Dale Schuurmans. 2024. UQE: A Query Engine for Unstructured Databases. In Advances in Neural Information Processing Systems , A. Globerson, L. Mackey, D. Belgrave, A. Fan, U. Paquet, J. Tomczak, and C. Zhang (E...

  8. [8]

    Delgado-Chaves, Matthew J

    Fernando M. Delgado-Chaves, Matthew J. Jennings, Antonio Atalaia, Justus Wolff, Rita Horvath, Zeinab M. Mamdouh, Jan Baumbach, and Linda Baumbach. 2025. Transforming literature screening: The emerging role of large language models in systematic reviews. Proceedings of the National Academy of Sciences 122, 2 (2025), e2411962122. arXiv:https://www.pnas.org/...

Show all 23 references
  1. [9]

    Garcia-Molina, J.D

    H. Garcia-Molina, J.D. Ullman, and J. Widom. 2000. Database System Implemen- tation. Prentice Hall

  2. [10]

    Grefen and R.A

    P.W.P.J. Grefen and R.A. de By. 1994. A multi-set extended relational algebra: a formal approach to a practical issue. InProceedings of 1994 IEEE 10th International Conference on Data Engineering . 80–88. doi:10.1109/ICDE.1994.283002

  3. [11]

    Stéphane Grumbach, Leonid Libkin, Tova Milo, and Limsoon Wong. 1996. Query languages for bags: expressive power and complexity. SIGACT News 27, 2 (July 1996), 30–44. doi:10.1145/235767.235770

  4. [12]

    Stéphane Grumbach and Tova Milo. 1993. Towards tractable algebras for bags. In Proceedings of the Twelfth ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems (Washington, D.C., USA) (PODS ’93). Association for Computing Machinery, New York, NY, USA, 49–58. doi...

  5. [13]

    Paolo Guagliardo and Leonid Libkin. 2017. A formal semantics of SQL queries, its validation, and applications. Proc. VLDB Endow. 11, 1 (Sept. 2017), 27–39. doi:10.14778/3151113.3151116

  6. [14]

    Chunwei Liu, Matthew Russo, Michael Cafarella, Lei Cao, Peter Baile Chen, Zui Chen, Michael Franklin, Tim Kraska, Samuel Madden, Rana Shahout, and Gerardo Vitagliano. 2025. Palimpzest: Optimizing AI-Powered Analytics with Declarative Query Processing. In Proceedings of the Con...

  7. [15]

    Shicheng Liu, Jialiang Xu, Wesley Tjangnaka, Sina Semnani, Chen Yu, and Monica Lam. 2024. SUQL: Conversational Search over Structured and Unstructured Data with Large Language Models. In Findings of the Association for Computational Linguistics: NAACL 2024, Kevin Duh, Helena G...

  8. [16]

    Akash Mittal, Anshul Bheemreddy, and Huili Tao. 2024. Semantic SQL – Com- bining and optimizing semantic predicates in SQL. arXiv:2404.03880 [cs.DB] https://arxiv.org/abs/2404.03880

  9. [17]

    Kian Win Ong, Yannis Papakonstantinou, and Romain Vernoux. 2014. The SQL++ Semi-structured Data Model and Query Language: A Capabilities Survey of SQL-on-Hadoop, NoSQL and NewSQL Databases. CoRR abs/1405.3631 (2014). arXiv:1405.3631 http://arxiv.org/abs/1405.3631

  10. [18]

    Liana Patel, Siddharth Jha, Melissa Pan, Harshit Gupta, Parth Asawa, Carlos Guestrin, and Matei Zaharia. 2025. Semantic Operators: A Declarative Model for Rich, AI-based Data Processing. arXiv:2407.11418 [cs.DB] https://arxiv.org/abs/ 2407.11418

  11. [19]

    Parameswaran, and Eugene Wu

    Shreya Shankar, Tristan Chambers, Tarak Shah, Aditya G. Parameswaran, and Eugene Wu. 2025. DocETL: Agentic Query Rewriting and Evaluation for Complex Document Processing. arXiv:2410.12189 [cs.DB] https://arxiv.org/abs/2410.12189

  12. [20]

    Slivinskas, C.S

    G. Slivinskas, C.S. Jensen, and R.T. Snodgrass. 2001. A foundation for conventional and temporal query optimization addressing duplicates and ordering. IEEE Transactions on Knowledge and Data Engineering 13, 1 (2001), 21–49. doi:10.1109/ 69.908979

  13. [21]

    Jensen, and Richard Thomas Snodgrass

    Giedrius Slivinskas, Christian S. Jensen, and Richard Thomas Snodgrass. 2002. Bringing order to query optimization. SIGMOD Rec. 31, 2 (June 2002), 5–14. doi:10.1145/565117.565119

  14. [22]

    Zhenzhen Zhuang, Jiandong Chen, Hongfeng Xu, Yuwen Jiang, and Jialiang Lin

  15. [2025]

    Information Fusion 124 (2025), 103332

    Large language models for automated scholarly paper review: A survey. Information Fusion 124 (2025), 103332. doi:10.1016/j.inffus.2025.103332

Pith tools

Reviewed August 5, 2026 · model on record in the stance chip above.