Find answers from the community

s
F
Y
a
P
Updated last year

For those pdf doc being embeddinged is

For those pdf /doc being embeddinged, is there any way to show the source of page numbers , apart from file name ? I saw one demo using langchain, can llamaindex support that feature ?
L
a
3 comments
If you set the metadata to include extra information, then that metadata will show up in the response source nodes

For example, if I have Doucment(text=text, metadata={"page_number": 2}) -- that information will be inherited to any nodes created from that document
Is it an auto process to get correct page number included in the meta data or it is manual page by page setup ? Any sample code can be shared ? Thx
It depends on the document loader. Off the top of my head, I know the pdf loader adds page numbers to the Metadata for you automatically.

Other document types, you'll have to manage it yourself I think
Add a reply
Sign up and join the conversation on Discord