Use Elasticsearch as DB-GPT full-text RAG storage so exact terms, identifiers, and keyword-heavy questions are retrieved alongside semantic workflows.
What you will build
This guide configures DB-GPT to use Elasticsearch as a full-text retrieval backend. In practice, that means your RAG system can search by exact keywords and BM25 ranking instead of relying only on vector similarity.
BM25 is not old-fashioned. It is the precision layer for questions that include exact product names, error messages, API fields, ticket IDs, log fragments, file paths, and domain-specific vocabulary.
DB-GPT BM25 setup
- 1
Install full-text storage
Add the Elasticsearch storage extra to DB-GPT.
Why: The retriever needs the full-text backend installed.
- 2
Run Elasticsearch
Start a reachable Elasticsearch service.
Why: BM25 scoring happens in the search engine.
- 3
Configure DB-GPT
Point full-text RAG storage at the Elasticsearch host and port.
Why: The app must route retrieval to the correct backend.
- 4
Index documents
Parse documents into searchable chunks.
Why: BM25 quality depends on chunk boundaries and analyzers.
- 5
Ask exact questions
Test names, IDs, quoted phrases, and errors.
Why: These are the cases BM25 should win.
- 6
Blend with vectors
Use BM25 beside semantic search when users ask mixed questions.
Why: Hybrid retrieval gives precision plus recall.