Saturday, 21 November 2026 Press Releases Newsletter RSS
Breaking
WhatsApp Business Account Hacked in Pakistan: Full Recovery Guide Special Technology Zones Authority (STZA) & IT Park Expansion in Pakistan: Islamabad, Karachi, and Lahore Ground Report Pakistan Software Export Board & Industry Consortium Launch 'TechBridge Pakistan 2026' to Connect 500 Startups With Global Markets Global Tech Safety Summit 2026: International Standards for Frontier AI and Data Security Announced WhatsApp Business Account Hacked in Pakistan: Full Recovery Guide Special Technology Zones Authority (STZA) & IT Park Expansion in Pakistan: Islamabad, Karachi, and Lahore Ground Report Pakistan Software Export Board & Industry Consortium Launch 'TechBridge Pakistan 2026' to Connect 500 Startups With Global Markets Global Tech Safety Summit 2026: International Standards for Frontier AI and Data Security Announced
WritePures
Intermediate 9 chapters about 23 minutes By Bakhtawar 21 Nov 2026
Key figures for building a local RAG system including embedding dimensions and vector store options

A local model knows what it was trained on and nothing else. It has never seen your contracts, your meeting notes, your product manual or your research folder. This tutorial fixes that — without uploading a single file anywhere.

The technique is called retrieval-augmented generation, and the idea is simpler than the name. When you ask a question, you first search your own documents for the few passages that look relevant, then paste those into the prompt and ask the model to answer from them. The model supplies the language; your documents supply the facts.

Done properly it also tells you which document an answer came from, which turns an unverifiable chatbot response into something you can check.

What you need before starting

  • Ollama installed with a working model — our local models tutorial covers this from scratch.
  • Python 3.10 or later, and comfort installing packages with pip.
  • A folder of documents you actually want to search. Start with 20–50 files rather than ten thousand.

What you will have at the end

A script you can point at a folder, which indexes it once and then answers questions about it with citations — entirely offline, at no cost per query, with your documents never leaving the machine.

Chapters

Start with chapter 1 →

Frequently asked questions

Retrieval-augmented generation means finding the handful of passages in your own documents that are relevant to a question, pasting them into the prompt, and asking the model to answer using only those — so the model works from your material rather than its training data.

Fine-tuning teaches a model style and behaviour, not facts you can reliably retrieve. It is expensive, needs redoing whenever documents change, and makes it hard to show where an answer came from. RAG updates instantly when you add a file, and can cite the source. For "answer questions about my documents", RAG is almost always the right tool.

No, if you follow this tutorial as written. The embedding model, the vector store and the language model all run on your machine. The only network traffic is downloading the models the first time.

A local setup on an ordinary laptop handles thousands of documents comfortably. The limit you hit first is usually embedding time on the initial import, not search speed — searching a hundred thousand chunks is still fast. Chapter nine covers when to move to a production store.

Sources & references

  1. Ollama — model library
  2. Qdrant — Ollama embeddings documentation
  3. Nomic Embed — paper