arXiv(opens in a new tab)cs.DBOct 2026Cited by 3 papers on PaperVantage

Manuscript Offprint

arXiv:2610.02046

Prune First, Decide Fast: Scalable Semantic Query Processing with JEVDB

Zhengle Wang, Hanxu Yan, Fuheng Zhao, Chunwei Liu

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Zhengle Wang 1^{1}, Hanxu Yan 1^{1}, Fuheng Zhao 2^{2}, Chunwei Liu ∗1^{*1}

1^{1}Purdue Data & AI System Lab (PDAIS), 2^{2}University of Utah

Semantic database systems extend standard SQL with foundation model inference, allowing users to express complex declarative queries over unstructured text and domain-specific attributes. Despite their expressive power, existing semantic engines face an acute scalability bottleneck: invoking autoregressive Large Language Models (LLMs) incurs latencies and monetary costs that are orders of magnitude higher than conventional relational operators. Mitigation strategies such as prompt batching, model cascading, and embedding-based proxy models fail to address the core problem—an architectural generative impedance mismatch, wherein multi-billion-parameter models generate open-ended text tokens merely to resolve discrete, typed relational predicates (e.g., Booleans, Enums, and Scores).

In this paper, we present JEVDB, a scalable semantic database system that integrates non-generative, calibrated decision models into relational query processing. JEVDB maps semantic operators directly to single-pass typed decision primitives (Noul, Choice, Score), eliminating autoregressive decoding loops and schema parsing overheads. To minimize expensive model calls, JEVDB combines exact Yannakakis-style semijoin reductions over relational structure with Semantic Bloom Filters (SBFs) that conservatively screen candidates across latent semantic edges. Surviving tuples are evaluated through an adaptive three-tier execution hierarchy, selectively escalating only uncertain cases to frontier LLMs. We evaluate JEVDB on both the public SemBench benchmark and Shelob, a large-scale semantic join workload derived from TPC-DS. On SemBench, JEVDB achieves average latency speedups of 72×−89×72\times-89\times (with peak query speedups exceeding 100×100\times) and reduces monetary costs by up to 18.7×18.7\times, while delivering equal or superior quality on 18 of 21 queries. On Shelob workloads scaling up to 540K candidate pairs where existing baselines time out, JEVDB completes all queries with 95.7%–97.5% mean F1, pruning 87.4% of candidates before model invocation. An interactive query simulator, source code, and benchmarks are previewed at https://jevdb.org.

Correspondence: chunwei@purdue.edu

Date: September 2026

Figure

PDAIS LAB

Purdue Data & AI Systems

1 Introduction

Recent breakthroughs in foundation models and Large Language Models (LLMs) have opened transformative opportunities for data analytics, enabling automated reasoning over unstructured text, multi-modal documents, and complex domain concepts Saeed et al. (2023); Zhao et al. (2024); Zhai (2024); Zhao et al. (2026b); Liu et al. (2025a). To bring these capabilities directly to relational data practitioners, recent data management research has introduced declarative semantic database systems Liu et al. (2025); Patel et al. (2025); Dorbani et al. (2025); Liskowski et al. (2026a). Systems such as Palimpzest Liu et al. (2025); Russo et al. (2026), LOTUS Patel et al. (2025), and DocETL Shankar et al. (2025) augment standard Structured Query Language (SQL) with first-class semantic operators, including semantic selections ( σsem\sigma_{sem}), joins ( ⋈sem\bowtie_{sem}), projections ( Πsem\Pi_{sem}), and aggregations ( Γsem\Gamma_{sem}). By unifying relational algebra with model inference, semantic databases allow users to express complex analytical queries declaratively, inheriting core database principles such as data independence, logical optimization, and cost-based plan enumeration.

Despite their expressive power, existing semantic database engines face a severe scalability wall. Traditional relational operators (e.g., hash joins, B-tree lookups, SIMD scans) execute at nanosecond-to-microsecond granularity Raasveldt and Mühleisen (2019); Stonebraker et al. (2005). In stark contrast, invoking an autoregressive foundation LLM requires hundreds of milliseconds to several seconds per tuple, while incurring substantial monetary costs when querying cloud-hosted APIs Chen et al. (2023); Liu et al. (2024, 2025); Zhao et al. (2026a); Liskowski et al. (2026b). Evaluating even a moderately sized analytical query over thousands or millions of tuples using full generative models quickly becomes computationally and financially expensive. While prior systems have explored various mitigation strategies—such as concurrent serving batching Patel et al. (2025); Kwon et al. (2023), physical model cascading Liu et al. (2025); Russo et al. (2026), prompt rewriting Shankar et al. (2025), or training lightweight proxy classifiers over precomputed embeddings Chung et al. (2026); Jo and Trummer (2024)—these techniques primarily optimize the scheduling of generative calls or trade execution time for heavy embedding storage and online training overheads, without resolving the underlying computational bottleneck.

We argue that the primary reason existing optimizations struggle to overcome this scalability wall is an underlying architectural impedance mismatch: semantic query engines are applying autoregressive, generative text decoders to evaluate non-generative, discrete relational predicates. Traditional LLMs are architected to synthesize free-form natural language through sequential, token-by-token decoding. Yet, the overwhelming majority of relational query operators require strictly typed, deterministic decisions rather than conversational text: a semantic filter evaluates to a Boolean truth value; a semantic join condition evaluates binary equivalence or compatibility; a categorical projection selects from a discrete Enum of candidate classes; and a semantic ranking query requires a scalar or ordinal Score. Coercing a multi-billion-parameter autoregressive model to generate conversational output (e.g., generating words like “True” or verbose JSON structures) merely to parse and cast the result back into relational types is fundamentally inefficient. It consumes redundant GPU memory bandwidth, inflates latency by multiple orders of magnitude, and exposes the execution pipeline to syntax hallucination and parsing failures.

Recently, the machine learning community has witnessed the rise of non-generative, “System One” decision models—exemplified by TypeSafe AI’s Jev TypeSafe AI (2026b) alongside modern calibrated cross-encoders and discriminative foundation models. Rather than synthesizing text token by token through expensive autoregressive loops, these models evaluate an input state against a natural language specification in a single forward pass. They natively output calibrated probabilities across discrete decision primitives: binary Boolean judgments (e.g., Noul), categorical selection over finite options (e.g., Choice), and ordinal or continuous scoring (e.g., Score). Trained with objectives tailored for calibrated decisions (such as RLCD) rather than conversational alignment (RLHF), these models deliver mathematically sound uncertainty metrics while achieving orders-of-magnitude lower latency and execution cost compared to frontier generative LLMs Ling et al. (2026). While emerging applications have attempted to deploy such decision models within autonomous agentic workflows (e.g., agent routing and ticket dispatching) Ling et al. (2026), agentic tasks frequently demand open-ended conversational generation and complex format synthesis—regimes where decision-only models struggle. Conversely, relational semantic databases present an ideal match for decision models. Relational queries require precisely the low-latency, typed determinations that these models natively supply, without requiring expensive embedding precomputation or online proxy model training.

In this paper, we present JEVDB 1^{1}, a scalable semantic database system that bridges classical relational query theory with calibrated fast-path decision models. We name our system JEVDB to reflect its core design philosophy: Just Evaluation and Verification. Rather than relying on expensive autoregressive text decoders for discrete relational predicates, JEVDB extracts just the necessary attributes and performs just the calibrated evaluation and verification required by relational algebra. Crucially, JEVDB is not coupled to any single proprietary backend; its architecture defines an adaptable, model-agnostic decision layer that unifies diverse non-generative architectures—including Jev, open-weight decision transformers, and fine-tuned cross-encoders—routing queries through high-throughput decision paths and selectively escalating to frontier generative LLMs only when deep contextual reasoning is required. Specifically, we make the following contributions:

• Relational-Semantic Algebra Mapping: We formalize the mapping of extended relational algebra operators (σsem,⋈sem,Πsem,Γsem)(\sigma_{\mathrm{sem}}, \bowtie_{\mathrm{sem}}, \Pi_{\mathrm{sem}}, \Gamma_{\mathrm{sem}}) directly to native, single-pass decision primitives (Noul, Choice, Score), eliminating

1^{1}JEVDB stands for Just Evaluation and Verification Database. It is an independent academic research project developed by Purdue University, and is not affiliated with or endorsed by TypeSafe AI.

token-generation overhead and syntax parsing from the semantic execution path.

• Relational and Semantic Candidate Reduction: To reduce the cost of large semantic joins, JEVDB combines two complementary forms of candidate reduction. Within explicit relational regions, it applies Yannakakis-style semijoin reduction to remove tuples that cannot participate in the relational query. Across latent semantic edges, JEVDB introduces Semantic Bloom Filters (SBFs), which use registered necessary conditions to conservatively screen tuples or pairs before model evaluation. Extracted condition attributes can optionally be materialized in a reusable condition index and amortized across repeated queries.

• Adaptive Three-Tier Execution Engine: We design a hierarchical query execution framework:

– Tier 1 (Filter Fast-Path): Relational predicate pushdown, Yannakakis-style semijoin reduction, and SBF screening.

– Tier 2 (Jev Decision Engine): High-throughput parallel evaluation of semantic selections and joins using single-pass calibrated decision models.

– Tier 3 (LLM Slow-Path): Selective fallback to generative frontier LLMs only when calibrated uncertainty exceeds an application-specified error threshold or open-ended text synthesis is explicitly requested.

• Evaluation on Diverse Benchmarks: We evaluate JEVDB on both standard workloads in SemBench Lao et al. (2026) and Shelob, a large-scale semantic join benchmark derived from TPC-DS. On SemBench, JEVDB achieves average latency speedups of 72.0×−89.4×72.0 \times -89.4 \times (reaching up to hundreds of times faster on individual queries) and reduces costs by up to 18.7×18.7 \times, while matching or exceeding baseline quality on 18 of 21 queries. On Shelob joins with up to 540K candidates where existing baselines time out, JEVDB finishes every query with 95.7%–97.5% mean F1 while pruning 87.4% of candidate pairs before inference, demonstrating scalable execution without compromising answer quality.

The remainder of this paper is structured as follows. Section 2 reviews related work in detail. Section 3 formalizes our typed operator mappings, Semantic Bloom Filter design, and execution engine. Section 4 provides our empirical evaluation on SemBench and Shelob, and Section 5 concludes with future work discussion.

References (50)