Chat with a PDF offline in LM Studio
Test whether a local model can find a fact in your PDF, not just whether it can produce a plausible answer. Start with a two-page practice file that contains no private information. You need internet for the initial downloads, not for the offline test.
Check that the PDF has readable text · Attach the file and prepare for offline use · Try a two-page document with an answer key · When a quote is missing or wrong
Check that the PDF has readable text
Open the PDF in a viewer and copy a sentence from the page you actually want to use. Paste it into a plain-text editor. If you cannot select it, it may be a scan; if the pasted result is scrambled, the text layer may not be usable. Run local optical character recognition (OCR) for the relevant language on a copy of the file, or transcribe the needed lines into a TXT file. Check each important page of a mixed PDF separately: a searchable cover does not make the scanned pages searchable. Keep the original and verify identifiers, numbers, table rows and other details against the page.
Attach the file and prepare for offline use
While online, install LM Studio, download a local chat model and let it install any runtime it requests. In Chat, select the downloaded model and drag a harmless PDF into the message area. If you plan to use long files, try a harmless long document while online as well: the built-in retrieval path can need a separate local embedding model. A short document can fit in the model’s working space (context) as a whole; for a long one, LM Studio can use retrieval, also called RAG, to pass only selected excerpts to the model. Once everything you need is installed, disconnect Wi‑Fi and any wired network, keep web tools, remote models and third-party connectors out of the test, then start a fresh Chat.
Try a two-page document with an answer key
In a local document editor, paste the two practice pages below with a page break between them. Export a text PDF named fern-drill.pdf and check that the text on both pages copies correctly. In LM Studio, attach the PDF and run Check 1 below. Start a new chat and attach the same PDF before Check 2 so that the first answer cannot provide the second answer’s evidence. Compare each result to the answer key and to the document itself. These are expected answers, not measured results. If the model gets a value right but invents the quote or a price, count it as a failure.
Practice PDF: Night Fern demonstration
Page 1 · Schedule
Night Fern is a fictional greenhouse demonstration. The rehearsal begins at 14:20 in Room Larch. The demonstration’s short tracking label is NF-731.
Page 2 · Collection
The team leaves 17 blue clips in Tray Birch. After the rehearsal, the clips go back into the tray. No purchase or entry ticket is involved in this exercise.
Check 1 · Find two facts
Prompt: Use only the attached PDF. What time does the rehearsal begin, and how many blue clips are in Tray Birch? Quote a short phrase for each answer. If you cannot find either fact, write “Not found in the document” for that fact.
Expected result: 14:20 (“begins at 14:20 in Room Larch”) and 17 (“17 blue clips in Tray Birch”).
Check 2 · Don’t invent a fact
Prompt: Use only the attached PDF. Give the tracking label and the price of an entry ticket. Quote the label from the file. If the price is not stated, write “Not found in the document”; do not give a number.
Expected result: NF-731, quoted from page 1; the price is not stated. “0” is not the answer: there is no price in the file.
When a quote is missing or wrong
For a long PDF, include a distinctive heading or code from the relevant section in your question, or attach just the two pages you need as a new PDF or TXT file. A missing search result does not prove that the information is absent. If a short file is being cut off and you have spare memory, the documented route is My Models → gear next to the model → Context Length; load the model again for the change to take effect. More context can use more memory, so try a smaller excerpt first. Page numbers in replies can be invented: verify a verbatim quote in the PDF viewer and use the actual page number there.
Sources
- Attaching documents and retrieving excerptsPublisher · lmstudio.ai↗
- What LM Studio can do offlinePublisher · lmstudio.ai↗
- Where to change model load settingsPublisher · lmstudio.ai↗
- LM Studio’s built-in retrieval implementationPublisher · lmstudio.ai↗
- Local OCR and language settingsPublisher · ocrmypdf.readthedocs.io↗