Find answers from the community

Updated 3 months ago

Can i call property graph index extractors directly on a document

Hi, for PropertyGraphIndex's many extractors (WLOG DynamicLLMPathExtractor), can I call them directly on a Document since they are just transforms? I see that that's whats happening under the hood when I insert them but when I call them directly, I'm just getting a node back with the document text and no additional nodes and relations.
O
L
k
11 comments
Hmm. I did that and it gave empty list for both nodes and relations in the meta data. The same document will insert properly.
Did you chunk the document into nodes first though?
Yup. Ran it through a SentenceSplitter.
I tried to follow the code of from_documents and run_transformations. I’m trying different extractors too and other documents.
Here is a picture of what I'm running
Attachment
image.png
Seems like it ran properly (I see the metadata injected), but it just didn't extract anything -- which is totally possible
Thank you for the clarifications! Very helpful <3! I think I'm just surprised to see that the DynamicLLMPath didn't pick up anything for so many documents that I've been trying.
what LLM are you using? That can play a large role
Haiku right now. I'll try switching to Sonnet to test it. The DynamicLLMPath was also given starting entity types so maybe that is why? Haiku is also worse than Sonnet.
Yea tbh I might expect Haiku to struggle a bit 🤔
might take some tweaking
Add a reply
Sign up and join the conversation on Discord