Ollama, LM Studio and AnythingLLM can all take a file into the chat, but each reads only some formats, and a scan or a long document can reach the model empty or cut short. Convert the documents to Markdown first, check the text, then give the model the Markdown file.
This guide is for people who run a model on their own Windows PC and want it to answer questions about their contracts, manuals, notes or books.
What each app reads
This is what each app's documentation or source code shows as of October 2026.
| App | Files it reads | Scanned PDFs |
|---|---|---|
| Ollama | Text files, including .md, and PDFs, up to 10 MB each | Not mentioned |
| LM Studio | .docx, .pdf and .txt | Not mentioned |
| AnythingLLM | .md, .txt, .pdf, .docx, .pptx, .xlsx, .epub, .csv, .html and more | Built-in OCR |
Ollama's app for Windows takes files by drag and drop; its announcement mentions text files and PDFs. In the app's source code for version 0.40.8, text is extracted only from PDFs, and files over 10 MB are refused. Convert Word, PowerPoint and Excel files before you add them.
LM Studio's documentation lists .docx, .pdf and .txt attachments. AnythingLLM's list of accepted files is the longest of the three, and version 1.7.4 added OCR for scanned PDFs.
None of the three takes FB2, MOBI or EML files. Convert those to Markdown first.
Why a scanned PDF reaches the model empty
A scanned page is a picture of text. An app that reads only the text inside a PDF finds nothing on it. In Ollama's app, the model then gets a short note that no text content was found, instead of the pages. Any answer it gives then does not come from the document.
To see whether a PDF has text, open it and try to select a line. If you can't, it is a scan. Run it through OCR before the model sees it, and compare names, numbers and dates with the original. Our guide to scanned PDFs shows what to check.
Make the document fit the model's context
The context is how much text the model holds at once: your question, the chat so far, and the document. It is measured in tokens; one token is often about three quarters of a word.
Ollama sets the context from your graphics card's memory: 4k tokens on a card with less than 24 GB, about 3,000 words. A 20-page report does not fit. Raise the context length with the slider in Ollama's settings; a larger context needs more memory.
The other two apps decide for you when a document is too long:
- LM Studio adds a short document in full. A long one goes through retrieval: the app picks the passages that look relevant to your question, and the model sees only those.
- AnythingLLM adds the full text by default and asks what to do when it does not fit. Embed splits the document into pieces and retrieves the relevant ones. Continue Anyway trims the text to fit, and AnythingLLM's documentation advises against it.
Retrieval works when your question uses the document's own words. Questions about the whole document, such as "list every deadline", get a partial answer.
Markdown helps here because you can see the text and its length. If a book does not fit, give the model the chapter you are asking about. A Markdown file is easy to cut by its headings; a PDF is not.
Convert and check the documents
- In MD Factory, add the files or the whole folder. Each Markdown file is saved next to its original, with images in a folder beside it. Scanned PDFs go through OCR on your PC.
- Click Needs review next to a file to see what to check, such as pages where OCR could not read part of the text.
- Open a few results. Look at headings, tables and figures, and compare important numbers with the original.
Fix mistakes in the Markdown file. The model treats whatever is there as true.
Add the Markdown files to each app
Ollama. Drag the .md file into the chat and ask your question.
LM Studio. Attach the file to the chat. If the file dialog does not let you choose an .md file, make a copy with the .txt extension: the content is plain text either way. Mention terms from the document in your question; LM Studio's documentation says this helps retrieval find the right passages.
AnythingLLM. For one document, drag it into the chat. For a collection you return to, upload the files to a workspace and embed them; every thread in that workspace can then use them. If one document matters more than the rest and fits in the context, pin it, and the model gets its full text in every answer.
Keep the documents on your PC
A local model keeps the text on your computer only while every part of the chain is local. Check two settings:
- Ollama offers cloud models next to local ones. A cloud model runs in Ollama's cloud, so the document you attach goes there with your question. Pick a model you have downloaded, or turn Ollama's cloud features off.
- AnythingLLM has web search on by default. When the model searches the web, its search queries leave your PC. For confidential documents, turn web search off under Settings > Agent Skills.
MD Factory converts documents on your PC, without uploading them. Our guide to converting without uploading covers where to keep the files.