TL;DR
This paper formalizes the integration of Large Language Models (LLMs) into relational databases by establishing a unified taxonomy for LLM-Enhanced Relational Operators (LROs). To resolve the fragmented landscape of LLM-database systems, the authors introduce LroBench, a comprehensive benchmark for evaluating these operators both individually and in complex pipelines. By systematically analyzing different execution strategies, they derive design best practices that achieve up to 86.67% accuracy on multi-operator queries, significantly outperforming existing state-of-the-art systems.
What Problem Does This Paper Address?
Traditional relational databases (SQL) excel at structured, exact-match queries but struggle with semantic reasoning, world knowledge retrieval, and unstructured data processing. To bridge this gap, recent research has introduced operator-like components that invoke LLMs while preserving standard relational input/output interfaces—such as semantic filtering, entity matching, and table imputation.
However, this emerging field suffers from a highly fragmented landscape. Different systems use completely different names and implementation strategies for identical underlying tasks. Furthermore, there has been a lack of standardized benchmarks to evaluate these operators in isolation or to understand how choices made at the individual operator level impact end-to-end multi-operator pipelines.
Methods
The authors first establish a unified LRO taxonomy, categorizing operators into five basic types based on the intent of the LLM request:
- Filter: Subsetting rows, columns, or tables based on semantic conditions.
- Match: Establishing semantic relationships across data elements (e.g., entity resolution).
- Impute: Filling in missing values or generating new columns/rows.
- Cluster: Grouping records or schema elements by semantic similarity.
- Order: Ranking records using qualitative, non-numerical criteria.
Crucially, the paper evaluates different implementation variants for these operators:
LLM-ALL(Batch Strategy): Packing all data candidates into a single prompt for a one-time LLM invocation.LLM-ONE(Candidate-wise Strategy): Iterating through candidates one by one, invoking the LLM for each.LLM-SEMI(One-to-Many Strategy): Prompting the LLM to match one item against a set of candidates.- Specialized sorting strategies for the Order operator (
LLM-PAIR,LLM-SORT,LLM-SCORE).
The authors implement these variants uniformly and test them across three state-of-the-art base models: GPT-5, Qwen3-Max, and Claude-Sonnet-4.5.
Datasets
The authors introduce LroBench, a benchmark spanning 27 real-world databases across more than 10 domains (curated from sources like BIRD and Magellan). Unlike standard Text-to-SQL benchmarks that merely use LLMs to generate classical SQL code, LroBench requires actual semantic execution.
LroBench contains:
- 290 single-LRO queries to evaluate individual operators in isolation across all taxonomy combinations.
- 60 multi-LRO queries stratified by complexity (number of tables, operation hops, and knowledge difficulty) to test end-to-end systems.
Key Insights and Ideas
- The Power of the Global View: For Match, Cluster, and Order tasks, the
LLM-ALLstrategy consistently outperformsLLM-ONE. Providing a global context allows the LLM to make relative comparisons, reducing conflicting or inconsistent decisions that plague independent pairwise judgments (e.g., avoiding logical contradictions like $A > B$, $B > C$, but $C > A$). - The Illusion of Infinite Context: While modern LLMs boast massive theoretical context windows (e.g., 400k tokens), the
LLM-ALLstrategy degrades rapidly in accuracy and stability when handling more than 2,000 tokens (approx. 100 tuples). Long prompts cause "attention dilution," leading to malformed or syntactically invalid outputs. This highlights a major gap between theoretical context limits and reliable reasoning boundaries. - Fragile Automated Planning: Current multi-LRO systems that rely on LLMs to automatically plan query execution perform terribly (<15% accuracy). Unreliable initial plans derail downstream steps, proving that robust query optimization remains a critical bottleneck.
Key Results
By combining the operator-level best practices discovered during single-LRO testing, the authors built a "best-practice baseline." When evaluated on complex multi-LRO queries using GPT-5, this baseline achieved an outstanding 86.67% accuracy.
In comparison, existing manual-planning multi-LRO systems achieved significantly lower accuracy:
- BlendSQL: 55.00%
- LOTUS-TAG: 50.00%
- Palimpzest: 43.33%
- DocETL: 13.33%
Our best-practice baseline also proved highly cost-efficient, often costing a fraction of alternative architectures (e.g., 2–5× cheaper than Palimpzest and 10× cheaper than HQDL) due to optimized batching choices.
Limitations and Future Work
The primary limitation identified is the scalability wall of the LLM-ALL strategy due to attention dilution. To combat this, the authors point to smart batching strategies and fine-tuned LRO implementations as vital next steps to balance quality and cost.
In the long term, the authors envision moving away from treating LLMs as mere database "plugins." Instead, they advocate for LLM-centric databases rebuilt entirely around LLM-native operators. This future paradigm will require multi-modal unified storage, semantic-aware indexing beyond vanilla RAG, adaptive context management, and holistic query optimizers that jointly orchestrate storage and model invocation.
Summary updated