Find answers from the community

Updated 10 months ago

Hi everyone. I was wondering how I might

Hi everyone. I was wondering how I might go about querying a PDF and then having the page number that llamaindex found the information on be displayed as well. I have the initial query part done by following the original llamaindex example. I am quite stumped on how to get a page number. I do not want to use the output to again search the pdf using python. Please let me know where I should be looking and how to approach this. Thank you.
L
2 comments
Check the response object

response.source_nodes[0].metadata
The default PDF reader splits into pages, and puts the page number in metadata
Add a reply
Sign up and join the conversation on Discord