The community member who posted the original question is asking if there is a way to modify the response.get_formatted_sources() function to display the name of the source file instead of a meaningless document ID. In the comments, another community member suggests parsing the source_nodes to obtain the document ID, which can then be used to look up the file name. Another community member mentions that the document ID can be set directly before feeding it into an index. The final comment expresses curiosity about why the SimpleDirectoryReader does not save the file names. There is no explicitly marked answer in the post and comments.
Is there a way to modify response.get_formatted_sources() to produce the name of the source file rather than a meaningless doc id like Doc id: 3e176859?
you can directly parse the source_nodes which contain the objects (containing the text chunk, the doc id which you can then use to look up the file name)