Reproduce “Towards Optimizing SQL Generation via LLM Routing” on OpenResearch
Run Claude Code, Codex or any coding agent as a research agent: literature, hypotheses and experiments on your laptop, cluster or cloud GPUs.
Universal app for Apple silicon and Intel. Requires macOS 11 or later.
About this paper
Mohammadhossein Malekpour, Nour Shaheen, Foutse Khomh, Amine Mhedhbi
Researchers introduce LLM routing strategies for Text-to-SQL systems, dynamically assigning queries to different-sized LLMs based on their estimated complexity. This approach achieved up to a 1.4x cost reduction with a minimal impact on execution accuracy compared to using only the most powerful models.
Key insights
- A significant portion of natural language queries (37.56%) can be correctly handled by less powerful, more cost-effective LLMs.
- The most powerful LLMs (e.g., GPT-4o) are still necessary for a substantial set of complex queries (23.07%) that simpler models cannot solve.
- LLM routing enables system designers to effectively manage the trade-off between execution accuracy and operational costs by tuning router parameters like similarity threshold ( ) and number of similar queries (K).
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.