Chat with your PDFs privately
Ask questions about your own PDFs and get answers that cite the page, without uploading the files anywhere.
Written by Jakub Rusinowski · Updated
You install free desktop software (AnythingLLM with Ollama, or LM Studio on its own), download one small model, and drag your PDFs in. The app splits each file into passages, finds the ones that match your question and hands them to the model, which answers with a citation you can click. A computer with 16 GB of memory and no graphics card can do it; a graphics card or a Mac makes it faster.
Will this work on my computer?
| Your computer | What the Model Finder sets up | Expect |
|---|---|---|
| PC with 16 GB of RAM and no graphics card | Qwen 3.5 4B | Usable |
| PC with an 8 GB graphics card | Qwen 3.5 4B | Smooth |
| PC with a 24 GB graphics card | Gemma 4 26B-A4B | Smooth |
| M1 Mac with 16 GB of memory | Qwen 3.5 9B | Usable |
A long document uses more memory than a short chat. If answers start missing things from long files, see Answers ignore half the document under Troubleshooting.
What you'll build
- Your PDFs
- Text extraction
- Split into passages
- Embeddings (small local model)
- Find the passages closest to your question
- Chat model (local) writes the answer with a citation
Two things happen on your computer: an embedding model turns every passage into numbers so the app can find the right ones fast, and the chat model reads only those passages and writes the answer. That is why it can answer questions about a long manual without reading all of it at once, and also why it is weaker at "summarise this whole document" (see Troubleshooting).
Before you start
- Windows, macOS or Linux.
- Your PDFs on the same computer. If they are scans (photos of pages), you need text recognition (OCR); see Troubleshooting.
- No account is needed for AnythingLLM Desktop or LM Studio. Open WebUI asks you to create a local admin account the first time; it stays on your machine.
Recommended stack
Pick: AnythingLLM Desktop with Ollama. AnythingLLM ships with its own embedding model and vector database, so there is nothing to wire together; Ollama runs the chat model.
If you want a browser interface: Ollama + Open WebUI. More settings, more control over how documents are split and searched, and folders that stay in sync.
Simplest of all for one file: LM Studio. Attach a PDF to a chat. If the document fits in the model's context, LM Studio gives the model the whole thing; if it is too long, it switches to searching for the relevant passages.
The chat model is the one the table above names for your computer.
Setup steps
Path A: AnythingLLM Desktop with Ollama (easiest)
- Download AnythingLLM Desktop for your system from anythingllm.com and install it.
- Install Ollama from ollama.com/download and pull the model the table names for your computer:
ollama pull qwen3.5:4b # for No GPU, 8 GB GPU
ollama pull gemma4:26b-a4b # for 24 GB GPU
ollama pull qwen3.5:9b # for Mac- On AnythingLLM's first launch, choose Ollama as the model provider and select that model.
- Create a workspace (one per topic or project).
- Drag your PDFs into the chat, or click + in the prompt box.
- If AnythingLLM offers Embed, accept it: embedded documents are available to every thread in the workspace, attached ones only to the current chat. Labels can differ slightly between versions.
- Ask a question and click the citation under the answer to see which passage it used.
Path B: Ollama + Open WebUI
- Install Ollama and pull the model, as in Path A.
- Install Open WebUI. With Docker, and Ollama on the same computer:
docker run -d -p 3000:8080 --add-host=host.docker.internal:host-gateway \
-v open-webui:/app/backend/data \
-e WEBUI_SECRET_KEY=your-secret-key \
--name open-webui --restart always ghcr.io/open-webui/open-webui:main- Replace
your-secret-keywith the output ofopenssl rand -hex 32. Without Docker:pip install open-webui, thenopen-webui serve. - Open http://localhost:3000 (Docker) or http://localhost:8080 (pip) and create the admin account.
- Go to Workspace > Knowledge > Create, name it, upload your PDFs and wait for processing to finish.
- In a chat, type
#and pick the knowledge base. - For a folder you keep adding to, Add Content > Sync directory mirrors it incrementally.
Our full install walkthrough: Open WebUI + Ollama setup.
Path C: LM Studio (one document)
- Install LM Studio from lmstudio.ai and download the model the table names.
- Attach the PDF to the chat. LM Studio accepts
.pdf,.docxand.txt. - Ask your question using words you expect to appear in the document; that is LM Studio's own tip for better retrieval.
Test it
Pick a PDF you know well and ask something with one exact answer on one page:
"In the lease, what is the notice period for ending the contract, and which clause says so?"
A good answer quotes or closely paraphrases the clause, names it, and its citation opens the right passage. A bad answer is fluent but has no citation, or cites a passage that does not say it.
Verify it worked
- The answer cites a passage, and that passage really contains the answer.
- Ask about something that is not in the document. A good setup says it cannot find it; a weak one invents an answer.
- Turn off Wi-Fi and ask again. It still answers.
Did you get this working?
Thanks. Your answer helps us see which recipes need work.
Troubleshooting
- It cannot find text in a scanned PDF. Scans are pictures of text. In Open WebUI, switch the content extraction engine (Tika or Docling) and turn on PDF Extract Images (OCR) in Settings > Admin > Documents. Check the PDF opens normally in a PDF viewer first.
- "Summarise this document" gives a thin answer. Retrieval hands the model a few passages, not the whole file. In Open WebUI, switch the attached knowledge to Full Context; in LM Studio, use a document short enough to fit. For long documents, summarise section by section.
- Answers ignore half the document. The model's context window is too small, so the app trims what it sends. In Open WebUI, raise the context length under Settings > Admin > Models, Advanced Params. What a longer context costs in memory: context length and out-of-memory errors.
- Tables come out scrambled. Text extraction reads tables as loose lines. Try another extraction engine, or paste the table into the chat as text.
- Your documents are not in English. The default embedders in AnythingLLM and Open WebUI (all-MiniLM-L6-v2) are trained mainly on English. In Open WebUI, switch the embedding engine to Ollama and a multilingual embedder such as
bge-m3(ollama pull bge-m3), then re-index every document in Settings > Admin > Documents: embeddings from different models do not mix. - Open WebUI cannot see Ollama. Connection refused fixes.
What stays on your computer
| Component | Runs where | Note |
|---|---|---|
| Chat model (Ollama, LM Studio) | On your computer | Unless you pick an Ollama cloud model (a :cloud tag) or connect a cloud provider's API key |
| Embedding model | On your computer, after a one-time download | AnythingLLM downloads its built-in embedder on the first embed; Open WebUI's default embedder is local too |
| Text extraction and OCR | On your computer, or online if you choose a cloud option | Open WebUI can also use cloud extractors such as Azure or Mistral OCR; choose a local one for private files |
| Your PDFs and the search index | On your computer | Stored by the app on your disk |
| App and model downloads | On your computer, after a one-time download | Needs the internet once; after that it works offline |
Ollama cloud models run on Ollama's servers, not on your computer. To make sure nothing is sent, set OLLAMA_NO_CLOUD=1 (or "disable_ollama_cloud": true in ~/.ollama/server.json) and restart Ollama.
Go deeper
- Intro to RAG: how "chat with your docs" works, in plain words.
- Complete Local RAG Pipeline: build the same thing yourself.
- Open WebUI + Ollama setup
- Model Finder · Hardware checker
Sources
The steps on this page were checked against these official pages on the date shown.
- docs.anythingllm.com/setup/embedder-configuration/local/built-in (2026-10-15)
- docs.anythingllm.com/chatting-with-documents/introduction (2026-10-15)
- docs.openwebui.com/features/workspace/knowledge/ (2026-10-15)
- docs.openwebui.com/getting-started/quick-start/ (2026-10-15)
- github.com/open-webui/open-webui/blob/main/backend/open_webui/config.py (2026-10-15)
- docs.openwebui.com/troubleshooting/rag/ (2026-10-15)
- lmstudio.ai/docs/app/basics/rag (2026-10-15)
- ollama.com/library/bge-m3 (2026-10-15)
- huggingface.co/BAAI/bge-m3 (2026-10-15)
- docs.ollama.com/cloud (2026-10-15)
- docs.ollama.com/faq (2026-10-15)