Semantic database system speeds up complex queries and cuts costs
Prune First, Decide Fast: Scalable Semantic Query Processing with JEVDB
Databases
Summary
Databases that understand and query unstructured data usually rely on slow and costly large language models to process questions. The authors propose JEVDB, a system that uses quicker, specialized decision models to handle most queries and only calls on slower language models for uncertain cases. This approach cuts down the amount of data to check and speeds up query processing while keeping results accurate. Tests show that JEVDB is faster, cheaper, and still gets good answers compared to current systems.
What this means in practice
- •For database engineers: Build scalable semantic query engines that reduce reliance on costly large language models by combining fast typed decision models with selective escalation.
- •For data platform operators: Lower query costs and accelerate response times in systems handling complex unstructured data queries with intelligent candidate screening.
Authors
Zhengle Wang, Hanxu Yan, Fuheng Zhao, Chunwei Liu
Abstract
Semantic database systems extend SQL with foundation-model inference over unstructured data, but current engines rely heavily on autoregressive LLMs for discrete relational decisions, creating high latency and monetary cost. We present JEVDB, a scalable semantic database system that uses fast, typed decision models for semantic filters, joins, classification, and ranking, while selectively escalating uncertain cases to generative LLMs. To reduce semantic-join work, JEVDB combines exact Yannakakis-style semijoin reduction over relational structure with Semantic Bloom Filters (SBFs), which use registered necessary conditions to screen candidates across latent semantic edges. We evaluate JEVDB on SemBench and Shelob, a TPC-DS-derived semantic-join workload. On SemBench, JEVDB-Flash achieves the lowest latency on all 21 evaluated queries and the lowest cost on 19, while maintaining competitive answer quality. On Shelob, where joins scale to 540K candidate pairs, JEVDB completes all queries with 95.7%-97.5% mean F1. SBF screening removes 87.4% of candidate pairs before semantic evaluation, and reusable condition-index scoring further reduces reasoning-model escalations by 55.2%. An interactive query simulator, source code, and benchmarks are available at https://jevdb.org.