Find answers from the community

J
Janis
Offline, last seen 3 months ago
Joined September 25, 2024
J
Janis
·

Doc ID

I had the same problem when uploading Nodes to Pinecone. As far I understand, converting Document to Node can result in an 1:n relationship due to text chunking. In my situation the problem is that llama_index.node_parser.node_utils.get_nodes_from_document will not use Document.doc_id but auto-generate Node.doc_id. Right now I resolved the problem by overwriting this function and defining a custom Node-parser enforcing to set Node.doc_id equal to Document.doc_id. This works because my Document is already split and I keep a 1:1 relationship between Document and Node.
10 comments
L
J