doc:chatdata and chatdb

This commit is contained in:
aries_ckt
2023-08-29 20:35:55 +08:00
parent e70f05aea1
commit 48da39c420
24 changed files with 454 additions and 280 deletions

View File

@@ -2,7 +2,7 @@ ChatData & ChatDB
==================================
ChatData generates SQL from natural language and executes it. ChatDB involves conversing with metadata from the
Database, including metadata about databases, tables, and
fields.![db plugins demonstration](../../../../assets/chat_data/chat_data.jpg)
fields.![db plugins demonstration](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/d8bfeee9-e982-465e-a2b8-1164b673847e)
### 1.Choose Datasource
@@ -17,15 +17,15 @@ you can execute sql script to generate data.
#### 1.1 Datasource management
![db plugins demonstration](../../../../assets/chat_data/db_entry.png)
![db plugins demonstration](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/7678f07e-9eee-40a9-b980-5b3978a0ed52)
#### 1.2 Connection management
![db plugins demonstration](../../../../assets/chat_data/db_connect.png)
![db plugins demonstration](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/25b8f5a9-d322-459e-a8b2-bfe8cb42bdd6)
#### 1.3 Add Datasource
![db plugins demonstration](../../../../assets/chat_data/add_datasource.png)
![db plugins demonstration](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/19ce31a7-4061-4da8-a9cb-efca396cc085)
```{note}
now DB-GPT support Datasource Type
@@ -34,16 +34,22 @@ now DB-GPT support Datasource Type
* Sqlite
* DuckDB
* Clickhouse
* Mssql
```
### 2.ChatData
##### Preview Mode
After successfully setting up the data source, you can start conversing with the database. You can ask it to generate
SQL for you or inquire about relevant information on the database's metadata.
![db plugins demonstration](../../../../assets/chat_data/chatdata_eg.png)
![db plugins demonstration](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/8acf6a42-e511-48ff-aabf-3d9037485c1c)
##### Editor Mode
In Editor Mode, you can edit your sql and execute it.
![db plugins demonstration](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/1a896dc1-7c0e-4354-8629-30357ffd8d7f)
### 3.ChatDB
![db plugins demonstration](../../../../assets/chat_data/chatdb_eg.png)
![db plugins demonstration](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/e04bc1b1-2c58-4b33-af62-97e89098ace7)

View File

@@ -2,7 +2,7 @@ KBQA
==================================
DB-GPT supports a knowledge question-answering module, which aims to create an intelligent expert in the field of databases and provide professional knowledge-based answers to database practitioners.
![chat_knowledge](../../../../assets/chat_knowledge.png)
![chat_knowledge](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/6e55f2e5-94f7-4906-aed6-097db5c6c721)
## KBQA abilities
@@ -32,7 +32,7 @@ execute DBGPT/assets/schema/knowledge_management.sql
#### 1.Create Knowledge Space
If you are using Knowledge Space for the first time, you need to create a Knowledge Space and set your name, owner, description.
![create_space](../../../../assets/kbqa/create_space.png)
![create_space](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/a93e597b-c392-465f-89d5-b55621d068a8)
@@ -40,20 +40,20 @@ If you are using Knowledge Space for the first time, you need to create a Knowle
DB-GPT now support Multi Knowledge Source, including Text, WebUrl, and Document(PDF, Markdown, Word, PPT, HTML and CSV).
After successfully uploading a document for translation, the backend system will automatically read and split and chunk the document, and then import it into the vector database. Alternatively, you can manually synchronize the document. You can also click on details to view the specific document slicing content.
##### 2.1 Choose Knowledge Type:
![document](../../../../assets/kbqa/document.jpg)
![document](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/5b8173da-f444-4607-9d12-14bcab8179d0)
##### 2.2 Upload Document:
![upload](../../../../assets/kbqa/upload.jpg)
![upload](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/91b338fc-d3b2-476e-9396-3f6b4f16a890)
#### 3.Chat With Knowledge
![upload](../../../../assets/kbqa/begin_chat.jpg)
![upload](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/a8281be7-1454-467d-81c9-15ef108aac10)
#### 4.Adjust Space arguments
Each knowledge space supports argument customization, including the relevant arguments for vector retrieval and the arguments for knowledge question-answering prompts.
##### 4.1 Embedding
Embedding Argument
![upload](../../../../assets/kbqa/embedding.png)
![upload](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/f1221bd5-d049-4ceb-96e6-8709e76e502e)
```{tip} Embedding arguments
* topk:the top k vectors based on similarity score.
@@ -66,7 +66,7 @@ Embedding Argument
##### 4.2 Prompt
Prompt Argument
![upload](../../../../assets/kbqa/prompt.png)
![upload](https://github.com/eosphoros-ai/DB-GPT/assets/13723926/9918c9c3-ed64-4804-9e05-fa7d7d177bec)
```{tip} Prompt arguments
* scene:A contextual parameter used to define the setting or environment in which the prompt is being used.