Same Query, Different Answer: Run-to-Run Variance in Semantic Query Processing
cs.DB, cs.AI
Submitted: 2026-10-09
Updated: 2026-10-09
Comments: Code and data: https://github.com/semviews/sqp-variance-study
Code: https://github.com/semviews/sqp-variance-study
License: http://creativecommons.org/licenses/by-nc-nd/4.0/
The gist: Semantic query engines ask a large language model (LLM) to judge individual rows, and benchmarks compare these engines on the quality of a few executions at temperature 0.
Abstract
Semantic query engines ask a large language model (LLM) to judge individual rows, and benchmarks compare these engines on the quality of a few executions at temperature 0. We measure how much another execution changes. We re-execute the text and tabular workloads of SemBench, LRO-Bench, and UDA-Bench through their own harnesses, log every one of 1.2 million model calls, and reanalyze SemBench's published executions. At temperature 0, between 0.07% and 10.2% of rows change their operator output over five executions, depending on the model, and up to 24.0% on one task. Plans amplify these changes exponentially in the number of rows an answer exposes, as a possible-worlds model predicts: on UDA-Bench, a few percent of extracted values change, but about two thirds of the answers do. In SemBench's published results, 21% of text results change quality between executions, including on engines whose plans are deterministic. Several per-query system comparisons, and 16 of 28 tests of LRO-Bench's implementation recommendations, are not settled by the executions the benchmarks run. Changing rows are rows on which models disagree with each other; identical requests within one execution disagree as often as across executions; and one execution's decision margin or reasoning length predicts which rows change. Voting reduces the variance but does not remove it, and a calibrated cascade keeps its guarantee while the rows it returns change. We derive reporting rules for benchmarks and design rules for engines.
Sources
- The Stochastic Shift: A New Evaluation Paradigm for Text-to-SQL with AI Operators
- Non-Determinism of "Deterministic" LLM Settings
- UQE: A Query Engine for Unstructured Databases
- From Interpretation to Compilation: A Compilation-Based Execution Engine for Semantic Operator Systems
- Beyond Quacking: Deep Integration of Language Models and RAG into DuckDB
- CADENZA: Compiling Natural-Language Intent into Task-Specific Operator DAGs for Semantic Query Processing
- Language Models (Mostly) Know What They Know
- Fast LLM-Based Semantic Filtering: From a Unified Framework to an Adaptive Two-Phase Method
- iPDB -- Optimizing Semantic SQL Queries
- SemBench: A Benchmark for Semantic Query Processing Engines
- Cortex AISQL: A Production SQL Engine for Unstructured Data
- A Declarative System for Optimizing AI Workloads
- Optimizing LLM Queries in Relational Data Analytics Workloads
- PLOP: Cost-Based Placement of Semantic Operators in Hybrid Query Plans
- Adding Error Bars to Evals: A Statistical Approach to Language Model Evaluations
- An Empirical Study of the Non-determinism of ChatGPT in Code Generation
- Semantic Operators: A Declarative Model for Rich, AI-based Data Processing
- Sema: A High-performance System for LLM-based Semantic Query Processing
- Abacus: A Cost-Based Optimizer for Semantic Operator Systems
- The Stretto Execution Engine for LLM-Augmented Data Systems
Related papers
- Cost-Aware Mixture-of-Experts Coordination for Model Markets
- Vibe Coding on Trial: Operating Characteristics of Unanimous LLM Juries
- Human-Level Text-to-SQL via Reinforcement Learning on Verified Data, Without Pipeline Engineering
- MetaJoin: Adaptive Join Selections for Heterogeneous Tables
- Bridging Business Intent and Data: A Benchmark for Automatic Relational Data Product Generation
- DexterSQL: Deep Schema Exploration and Rule-based Correction for Text-to-SQL Generation