Hello everyone,
I'm fallowing this implementation to get subquery QA and metadata node.text citations used for each subquery.
# iterate through sub_question items captured in SUB_QUESTION event
from llama_index.core.callbacks import CBEventType, EventPayload
for i, (start_event, end_event) in enumerate(
llama_debug.get_event_pairs(CBEventType.SUB_QUESTION)
):
qa_pair = end_event.payload[EventPayload.SUB_QUESTION]
print("Sub Question " + str(i) + ": " + qa_pair.sub_q.sub_question.strip())
print("Answer: " + qa_pair.answer.strip())
print("====================================")
How I can access for each subquestion source_nodes to extract node.metadata, node.text, score used ?
Thank you