I am following this tutorial :
https://www.youtube.com/watch?v=mIyZ_9gqakE&t=340sI have a list of documents : documents are article of different writer , in my document metadata i put the name of the writer of article
I used HierarchicalNodeParser
This code below gives me the retrieved node for the query ,
from llama_index.core import QueryBundle
hierarchical_nodes = hierarchical_engine.retrieve(QueryBundle("How do I setup a query engine?"))
print("\n--- Hierarchical ---\n")
print('\n---\n'.join([node.node.text for node in hierarchical_nodes]))
Now what I want is , I what to make an query engine where the query to the LLM will be like this ,
This is the questions “How do I setup a query engine?”
This is the retrieved contest “node.node.text”
Answer the query based on the context and in the end writer that this answer is from the idea of the writer
node.metadat.author(I do not know how to find the name of the author from the metadata )
This is the document format
“
markdown_docs.append(
Document(
text=current_text.strip(),
metadata={
"File Name": filename,
"Content Type": "text",
"Author Name":"Andrew Grove",
"Header Path": "/".join(header_stack),
"Links": ", ".join(links),
},
)
)
”
How can I make such query engine ?