A Survey on Sorting with Large Language Models
Ryoma Sato
National Institute of Informatics
Email: rsato@nii.ac.jp
Data Processing Club Technical Report
DPC-TR-2026-001
2026-02-10
Abstract
Sorting is a classical task in computer science, yet it has recently converged with state-of-the-art LLMs, giving rise to a new research trend. Sorting can leverage existing algorithms as long as a comparison function is defined. Traditional comparison functions typically assumed measurable numerical values such as height, price, or distance. With LLMs, however, it becomes possible to compare ambiguous and subjective concepts such as "which is preferred," "which is more persuasive," or "which is more relevant to the query." By invoking an LLM within the comparison function, sorting based on these concepts becomes feasible. Since the cost model for LLM-based comparisons differs from that of traditional numerical comparisons, new algorithm designs may be required. This paper surveys the foundations of LLM sorting, categorizes design methodologies, and reviews application examples.