Access Paths for Efficient Ordering with Large Language Models

Fuheng Zhao, Jiayue Chen, Yiming Pan, Tahseen Rabbani, Sohaib +5 more
8/30/2025
cs.DBcs.AIcs.IR

No confident code implementation found for this paper. 1 possible match can be shown below.

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 test-time 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 on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{zhao2025access,
  title  = {Access Paths for Efficient Ordering with Large Language Models},
  author = {Fuheng Zhao and Jiayue Chen and Yiming Pan and Tahseen Rabbani and Sohaib and Divyakant Agrawal and Amr El Abbadi and Paritosh Aggarwal and Anupam Datta and Dimitris Tsirogiannis},
  year   = {2025},
  eprint = {2509.00303},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2509.00303v2}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2509.00303.svg)](https://codeofpaper.com/paper/2509.00303)

Discussion