A General LLM Framework for Query Refinement
Abstract
Numerous studies have explored the SQL query refinement problem, where the objective is to minimally modify an input query so that its output 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.
Fields of Study & Subjects
Advanced Database Systems and Queries
Software Engineering Research
Natural Language Processing Techniques
Publication details
- Journal / source
- arXiv (Cornell University)
- Publication date
- 17 February 2026
- Language
- EN
- Document type
- Preprint