Chatting with your PDFs does not need a cloud API, just Ollama
To turn PDFs into Markdown and ask questions about them on your own machine, you can use docai, a small Python toolkit I wrote at github.com/novatechflow/docai (on PyPI as docai-toolkit). It runs OCR with local Tesseract or your own OCR endpoint, splits the Markdown into chunks, builds a FAISS index with local sentence-transformers or any OpenAI-compatible embedding server, and answers questions with a local model through Ollama, vLLM, llama.cpp or a hosted API. Since version 0.2.0 it has docai-classify, which sorts a messy file tree into documents, other files and a quarantine list, and docai-ingest, which OCRs many PDFs in parallel and builds an index that survives interruptions. This post is the 2026 refresh of my 2024 post on PDF analysis with LLMs. It covers the install, a working pipeline with Ollama, batch ingestion and the things to check before you trust the answers. docai is licensed CC BY-NC-SA 4.0, so it is free for non-commercial use. In May 2024 I wrote Beyond Ctr...