DB-GPT
DB-GPT copied to clipboard
feat: add GraphRAG framework and integrate TuGraph
Issue: https://github.com/eosphoros-ai/DB-GPT/issues/1505
hi, @fanzhidongyzby ,Graph RAG is an amazing feature, could you give some use cases?
hi, @fanzhidongyzby ,Graph RAG is an amazing feature, could you give some use cases?
@Aries-ckt Subsequent documentation sections illustrate the use and workflow of Graph RAG with examples.
Here are tests for Graph RAG framework:
- [Triplet/Keyword Extractor Test]:
tests/intetration_tests/transformer/test_extactor.py
- [MemoryGraph Test]:
tests/unit_tests/graph/test_graph.py
- [MemoryGraphStore Test]:
tests/intetration_tests/graph_store/test_memgraph_store.py
- [TuGraphStore Test]:
tests/intetration_tests/graph_store/test_tugraph_store.py
- [Graph RAG Example]:
examples/rag/graph_rag_example.py
In this PR, we have implemented the ability to use the TuGraph database for retrieval-augmented generation (RAG). This feature is currently integrated into the Chat Knowledge module. TuGraph is supported from Version 4.3.0 and above.
When creating a knowledge base, users can choose between the following two storage types:
Knowledge Graph Vector Store Different storage types will have corresponding icons displayed in the frontend.
If the user chooses to create a knowledge base of the Knowledge Graph type and successfully creates it, they can click the "View Graph" button to view the graph of the current knowledge base.
Additionally, users can obtain relevant knowledge content through the Chat Knowledge conversation feature.
-
Create Knowledge
-
Knowledge Graph and Open Graph Visual
-
Graph Visual Page
-
Chat Knowledge By Graph
为什么我这边输入文档是中文,生成的却是英文的Graph?
@sophiesun333
The reasoning of the large model has certain uncertainties. The default prompt words of the current system are still in English. Before the release, we conducted document tests in both Chinese and English. For your situation, it is recommended to try again or contribute a pr to provide the ability to switch Chinese prompt words.
Given its unreliability, can we have a conversation on DB-GPT by loading a subgraph which has constructed on Tugraph?
@sophiesun333 This demand can be realized. When DB-GPT loads documents into TuGraph, it will detect whether the Graph name exists. If it exists, it will be automatically merged. Of course, doing this is indeed a little tricky. You still need to understand the structure of the current text graph (although it is very simple). The best way is to directly provide the ability to introduce the existing graph from the product side. If you are interested, welcome to discuss and build together.
I suggest directly provide the ability to introduce the existing graph from the product side。 I attempted to use GLM-4-9B-CHAT to import the knowledge graph generated from text, which was not correct, resulting in knowledge-based conversations not being able to answer my questions correctly. So I hope to provide the ability to build dialogues based on user generated knowledge graphs.