DB-GPT is an experimental open-source project that uses localized GPT large models to interact with your data and environment. With this solution, you can be assured that there is no risk of data leakage, and your data is 100% private and secure.
Run on an RTX 4090 GPU.
Currently, we have released multiple key features, which are listed below to demonstrate our current capabilities:
-
SQL language capabilities
- SQL generation
- SQL diagnosis
-
Private domain Q&A and data processing
- Knowledge Management(We currently support many document formats: txt, pdf, md, html, doc, ppt, and url.)
-
ChatDB
-
ChatExcel
-
ChatDashboard
-
Multi-Agents&Plugins
-
Unified vector storage/indexing of knowledge base
- Support for unstructured data
- TXT
- Markdown
- CSV
- DOC
- PPT
- WebURL
- Support for unstructured data
-
Multi LLMs Support, Supports multiple large language models, currently supporting
- meta-llama/Llama-2-7b-chat-hf
- baichuan2-7b/baichuan2-13b
- internlm/internlm-chat-7b
- Qwen/Qwen-7B-Chat/Qwen-14B-Chat
- Vicuna
- BlinkDL/RWKV-4-Raven
- camel-ai/CAMEL-13B-Combined-Data
- databricks/dolly-v2-12b
- FreedomIntelligence/phoenix-inst-chat-7b
- h2oai/h2ogpt-gm-oasst1-en-2048-open-llama-7b
- lcw99/polyglot-ko-12.8b-chang-instruct-chat
- lmsys/fastchat-t5-3b-v1.0
- mosaicml/mpt-7b-chat
- Neutralzz/BiLLa-7B-SFT
- nomic-ai/gpt4all-13b-snoozy
- NousResearch/Nous-Hermes-13b
- openaccess-ai-collective/manticore-13b-chat-pyg
- OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5
- project-baize/baize-v2-7b
- Salesforce/codet5p-6b
- StabilityAI/stablelm-tuned-alpha-7b
- THUDM/chatglm-6b
- THUDM/chatglm2-6b
- tiiuae/falcon-40b
- timdettmers/guanaco-33b-merged
- togethercomputer/RedPajama-INCITE-7B-Chat
- WizardLM/WizardLM-13B-V1.0
- WizardLM/WizardCoder-15B-V1.0
- baichuan-inc/baichuan-7B
- HuggingFaceH4/starchat-beta
- FlagAlpha/Llama2-Chinese-13b-Chat
- BAAI/AquilaChat-7B
- all models of OpenOrca
- Spicyboros + airoboros 2.2
- VMware's OpenLLaMa OpenInstruct
-
Support API Proxy LLMs
-
Support Datasources
DataSource | support | Notes |
---|---|---|
MySQL | Yes | |
PostgresSQL | Yes | |
Spark | Yes | |
DuckDB | Yes | |
Sqlite | Yes | |
MSSQL | Yes | |
ClickHouse | Yes | |
Oracle | No | TODO |
Redis | No | TODO |
MongoDB | No | TODO |
HBase | No | TODO |
Doris | No | TODO |
DB2 | No | TODO |
Couchbase | No | TODO |
Elasticsearch | No | TODO |
OceanBase | No | TODO |
TiDB | No | TODO |
StarRocks | No | TODO |
Is the architecture of the entire DB-GPT shown in the following figure:
The core capabilities mainly consist of the following parts:
- Multi-Models: Support multi-LLMs, such as LLaMA/LLaMA2、CodeLLaMA、ChatGLM, QWen、Vicuna and proxy model ChatGPT、Baichuan、tongyi、wenxin etc
- Knowledge Based QA: You can perform high-quality intelligent Q&A based on local documents such as pdf, word, excel and other data.
- Embedding: Unified data vector storage and indexing, Embed data as vectors and store them in vector databases, providing content similarity search.
- Multi-Datasources: Used to connect different modules and data sources to achieve data flow and interaction.
- Multi-Agents: Provides Agent and plugin mechanisms, allowing users to customize and enhance the system's behavior.
- Privacy & Secure: You can be assured that there is no risk of data leakage, and your data is 100% private and secure.
- Text2SQL: We enhance the Text-to-SQL performance by applying Supervised Fine-Tuning (SFT) on large language models
- DB-GPT-Hub Text-to-SQL performance by applying Supervised Fine-Tuning (SFT) on large language models.
- DB-GPT-Plugins DB-GPT Plugins, Can run autogpt plugin directly
- DB-GPT-Web ChatUI for DB-GPT
In the .env configuration file, modify the LANGUAGE parameter to switch to different languages. The default is English (Chinese: zh, English: en, other languages to be added later).
- Please run
black .
before submitting the code. contributing guidelines, how to contribution
-
Multi Documents
- Excel, csv
- Word
- Text
- MarkDown
- Code
- Images
-
RAG
-
Graph Database
- Neo4j Graph
- Nebula Graph
-
Multi Vector Database
- Chroma
- Milvus
- Weaviate
- PGVector
- Elasticsearch
- ClickHouse
- Faiss
-
Testing and Evaluation Capability Building
- Knowledge QA datasets
- Question collection [easy, medium, hard]:
- Scoring mechanism
- Testing and evaluation using Excel + DB datasets
- Multi Datasource Support
- MySQL
- PostgresSQL
- Spark
- DuckDB
- Sqlite
- MSSQL
- ClickHouse
- Oracle
- Redis
- MongoDB
- HBase
- Doris
- DB2
- Couchbase
- Elasticsearch
- OceanBase
- TiDB
- StarRocks
- Cluster Deployment
- Fastchat Support
- vLLM Support
- Cloud-native environment and support for Ray environment
- Service Registry(eg:nacos)
- Compatibility with OpenAI's interfaces
- Expansion and optimization of embedding models
- multi-agents framework
- custom plugin development
- plugin market
- Integration with CoT
- Enrich plugin sample library
- Support for AutoGPT protocol
- Integration of multi-agents and visualization capabilities, defining LLM+Vis new standards
- debugging
- Observability
- cost & budgets
-
support llms
- LLaMA
- LLaMA-2
- BLOOM
- BLOOMZ
- Falcon
- Baichuan
- Baichuan2
- InternLM
- Qwen
- XVERSE
- ChatGLM2
-
SFT Accuracy
As of October 10, 2023, by fine-tuning an open-source model of 13 billion parameters using this project, the execution accuracy on the Spider evaluation dataset has surpassed that of GPT-4!
name | Execution Accuracy | reference |
---|---|---|
GPT-4 | 0.762 | numbersstation-eval-res |
ChatGPT | 0.728 | numbersstation-eval-res |
CodeLlama-13b-Instruct-hf_lora | 0.789 | sft train by our this project,only used spider train dataset ,the same eval way in this project with lora SFT |
CodeLlama-13b-Instruct-hf_qlora | 0.774 | sft train by our this project,only used spider train dataset ,the same eval way in this project with qlora and nf4,bit4 SFT |
wizardcoder | 0.610 | text-to-sql-wizardcoder |
CodeLlama-13b-Instruct-hf | 0.556 | eval in this project default param |
llama2_13b_hf_lora_best | 0.744 | sft train by our this project,only used spider train dataset ,the same eval way in this project |
More Information about Text2SQL finetune
The MIT License (MIT)
We are working on building a community, if you have any ideas about building the community, feel free to contact us.