-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Oracle database as all type of storage (KV/vector/graph) #257
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add oracle 23ai database as the KV/vector/graph storage
Thanks for your excellent contribution, but there are some linting errors. Please make sure to run |
pre commit have fixed. |
Thanks. I have merged it. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR introduces Oracle Database support to the LightRAG project, covering key-value (KV), vector, and graph storage.
The integration leverages Oracle's powerful multi-model query capabilities, allowing users to work seamlessly with relational, JSON, and graph data types. In particular, Oracle 23c's vector support and enhanced JSON and graph querying bring significant flexibility and performance improvements to LightRAG, making it easier to integrate in enterprise environments that rely on Oracle infrastructure.
Contributor
@jin38324 @tmuife
Key Features
Unified Knowledge Base Management: All documents are stored in a single table, with the
WORKSPACE
field distinguishing between different knowledge bases. This eliminates the need to create separate tables for each knowledge base, simplifying data management.Key-Value Storage Integration: LightRAG now supports Oracle Database as its key-value storage backend. Oracle has efficient JSON data handling, but here we use relational tables to store KV data, with documents in the
LIGHTRAG_DOC_FULL
table and chunks in theLIGHTRAG_DOC_CHUNKS
table, simplifying the structure and facilitating quick access.Vector Storage Integration: Leveraging Oracle 23ai’s vector capabilities, LightRAG enables high-performance vectorized text retrieval, supporting similarity searches for more precise, context-aware answers. Vectors are stored directly in table columns, without requiring separate databases or tables, enhancing ease of use and efficiency.
Graph Storage Integration: Oracle's advanced graph storage enables LightRAG to manage complex entity relationships, supporting richer, more contextually relevant responses through its two-tier retrieval framework. Entity nodes and edges are stored in
LIGHTRAG_GRAPH_NODES
andLIGHTRAG_GRAPH_EDGES
tables, and graph data can be queried directly with SQL through a GRAPH view.Importance of This Change
Integrating Oracle Database aligns with LightRAG's objective of expanding RAG systems to handle complex data structures and interdependencies. Oracle's robust data management features ensure that LightRAG maintains high performance, flexibility, and security, even at scale.
Additional Information
Backward Compatibility: This enhancement is fully compatible with existing storage setups, allowing Oracle to be added as an optional backend without impacting current configurations.
Testing: Extensive tests have been implemented to validate Oracle’s performance and functionality as a KV, vector, and graph storage backend across diverse retrieval scenarios.
Example: Sample code demonstrating the use of Oracle Database as a storage solution is provided in the examples.