Do Semantic Query Engines Need LLMs? An Experimental Study of Decision Models
Semantic query processing engines (SQPEs) evaluate predicates written in natural language inside SQL by prompting large language models (LLMs), and many send the decisions a cheaper model is unsure of to a larger LLM. Yet a predicate often asks a question with a fixed set of answers, such as whether a review is positive, and a new kind of model targets such questions: decision models, small models that answer yes/no, choice and score questions with a probability for every answer. We present an experimental study of whether semantic query engines still need LLMs. Its key idea is to treat the reference as a variable. Every decision is scored against two references, the gold that people entered and what its text says, and every engine is calibrated with labels from the reference it is scored against. We run the study on SemBench and on DecideBench, a new benchmark whose answers combine many decisions through joins, quantifiers, negation and aggregates, in DecideSQL, a DuckDB-based engine in which decision models, LLMs, cascades and recorded decisions are interchangeable. Without labels, a 9B decision model matches or beats a 120B LLM on most of the SemBench queries it can answer, at…
- arXiv
- 2612.00949
- Authors
- Oktie Hassanzadeh, Long Vu, Dharmashankar Subramanian
- Categories
- cs.DB · cs.AI