Skip to content

Access Paths for Efficient Ordering with Large Language Models

Aug 2025 · arXiv.org · Vol abs/2509.00303 · 5 citations · 93 references
Computer Science

TL;DR

This work presents the LLM ORDER BY semantic operator as a logical abstraction as a logical abstraction and conducts a systematic study of its physical implementations, proposing several improvements to existing semantic sorting algorithms and introducing a semantic-aware external merge sort algorithm.

Abstract

In this work, we present the \texttt{LLM ORDER BY} semantic operator as a logical abstraction and conduct a systematic study of its physical implementations. First, we propose several improvements to existing semantic sorting algorithms and introduce a semantic-aware external merge sort algorithm. Our extensive evaluation reveals that no single implementation offers universal optimality on all datasets. From our evaluations, we observe a general scaling relationship between sorting cost and the ordering quality for comparison-based algorithms. Building on these insights, we design a budget-aware optimizer that utilizes heuristic rules, LLM-as-Judge evaluation, and consensus aggregation to dynamically select the near-optimal access path for LLM ORDER BY. In our extensive evaluations, our optimizer consistently achieves ranking accuracy on par with or superior to the best static methods across all benchmarks. We believe that this work provides foundational insights into the principled optimization of semantic operators essential for building robust, large-scale LLM-powered analytic systems.

View source

Similar papers

Book Open access Nov 2026

SERA: Evaluating LLM-based SEmantic RAnking over Structured Tables

LLM-based data systems are moving beyond text-to-SQL toward semantic query processing, where natural language requests are executed through operators that combine relational processing with LLM-driven inference. A central operator in this setting is SemanticRank, or semantic top-k: given a user intent and a set of rela...

Emilia Lenzi, D. Martinenghi, Paolo Papotti et al. · 0 citations
#machine learning Preprint Oct 2026

AdaEva: Accelerating LLM-Driven Algorithm Design with Adaptive Partial Evaluation

Large Language Models (LLMs) are increasingly used for automated algorithm design. However the computational cost of evaluating the generated algorithms can be excessive. We consider the common LLM-driven automated algorithm design (LLM4AD) setting in which a candidate algorithm is evaluated by aggregating its performa...

Tai Nguyen, Fei Liu, P. Le et al. · 0 citations
Preprint Oct 2026

Request-Adaptive Execution for Efficient Hybrid LLM Inference

Morph is a serving system that co-designs the model architecture and runtime for request-adaptive hybrid LLM inference and uses prefill-oriented gating to select a request-specific layout that remains fixed throughout decoding.

Fa-Hao Chen, Xu-Zhe Yan, Qi Zhang et al. · 0 citations
Preprint Oct 2026

Uber-Join: Unifying Diverse Table Joins using LLMs with Precision and Cost Guarantees

When two tables from different sources are joined, the values that should join often differ in spelling, format, or meaning, and fuzzy-, transformation-, and semantic-joins each handle one type of these differences. Large language models (LLMs) can match values that differ in several ways at once, but every LLM call is...

Guo-Hui Guan, Chang Ge, Ye-Ye He · 0 citations
Preprint Oct 2026

Cross-Primitive Consistency in Jev

Jev enables efficient decision-making with large language models (LLMs) through typed querying primitives, allowing the same semantic state to be expressed in different formats, such as binary and multiple-choice queries. However, the consistency of decisions across primitives has not been systematically evaluated. Thi...

Xu Liu, Gui-Kun Chen, Kan-Zhi Wu et al. · 0 citations
Preprint Sep 2026

KathDB-FAO: Optimizing Multimodal Queries through Operator Grouping and Code Reuse

Advances in multimodal large language models (multimodal LLMs) allow data systems to answer analytical queries over text and images alongside relational tables, but at a significant cost for large-scale data. Existing systems reduce this cost through rewrite rules written in advance, which cannot use the logic of an in...

Guo-Rui Xiao, Douglas Brown, Artur Borycki et al. · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.