mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-07 12:00:46 +00:00
refactor: rag storage refactor (#2434)
This commit is contained in:
45
docs/docs/installation/integrations/bm25_rag_install.md
Normal file
45
docs/docs/installation/integrations/bm25_rag_install.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# BM25 RAG
|
||||
|
||||
In this example, we will show how to use the Elasticsearch as in DB-GPT RAG Storage. Using a Elasticsearch database to implement RAG can, to some extent, alleviate the uncertainty and interpretability issues brought about by Elasticsearch database retrieval.
|
||||
|
||||
### Install Dependencies
|
||||
|
||||
First, you need to install the `dbgpt elasticsearch storage` library.
|
||||
|
||||
```bash
|
||||
uv sync --all-packages --frozen \
|
||||
--extra "base" \
|
||||
--extra "proxy_openai" \
|
||||
--extra "rag" \
|
||||
--extra "storage_elasticsearch" \
|
||||
--extra "dbgpts"
|
||||
````
|
||||
|
||||
### Prepare Elasticsearch
|
||||
|
||||
Prepare Elasticsearch database service, reference-[Elasticsearch Installation](https://www.elastic.co/guide/en/elasticsearch/reference/current/install-elasticsearch.html) .
|
||||
|
||||
### Elasticsearch Configuration
|
||||
|
||||
|
||||
Set rag storage variables below in `configs/dbgpt-bm25-rag.toml` file, let DB-GPT know how to connect to Elasticsearch.
|
||||
|
||||
```
|
||||
|
||||
[rag.storage]
|
||||
[rag.storage.full_text]
|
||||
type = "ElasticSearch"
|
||||
uri = "127.0.0.1"
|
||||
port = "9200"
|
||||
```
|
||||
|
||||
Then run the following command to start the webserver:
|
||||
```bash
|
||||
uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-bm25-rag.toml
|
||||
```
|
||||
|
||||
Optionally
|
||||
```bash
|
||||
uv run python packages/dbgpt-app/src/dbgpt_app/dbgpt_server.py --config configs/dbgpt-bm25-rag.toml
|
||||
```
|
||||
|
@@ -107,6 +107,10 @@ const sidebars = {
|
||||
type: "doc",
|
||||
id: "installation/integrations/oceanbase_rag_install"
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "installation/integrations/bm25_rag_install"
|
||||
},
|
||||
{
|
||||
type: "doc",
|
||||
id: "installation/integrations/milvus_rag_install"
|
||||
|
Reference in New Issue
Block a user