Find answers from the community

Updated 5 months ago

Hi all,

At a glance
Hi all,
I am building a knowledge graph manually following the instructions here:
https://docs.llamaindex.ai/en/stable/examples/index_structs/knowledge_graph/KnowledgeGraphDemo.html
As you can see in the output, it states the following:
"ERROR:llama_index.indices.knowledge_graph.retrievers:Index was not constructed with embeddings, skipping embedding usage..."

Why is the index constructed without embeddings? If there are no embeddings, how does the query engine retrieve relevant nodes?
L
n
5 comments
It retrieves based on keywords -- i.e. keywords from the user query are used to match to triplets that have the same keywords.
Expect to see some refactors to this soon though -- too much tech debt in our KG stuff right now
Thank you Logan. To make sure I understand correctly, when building a KG index from documents using KnowledgeGraphIndex.from_documents, an embedding is generated for each triplet, and the query can match to triplets using embeddings, but when building a KG index manually then there is no way to generate embeddings for the triplets, only keyword matching? Thx.
How are you building manually? I can check the codepath, but pretty sure there's just a kwarg to enable embeddings
I am using the instructions in the bottom section of the link I sent. It is in the "[Optional] Try building the graph and manually add triplets" section. Even in the output in the link it shows that embeddngs are not being used. I also tried using include_embeddings=True as an arg for KnowledgeGraphIndex, but that didn't work either. Thx.
Add a reply
Sign up and join the conversation on Discord