arXiv:2509.00303cs.DBcs.AI2025-09被引 5

用大模型优化数据排序,动态选最优路径提升效率

Access Paths for Efficient Ordering with Large Language Models

  • 提出语义感知的外部归并排序算法
  • 发现排序成本与排序质量存在测试时缩放关系
  • 设计预算感知优化器,实时选最优执行路径

本文提出 exttt{LLM ORDER BY} 语义操作符作为逻辑抽象,并系统研究其物理实现。首先,改进现有语义排序算法,引入语义感知外部归并排序。大量评估表明,单一实现无法在所有数据集上保持最优。我们观察到基于比较的算法中,排序成本与排序质量存在普遍的测试时缩放关系。基于此,设计预算感知优化器,结合启发式规则、大模型作为裁判评估及共识聚合,动态选择近似最优的访问路径。在广泛评估中,该优化器在所有基准测试中均达到或超越最佳静态方法的排序精度。本工作为构建鲁棒的大规模大模型分析系统提供了语义操作符的原理性优化基础。

原文摘要 · Abstract (English)

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.

大模型排序优化数据库智能调度

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。