DB-GPT  by TsinghuaDatabaseGroup

LLM-based system for database diagnosis, research paper & tool APIs

Created 2 years ago
665 stars

Top 50.6% on SourcePulse

GitHubView on GitHub
Project Summary

DB-GPT is an LLM-based system designed to act as a database administrator (DBA), automating the diagnosis and resolution of database anomalies. It targets database professionals and engineers by providing an intelligent assistant capable of understanding documentation, utilizing tools, and generating analysis reports for database issues.

How It Works

DB-GPT employs a multi-stage LLM-based diagnosis mechanism, including task dispatching, concurrent diagnosis, cross-review, and report generation. It leverages a knowledge base for Q&A and diagnosis, integrating with monitoring tools like Prometheus and Alertmanager, and databases like PostgreSQL. The system supports adaptive alignment to user preferences through feedback mechanisms, refining diagnosis patterns stored in a vector database.

Quick Start & Requirements

  • Installation: Clone the repository and install dependencies using pip3 install -r requirements.txt.
  • Prerequisites: Python >= 3.10, Node >= 18.15.0, PostgreSQL v12 (with pg_stat_statements, pg_hint_plan, hypopg extensions), Git LFS for model downloads.
  • Setup: Requires downloading LLM and embedding models (e.g., m3e-base, Qwen-1_8B-Chat) and configuring paths in model_config.py. Docker deployment is available for monitoring and database components.
  • Links: QuickStart, Demo, Prometheus.

Highlighted Details

  • Supports local and online LLMs, with 4-bit quantization and vLLM for faster inference.
  • Integrates with monitoring (Prometheus), alerting (Alertmanager), and database tools (PostgreSQL extensions, Calcite for query transformations).
  • Includes anomaly simulation scripts for various database issues like missing indexes, lock contention, and I/O contention.
  • Offers knowledge extraction from .docx documents and tool APIs for index selection and query rewriting.

Maintenance & Community

The project is actively developed by Tsinghua University's Database Group and has received recognition as a Top 100 Open Project and inclusion in VLDB 2024. Community engagement is encouraged via WeChat.

Licensing & Compatibility

The repository does not explicitly state a license in the README. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

The project is undergoing significant upgrades, with some features marked as "todo" or in development (e.g., human feedback integration, support for more databases). The LLM-based diagnosis mechanism is still being refined.

Health Check
Last Commit

6 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by Han Wang Han Wang(Cofounder of Mintlify), John Resig John Resig(Author of jQuery; Chief Software Architect at Khan Academy), and
6 more.

evidently by evidentlyai

0.3%
7k
Open-source framework for ML/LLM observability
Created 4 years ago
Updated 15 hours ago
Feedback? Help us improve.