Numerous studies have explored the SQL query refinement problem, where the objective is to minimally modify an input query so that it satisfies a specified set of constraints. However, these works typically target restricted classes of queries or constraints. We present OmniTune, a general framework for refining arbitrary SQL queries using LLM-based optimization by prompting (OPRO). OmniTune employs a two-step OPRO scheme that explores promising refinement subspaces and samples candidates within them, supported by concise history and skyline summaries for effective feedback. Experiments on a comprehensive benchmark demonstrate that OmniTune handles both previously studied refinement tasks and more complex scenarios beyond the scope of existing solutions.
Cite
@article{arxiv.2602.15681,
title = {A universal LLM Framework for General Query Refinements},
author = {Eldar Hacohen and Yuval Moskovitch and Amit Somech},
journal= {arXiv preprint arXiv:2602.15681},
year = {2026}
}