EUVIMEDEUVIMED entdecken
Crossref

R-Bot: An LLM-Based Query Rewrite System

Zhaoyan Sun, Xuanhe Zhou, Guoliang Li, Xiang Yu, Jianhua Feng, Yong Zhang

Proceedings of the VLDB Endowment · 2025-08 · 18 (12) · 5031-5044

DOI: 10.14778/3750601.3750625 ↗

Kurz gefasst

Fachartikel in der Zeitschrift Proceedings of the VLDB Endowment, online erschienen am 16.09.2025. Verfasst von Zhaoyan Sun und 5 weiteren Autor:innen. Die Arbeit wurde bisher 15-mal zitiert (Crossref) und nennt 64 Literaturangaben.

AbstractBibliografische AngabenZitierenVerwandte Studien

Abstract (Originalsprache)

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.

Zitieren

APA

Sun, Z., Zhou, X., Li, G., Yu, X., Feng, J., & Zhang, Y. (2025). R-Bot: An LLM-Based Query Rewrite System. Proceedings of the VLDB Endowment, 18(12), 5031-5044. https://doi.org/10.14778/3750601.3750625

Vancouver

Sun Z, Zhou X, Li G, Yu X, Feng J, Zhang Y. R-Bot: An LLM-Based Query Rewrite System. Proceedings of the VLDB Endowment. 2025;18(12):5031-5044. doi:10.14778/3750601.3750625

BibTeX
@article{Sun2025,
  author = {Sun, Zhaoyan and Zhou, Xuanhe and Li, Guoliang and Yu, Xiang and Feng, Jianhua and Zhang, Yong},
  title = {R-Bot: An LLM-Based Query Rewrite System},
  journal = {Proceedings of the VLDB Endowment},
  year = {2025},
  volume = {18},
  number = {12},
  pages = {5031--5044},
  doi = {10.14778/3750601.3750625}
}
Kostenlos starten →