DecideSQL: Probabilistic Semantic Query Processing with Decision Models
Semantic query engines let SQL filter and aggregate rows by what their text says, by prompting a large language model (LLM) for every row they read. Most return the rows the model accepts without a probability for each answer, and those that bound their errors do so relative to an LLM or to labels collected for one query, not to a reading of the text that the user chooses. Decision models, small models that return the probability of a yes instead of generating text, make per-answer probabilities cheap, and probabilistic databases have long known how to query such probabilities. We present DecideSQL, a semantic query engine on DuckDB that treats a natural-language predicate as a probabilistic relation whose probabilities a model supplies on demand. A decision store keys every decision by its decider, question and text, so a stored decision is not requested again, and Explain counts the decisions a query needs before any model is called. Calibration maps turn a model's scores into the probability that a reference of the user's choice says yes, where the reference can be the labels that came with the data or what the text says. References are stored like deciders, so one SQL query…
- arXiv
- 2612.00962
- Authors
- Oktie Hassanzadeh, Long Vu, Dharmashankar Subramanian
- Categories
- cs.DB · cs.AI