PDF chat is a complete workflow

  • A PDF holds selectable text, scans or both; scans need OCR.
  • Tables, footnotes and page references have to survive extraction: test a sample file.
  • A big context window is not document search.
  • Image questions need a multimodal model such as Gemma 3 12B; that is no proof of flawless table recognition.

RAG finds the matching passages

  • The app looks up relevant passages and hands them to the model with your question.
  • Embedding model, search index and preparation come on top of the chat runtime.
  • Pasting everything can work for short files, but costs context.
  • Test with questions where you know the answer: does the search find it, is it quoted correctly, does the page reference lead to the source?

32k context is a planning value

  • The preconfigured start is Qwen3 14B with 32k context, within the model limit, not a promise for every computer.
  • Weights, KV cache, runtime, index and embedding model share the memory: measure with your longest request (RAM calculation).
  • Also ask questions your documents do not answer; a usable app shows the missing source instead of inventing one.

Keep the whole data path private

  • Import, OCR, embeddings, search, model and interface can use different services.
  • For each stage check where files, excerpts, vectors and logs are stored.
  • With several users the search must respect access rights. Team guide · Set up Ollama

Model options

One user, 8K context. Recorded variants, not a quality ranking.

Memory of the model options for this starting point at 8K context. WeightsContext + reserve
  1. Qwen3 8BQ4_K_M · qwen3:8b
    8.2 GB
    40k8.2 GB
  2. Qwen3 14BQ4_K_M · qwen3:14b
    12.3 GB
    40k12.3 GB
  3. Gemma 3 12BQ4_K_M · gemma3:12b
    11.2 GB
    128k11.2 GB

A model limit is no hardware guarantee. How we calculate

Sources for your next check

Official documentation, checked on October 15, 2026.