GaussMaster : An LLM-based Database Copilot System

Wei Zhou 1 , Ji Sun 1 , Xuanhe Zhou 3 , Guoliang Li 2 , Luyang Liu 1 , Hao Wu 1 , Tianyuan Wang 1 · 2025

Read GaussMaster : An LLM-based Database Copilot System by Wei Zhou 1 , Ji Sun 1 , Xuanhe Zhou 3 , Guoliang Li 2 , Luyang Liu 1 , Hao Wu 1 , Tianyuan Wang 1 (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2506-23322.txt.

Introduction

Wei Zhou and co-authors present GaussMaster in 2025, an AI copilot for database administrators. Keeping big databases healthy is heavy work: tuning queries, spotting faults, and fixing services. Older helper platforms each solved one slice of the job, leaving humans to stitch the rest.

GaussMaster uses a large language model to cover the whole care cycle. It reads hundreds of metrics and logs, reasons in a tree of hypotheses to find a root cause, and calls tools to fix the issue. In banking use, it handled over thirty-four maintenance scenarios with no human help. It also helps developers write faster queries. The code is public.

Catalog record

CREATORWei Zhou 1 , Ji Sun 1 , Xuanhe Zhou 3 , Guoliang Li 2 , Luyang Liu 1 , Hao Wu 1 , Tianyuan Wang 1
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE20 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2506-23322

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

GaussMaster : An LLM-based Database Copilot System Wei Zhou 1 , Ji Sun 1 , Xuanhe Zhou 3 , Guoliang Li 2 , Luyang Liu 1 , Hao Wu 1 , Tianyuan Wang 1 Abstract . In the financial industry, data is the lifeblood of operations, and DBAs shoulder significant responsibilities for SQL tuning, database deployment, diagnosis, and service repair. In recent years, both database vendors and customers have increasingly turned to autonomous database platforms in an effort to alleviate the heavy workload of DBAs. However, existing autonomous database platforms are limited in their capabilities, primarily addressing single-point issues such as NL2SQL, anomaly detection, and SQL tuning. Manual intervention remains a necessity for comprehensive database maintenance. GaussMaster aims to revolutionize this landscape by introducing an LLM-based database copilot system. This innovative solution is designed not only to assist developers in writing efficient SQL queries but also to provide comprehensive care for database services. When database instances exhibit abnormal behavior, GaussMaster is capable of orchestrating the entire maintenance process automatically. It achieves this by analyzing hundreds of metrics and logs, employing a Tree-of-thought approach to identify root causes, and invoking appropriate tools to resolve issues. We have successfully implemented GaussMaster in real-world scenarios, such as the banking industry, where it has achieved zero human intervention for over 34 database maintenance scenarios. In this paper, we present significant improvements in these tasks with code at https://gitcode.com/opengauss/openGauss-GaussMaster . 1. Introduction Large language models (LLMs) have shown significant potential to transform the database field ( Li et al. 2024 ; Amer-Yahia et al. 2023 ) . However, most existing LLM-powered database solutions focus narrowly on natural language to SQL (NL2SQL) tasks ( ora acle ; ama azon ; azu SQL ; Zhou et al. 2025a ; Zhou et al. 2025b ) , which helps reduce users’ learning curve but does not fundamentally ease the burdens of database technicians. In practice, database professionals must address a wide array of technical issues, ranging from product-specific inquiries (often dependent on proprietary knowledge) to performance troubleshooting and anomaly diagnosis (e.g., precisely identifying which SQL statements spike CPU usage). Although some studies have investigated LLM-based database maintenance ( Zhou et al. 2024 ; Singh et al. 2024 ; Zhou et al. 2023 ) , they tend to provide generic solutions and often struggle with tasks like pinpointing the exact slow queries or managing highly specific operational procedures demanded by enterprise-scale environments. To bridge these gaps, we demonstrate GaussMaster , a system that leverages LLMs to function as database technicians (specifically designed for a commercial database named GaussDB) throughout the lifecycle, including stages like database development, deployment, and maintenance (see Figure 1 ). We address three main challenges when directly applying general-purpose LLMs to the database tasks. First, proprietary GaussDB knowledge is not publicly available, rendering off-the-shelf LLMs incapable of accurately answering many domain-specific questions. Our analysis shows that out of the 1614 real-world bank questions , generic LLMs often either fail to provide conclusive answers or incorrectly infer from other database systems (e.g., PostgreSQL rather than GaussDB). Second, high-stakes enterprise environments, such as banking, demand strict correctness and safety, yet LLMs easily produce irrelevant or even hazardous responses. For instance, LLMs may hallucinate unsupported commands or carry out risky operations (e.g., unauthorized data access). Finally, LLM-based anomaly diagnosis in GaussDB requires orchestrating multiple private tools in sequence (e.g., slow-query tracing, metric inspections), but naïve LLM-driven pipelines frequently misconfigure tools or invoke them repeatedly, making the diagnostic process unnecessarily long and error-prone. Figure 1 . GaussMaster offers comprehensive database maintenance ability across diverse tasks. We address these challenges by integrating (1) a heterogeneous GaussDB knowledge base, (2) an LLM -based Q&A module, and (3) an LLM -based Diagnosis & Repair framework into a single end-to-end solution. First, GaussMaster aggregates diverse GaussDB documents and diagnostic tools into a unified knowledge base, covering everything from maintenance FAQs to internal command specifications. Second, a retrieval-augmented generation (RAG) pipeline combines literal and semantic retrieval with multi-stage safety checks to ensure concise, accurate, and risk-free Q&A responses. Finally, GaussMaster employs an adaptive anomaly diagnosis module. Guided by a series of expert-defined diagnosis trees, this module systematically orchestrates tool usage, fills parameters through a two-step prompt design, and generates an interpretable root-cause report. In real-world banking scenarios (e.g., the Agricultural Bank of China), GaussMaster delivers over 80% fully correct, safe answers in Q&A, and achieves over 95% accuracy in tool orchestration for anomaly diagnosis. Figure 2 . Overview of GaussMaster 2. System Implementation 2.1. System Overview GaussMaster handles diverse database tasks with a unified natural language interface. Figure 2 shows the system architecture. Knowledge Base Preparation. GaussMaster aggregates multi-source GaussDB documents into a unified knowledge base, splitting text by semantic boundaries (e.g., the code block including GaussDB SQLs), retaining structural elements (e.g., the hierarchical titles in markdown files), and removing duplicates. Each chunk is augmented with version tags and neighboring context. Additionally, GaussMaster wraps DBMind’s 25 diagnostic tools under a RESTful interface and codifies expert workflows into anomaly diagnosis trees, improving the troubleshooting stability of LLMs . LLM -based Question Pre-processing. When a user raises a natural language question, GaussMaster first performs two steps of pre-processing: (1) Hybrid Question Decomposition: the question is decomposed into finer-grained sub-queries (e.g., smaller semantic chunks or tool-invocation hints) via both rule-based and LLM methods. (2) Intent-Aware Prompt Assignment: Based on the question’s content and intent, GaussMaster automatically routes by prompting LLMs the question into either the LLM -based Q&A module (including the code copilot functionality like code review and optimization) or the LLM -based Diagnosis & Repair module (if it detects an anomaly-related or troubleshooting intent). LLM -based Q&A. We provide three main functions: (1) Risk checking mechanism with both a sensitive word detector and a semantic-based content classifier. Once the preprocessed questions are considered to be risky, GaussMaster returns a pre-defined refusal response to users; (2) Hybrid knowledge retrieval for matching the most relevant information (from sources like the development guide and the FAQ textbook) to answer the question. We fine-tune an embedding model and a re-ranking model over the GaussDB corpus with 106,810 samples by expanding the input question set through rule-based synonym substitution and LLM-based question rephrasing. The retrieved information is utilized to generate high-quality answers; (3) The generated answer goes through the same risk checking mechanism to ensure safety before responding to users. LLM -based Diagnosis & Repair. We call the module given the description of triggered alerts, which supports four main functions: (1) Identify the correct tools through hybrid retrieval and re-ranking based on user question and tool usage descriptions; (2) Multi-step strategy to fill in the corresponding parameters by analyzing user questions and asking for the complement of absent ones from users; (3) Retrieve the relevant historical alarm cases and diagnosis tree (i.e., the sequence of troubleshooting steps by GaussDB experts) for the subsequent diagnosis; (4) Conduct diagnosis-tree-guided orchestration using multiple tools, combined with a multi-agent diagnosis approach that includes expert assignment, task decomposition, and self-reflection ( Zhou et al. 2024 ) . 2.2. Knowledge Base Preparation The knowledge base of GaussMaster involves multi-source GaussDB information, which is absent in existing LLMs . Currently, there are primarily three types of information. Multi-Source Document Processing.

Read the complete text