Create a DB-GPT Graph RAG pipeline that extracts triplets, stores document structure in TuGraph, retrieves graph context, and answers with traceable evidence.
What you will build
This guide walks through a DB-GPT Graph RAG application. You will run a graph database, configure DB-GPT to use it, extract a knowledge graph from a document, retrieve relevant subgraphs, and pass the retrieved context to an LLM.
Graph RAG is a good fit when users ask relationship-heavy questions: "How are these systems connected?", "Which project depends on which component?", or "What changed across this document hierarchy?"
DB-GPT Graph RAG path
- 1
Install Graph RAG extras
Add DB-GPT packages for proxy models, RAG, graph storage, and examples.
Why: The graph retriever needs optional dependencies that a basic install may not include.
- 2
Run TuGraph
Start a graph database reachable on the Bolt port.
Why: DB-GPT needs persistent graph storage for entities, triplets, and document structure.
- 3
Configure storage
Set graph store type, host, credentials, and retrieval limits.
Why: Configuration makes the graph store explicit instead of hidden in code.
- 4
Build the graph
Chunk a document, extract triplets, and persist graph nodes and edges.
Why: The graph is the retrieval substrate.
- 5
Retrieve context
Search triplets, document structure, similarity, or Text2GQL depending on the question.
Why: Different questions need different graph access paths.
- 6
Answer with evidence
Feed retrieved chunks into the model and cite source structure where possible.
Why: Users need to know why the answer is grounded.