Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Adds a new contender to the ring: KùzuDB! This PR introduces
KuzuGraphStorage
, a new graph storage backend option, leveraging the high-performance, embeddable Kùzu graph database.Integrating Kùzu could act as a middle ground between the simplicity of the in-memory
NetworkXStorage
and the robustness (but higher operational overhead) of server-based solutions likeNeo4JStorage
orPGGraphStorage
.It provides:
:memory:
). This reduces setup complexity and infrastructure management compared to client-server databases.This addition enables more complex knowledge graph structures and sophisticated graph-based retrieval strategies without significant operational hurdles.
Related Issues
None
Changes Made
kuzu_impl.py
containing theKuzuGraphStorage
class implementation, adhering to theBaseGraphStorage
interface.KuzuClientManager
for managing singleton database and connection instances.kuzu>=0.9.0
) check and installation prompt viapipmaster
.config.ini.example
) for optional kùzu option.Checklist
KuzuGraphStorage
(see picture attached)Additional Notes
Kùzu Strengths for Advanced LightRAG:
As discussed, KùzuDB's strengths align well with potential future enhancements for graph-based retrieval in LightRAG:
get_torch_geometric_remote_backend()
. This facilitates using graph embeddings generated by GNNs directly within Kùzu, potentially enabling more semantically rich graph traversals for retrieval (e.g., inmix
mode).