so I made a small terminal tool that does exactly that. I point it to local files like pdf, docx, txt or jpg. it extracts the text, splits it into chunks, runs semantic search, builds a structure from my query, and then writes out a markdown report section by section.
it feels like having a lightweight research assistant for my local file system. I have been trying it on papers, long reports and even scanned files and it already works better than I expected. repo - https://github.com/Datalore-ai/deepdoc
Currently citations are not implemented yet since this version was mainly to test the concept, I will be adding them soon and expand it further if you guys find it interesting.