I have a python tooling to do indexing and relevance offline using ollama.
https://github.com/raghavan/pdfgptindexer-offline