Find answers from the community

Updated 19 hours ago

how to load a knowledge graph index from file and create a retriever

Hi everyone, I created a knowledge graph index and saved it using the SimpleGraphStore and StorageContext. But I am not able to find out how to load from file and create a retriever. Not able to find anything in docs.. Would love to have any help on this! πŸ™‚
L
A
2 comments
Plain Text
index.storage_context.persist(persist_dir="./storage")


Plain Text
from llama_index.core import StorageContext
storage_context = StorageContext.from_defualts(persist_dir="./storage")
index = load_index_from_storage(storage_context)


Also FYI KnowledgeGraphIndex is deprecated, you really should be using PropertyGraphIndex
Got it! Thanks for helping @Logan M !
Add a reply
Sign up and join the conversation on Discord