response = index.query("<my_query>")
response.source_nodes
to see where the answer came from. But it will only show the similarity, start/end positions, and doc_id for (doc, fname) in zip(documents, filenames): doc.doc_id = fname index = GPTSimpleVectorIndex(documents, ...)
documents = [] document_text = [] # create a list strings, one string per page for i, page in enumerate(document_text): documents.append(Document(page)) documents[-1].doc_id = "my_doc_page_" + str(i) index = GPTSimpleVectorIndex(documents, ...)