Pith. sign in

REVIEW 2 cited by

R-Bot: An LLM-based Query Rewrite System

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2412.01661 v2 pith:FNCABWF6 submitted 2024-12-02 cs.DB cs.AIcs.CLcs.LG

classification cs.DBcs.AIcs.CLcs.LG
keywords rewritequeryr-botsystemevidencesllmsproposeresults
verification ladder T0 review T1 audit T2 compute T3 formal
0 comments
read the original abstract

Query rewrite is essential for optimizing SQL queries to improve their execution efficiency without changing their results. Traditionally, this task has been tackled through heuristic and learning-based methods, each with its limitations in terms of inferior quality and low robustness. Recent advancements in LLMs offer a new paradigm by leveraging their superior natural language and code comprehension abilities. Despite their potential, directly applying LLMs like GPT-4 has faced challenges due to problems such as hallucinations, where the model might generate inaccurate or irrelevant results. To address this, we propose R-Bot, an LLM-based query rewrite system with a systematic approach. We first design a multi-source rewrite evidence preparation pipeline to generate query rewrite evidences for guiding LLMs to avoid hallucinations. We then propose a hybrid structure-semantics retrieval method that combines structural and semantic analysis to retrieve the most relevant rewrite evidences for effectively answering an online query. We next propose a step-by-step LLM rewrite method that iteratively leverages the retrieved evidences to select and arrange rewrite rules with self-reflection. We conduct comprehensive experiments on real-world datasets and widely used benchmarks, and demonstrate the superior performance of our system, R-Bot, surpassing state-of-the-art query rewrite methods. The R-Bot system has been deployed at Huawei and with real customers, and the results show that the proposed R-Bot system achieves lower query latency.

Discussion (0). Sign in to comment.

Forward citations

Cited by 2 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score. Full citation record

  1. MCTuner: Spatial Decomposition-Enhanced Database Tuning via LLM-Guided Exploration

    cs.DB 2025-09 reject novelty 5.0 of 10

    MCTuner reports up to 19.2% performance gains and roughly 1.4x faster discovery of good configurations by combining LLM knob selection with recursive space decomposition and Bayesian optimization.

  2. SEFRQO: A Self-Evolving Fine-Tuned RAG-Based Query Optimizer

    cs.DB 2025-08 unverdicted novelty 5.0 of 10

    SEFRQO claims a self-evolving fine-tuned LLM with retrieval and execution feedback reduces query latency versus PostgreSQL, but the provided body is a different paper, blocking verification.

Pith tools