Graph RAG π
Graph RAG uses knowledge graphs together with large language models (LLMs) to improve how information is retrieved and generated. It overcomes the limits of traditional search methods by using knowledge graphs, which organize data as connected entities and relationships.
One of the main benefits of Graph RAG is its ability to capture and represent complex relationships between entities, something that traditional text-based retrieval systems struggle with. By using this structured knowledge, LLMs can better grasp the context and details of a query, resulting in more accurate and insightful answers.
Default VectorDB
Graph RAG uses LanceDB as the default vector database for performing vector search to retrieve relevant entities.
Working with Graph RAG is quite straightforward
- Installation and API KEY as env variable
Set OPENAI_API_KEY
as GRAPHRAG_API_KEY
- Initial structure for indexing dataset
- Index Dataset
- Execute Query
Global Query Execution gives a broad overview of dataset
Local Query Execution gives a detailed and specific answers based on the context of the entities