Log in
Log into community
Find answers from the community
View all posts
Related posts
Was this helpful?
π
π
π
Powered by
Hall
Inactive
Updated last year
0
Follow
I am building a query engine with
I am building a query engine with
Inactive
0
Follow
At a glance
B
Bhavya Giri
last year
Β·
I am building a query engine with LlamaIndex, based on a large database of PDFs, and I would like to be able to retrieve the page number with the sources @Logan M
r
B
L
4 comments
Share
Open in Discord
r
richard1861
last year
Hello, you can use the metadata. You should define the metadata when you build the nodes. Later you can just put after you get the response:
Show cited passages that were used to construct the response.
for node in streaming_response.source_nodes:
print(f"Metadata: {node.metadata}")
B
Bhavya Giri
last year
yes, I am asking with reader should i use to get page number which i can add to metadata
L
Logan M
last year
I think the pdf reader automatically splits by page and puts the page number in the metadata
Otherwise, you might have to write your own little loader to set the Metadata how you want
B
Bhavya Giri
last year
okay okay thanks, yeah found that
Add a reply
Sign up and join the conversation on Discord
Join on Discord