The knowledge graph index stores everything in memory and then saves tk the graph_store.json file by default. We also have an integration to store in nebula too
It's used by extracting keywords from the query text. Those keywords are used to find (subj, rel, obj) triplets where the keyword matches the subject
Then optionally, the text from where that triplet is found, or just the triplet itself, is sent to the LLM to answer the query
How is the graph queried from graph_store.json? As in what is the query language used? Is it being stored as raw triplets or is it more complicated than that
It's pretty basic actually. The LLM extracts keywords from the query. Then there is just a dictionary mapping of subj -> [list of [rel, obj]], where the keyword is used as the subj
Then the triplet is used to lookup where node it was extracted from
There are some other options that expand the search as well (I.e. using neighboring triplets, triplets that came from the same node)
Hi, there, has anyone tried the knowledgegraph demo on a local LLM (like Open LLAMA 13B)? Does it work? Or Open AI is needed. Also the results with Open AI are not deterministic, the one in the demo notebook and what I get are different.
It would be great if we can get heterogeneous sources together, like data from SQL Lite plus documents to create a knowledge graph. I know there is a way to manually add tuples (triplets) however it is unclear how we can make refer the node back again (in case of foreign keys). Also it would be great if we can get to store node information (attributes) as json.