KnowledgeGraphIndex update from backend graph database #12948
Replies: 3 comments 2 replies
-
Hey there, @anirbanbasu! 🦙 Great to see you back and diving into the intricacies of graph databases with such enthusiasm. I remember our last inter-dimensional coding adventure! I'm on it, taking a look at your issue now and will get back to you with insights shortly. Hang tight! |
Beta Was this translation helpful? Give feedback.
-
Just a thought: perhaps, I shouldn't update the backend graph database but update the
|
Beta Was this translation helpful? Give feedback.
-
Thanks for the answer @dosu-bot. Given the non-trivial extension that is necessary, I think the functionality to update triplets (not just add or upsert) along with synchronisation of the changes with the graph storage (not just Neo4j) could be part of a feature enhancement. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I have a
KnowledgeGraphIndex
that is created from a set of documents. Its storage context has a graph database that is not in memory, e.g., Neo4j. I can see the graph relations by querying the graph database.However, if I modify some triplets in the graph database using the database's query language, e.g., Cypher for Neo4j, and then try to build the knowledge graph from the knowledge graph index (see function at: https://github.com/anirbanbasu/tldrlc/blob/551863b44822316dda671504a76d7b304743ad7d/Chatbot.py#L112), I do not see the updated triplets. I suppose that the problem (in my code) starts at https://github.com/anirbanbasu/tldrlc/blob/551863b44822316dda671504a76d7b304743ad7d/Chatbot.py#L117 because
index_struct
is not updated based on the backend graph database.Looking at https://github.com/anirbanbasu/llama_index/blob/main/llama-index-core/llama_index/core/indices/knowledge_graph/base.py, I cannot find a mechanism to update the knowledge graph index from the backend graph database.
Maybe, I am missing something?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions