Find answers from the community

Updated 6 months ago

Nodes

At a glance
The community member has a question about constructing a property graph index. They note that the documentation only shows how to create the index from a set of documents, but they want to know if there is an analogous way to create the nodes first per document, similar to how it can be done with a vector store index. In the comments, another community member suggests that the community member can use the kg extractors in an ingestion pipeline, but they should set the kg_extractors in the index to an empty list to avoid running the extractors again. There is no explicitly marked answer in the post or comments.
Hi, question about construction of a property graph index. Right now, the docs mention only this:
Plain Text
index = PropertyGraphIndex.from_documents(
    documents,
    kg_extractors=[extractor1, extractor2, ...],
)

With the normal vector store index I can generate the nodes first (ie. per document)
Plain Text
nodes_A = pipeline.run(documents=[DocumentOne])
nodes_B = pipeline.run(documents=[DocumentTwo])
index = VectorStoreIndex(nodes_A + nodes_B)

Is there an analogous way to do the same thing with the property graph index? where you can do it document by document before constructing the full index?
L
1 comment
You can use the kg extractors in an ingestion pipeline

But if you do this, I think you'll want to set kg_extractors in the index to an empty list, otherwise it will run them again
Add a reply
Sign up and join the conversation on Discord