Find answers from the community

Updated 3 months ago

Heyhey I m creating some custom

Heyhey, I'm creating some custom documents right now, and I'm parsing them to nodes using get_nodes_from_document from SimpleNodeParser. How can I check which nodes come from which document? In the source code it looks like all nodes generated from a document are extended into one list. Is there any way to check which nodes came from which Document originally?
L
1 comment
node.ref_doc_id will point to the doc id of the source document

metadata should also be passed to each node, so you could add the filename to the metadata of the source document, and that will show up in the nodes
Add a reply
Sign up and join the conversation on Discord