cs.DBNov 26, 2026

ACTIS: Adaptive Cascade Tuning for Semantic Filters with Statistical Guarantees

Authors: Neil Marchant, Renata Borovica-Gajic, Benjamin Rubinstein, Olga Ohrimenko

Organizations: University of Melbourne

Abstract

Emerging semantic database systems use Large Language Models (LLMs) to evaluate natural language predicates during query processing. However, invoking an expensive frontier model for every tuple is prohibitively costly and induces high latency. Model cascades mitigate these limitations by using a cheap proxy to score all tuples, escalating only uncertain predictions to an expensive LLM oracle. To be deployed reliably, cascades are tuned on a sample of oracle-labeled tuples to satisfy precision and recall targets with high probability. Our comprehensive audit reveals that several existing tuning methods frequently violate these guarantees: state-of-the-art techniques are certified unsound on up to 90.5% of benchmarks and can miss accuracy targets by more than 70 percentage points. To improve efficiency and ensure soundness guarantees for semantic databases, we design ACTIS, an adaptive cascade tuning framework. ACTIS acquires oracle labels incrementally using anytime-valid tests with finite-sample safeguards, avoiding the over- or under-sampling pitfalls of a fixed pilot sample. A decoupled fixed-sequence search explores fine-grained threshold grids without conservative multiple-testing corrections, while a variance-minimizing importance sampling distribution reduces labels spent on uninformative negatives for selective queries. A value-of-information stopping rule halts tuning when additional oracle labeling costs exceed expected savings across the remaining workload. Across 42 benchmarks with cloud and local proxies, ACTIS matches or outperforms the only sound baseline on 39 of 42 settings, reducing oracle calls by up to 5.1×\times.

Figures & tables

Appendix figures & tables3 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

Apr 1, 2026

Streaming Model Cascades for Semantic SQL

Modern data warehouses extend SQL with semantic operators that invoke large language models on each qualifying row, making per-row inference orders of magnitude more expensive than traditional SQL. Model cascades reduce this cost by routing most rows through a fast proxy model and delegating uncertain cases to an expensive oracle. Prior SUPG-style cascades, however, require a global proxy-score pass that is itself an LLM-inference workload and blocks output in pipelined query engines. They also target either precision or recall and cannot serve workloads that need both. We formalize the cascade routing problem for streaming semantic SQL with independent parallel workers and present two complementary algorithms within this model. SUPG-IT extends SUPG from single-pass, single-metric estimation to streaming execution by iteratively refining two thresholds as oracle labels accumulate across batches, and is the first streaming cascade with joint probabilistic guarantees on user-specified precision and recall at a chosen failure probability δδ. GAMCAL replaces user-specified targets with a single tradeoff parameter αα between classification error and oracle cost, and learns a monotone Generalized Additive Model that calibrates proxy scores to true-positive probabilities and supplies pointwise uncertainty for stochastic routing. On six classification, filtering, and join benchmarks evaluated in a production semantic SQL engine, both algorithms reach F1≥0.95F_1 \geq 0.95 at their best operating points. GAMCAL also leads all six datasets at a 20% delegation budget and reaches F1≥0.95F_1 \geq 0.95 with up to 58% fewer oracle calls than LOTUS's SUPG cascade. SUPG-IT attains the highest best-case F1F_1, with a mean of 0.989 across the six datasets.
Jun 6, 2026

Fast LLM-Based Semantic Filtering: From a Unified Framework to an Adaptive Two-Phase Method

Evaluating a natural-language yes/no predicate over a document corpus under an accuracy target - the semantic filter - is a cornerstone of LLM-based data processing. Calling the LLM on every document (the oracle) is prohibitive, so cascades pair the oracle with a fast proxy. As deployed today, they leave four limitations on the table. (1) Each cascade family - model-free clustering, prebuilt small-LLM proxies, online-trained proxies - commits to a single representation and pipeline, and wins on only a narrow query regime. (2) The strongest online proxy invests in a custom training scheme on a bi-encoder over dense embeddings, missing the token-level evidence richer predicates require. (3) The proxy is trained against binary yes/no labels, wasting the LLM's per-document confidence at the boundary documents it most needs to learn. (4) Existing calibrations add a uniform safety margin, conflating genuine proxy uncertainty with small-sample noise and inflating cascade cost. We address these by (1) composing families adaptively - model-free clustering first, online proxy only when needed, with oracle calls shared across phases; (2) replacing the cosine bi-encoder with a hybrid of off-the-shelf token-aware models; (3) training the proxy with the oracle's per-document confidence as a soft label; and (4) a calibration that adds the safety margin only where the labeled sample is sparse. We are also the first to use the oracle's per-document confidence for three purposes: a query-level difficulty compass, a lower bound on the minimum oracle calls any proxy-based cascade can make, and the proxy's soft training label. At a 90% accuracy target on three 10K-document corpora, our methods are 1.6-2.0x faster than the best prior method per corpus and meet the target on 95% of queries; the BER-derived lower bound indicates a further ~4-20x of headroom for future work.
Oct 8, 2026

Semantic Views: Certified Reuse of LLM Labels Across Semantic Queries

Semantic query engines evaluate natural-language filters with a large language model, and every evaluation is a costly oracle call. Optimizers that reduce these calls face a dilemma: cascades that trust a cheap proxy miss their precision and recall targets on many queries, methods with finite-sample guarantees save little, and all of them discard the oracle's labels when the query ends. We present SemViews, a certified semantic filter that orders tuples by signals that cost no oracle calls (the labels that earlier queries left behind as semantic views, a local embedding, and a helper model's score), refines that order with labels it must pay for anyway, and certifies its answer with fresh stratified oracle samples. The answer meets user precision and recall targets with probability at least 1−δ1-δ for every workload and every catalog, so a stale or misleading view can cost oracle calls but never accuracy. On four workloads replayed against 725,000 recorded oracle labels, SemViews meets both targets on 99.63% of queries and saves 28%-45% of the oracle calls, whereas the only prior method in our study with the same guarantee needs 1.32x-1.71x as many calls. When a question returns in different words, views cut its calls by a further 27%-36%, with both targets met on at least 99.8% of such queries; similarity caches and entailment-based reuse meet them on only 17%-47%.