Suppose i have a retrieved node, how to access the metadata for the same #8632
-
suppose i retrieved top 1 for a query using: Sample node content below: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
🤖 Hello @amitguptadumka, It's good to see you again and I hope you're doing well. From your question, it seems you're trying to access the In the LlamaIndex codebase, the To access the source_node = node.node.source_node This will return a Please note that if the associated value is a list, it raises a You can find more information about this in the llama_index/schema.py file. I hope this helps! If you have any more questions, feel free to ask. Best, SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
🤖
Hello @amitguptadumka,
It's good to see you again and I hope you're doing well.
From your question, it seems you're trying to access the
relationships
property of aNodeWithScore
object, specifically thesource_node
.In the LlamaIndex codebase, the
relationships
property of theNodeWithScore
object is a dictionary that maps relationships to other node information. The keys of this dictionary are of the typeNodeRelationship
, which is an enumeration with the following possible values:SOURCE
,PREVIOUS
,NEXT
,PARENT
, andCHILD
. The values associated with these keys are of the typeRelatedNodeType
, which can either be a singleRelatedNodeInfo
object or a list ofRelatedNodeInfo
objects.To…