run-llama / llama_index

LlamaIndex is a data framework for your LLM applications
https://docs.llamaindex.ai
MIT License
35.87k stars 5.09k forks source link

[Question]: What is the difference between KnowledgeGraphRAGRetriever and KGTableRetriever? #14270

Closed EXJUSTICE closed 3 months ago

EXJUSTICE commented 3 months ago

Question Validation

Question

I can see from documentation that the KnowledgeGraphIndex class utilizes the KGTableRetriever during retrieval as a query engine, but there also exists the KnowledgeGraphRAGRetriever class in the same file. Do they share overlapping responsibilities, how do they differ?

dosubot[bot] commented 3 months ago

The primary difference between KnowledgeGraphRAGRetriever and KGTableRetriever lies in their specific functionalities and configurations for retrieving information from a knowledge graph.

KGTableRetriever

KnowledgeGraphRAGRetriever

In summary, while both retrievers are designed to work with knowledge graphs, KGTableRetriever focuses on keyword and embedding-based retrieval, whereas KnowledgeGraphRAGRetriever is tailored for SubGraph RAG with additional functionalities like entity extraction and synonym expansion. Additionally, KnowledgeGraphRAGRetriever is specifically used in the context of Neo4j query engines, as indicated by its integration in the Neo4jQueryEnginePack for performing complex graph-based queries [1][2].

To continue talking to Dosu, mention @dosu.