MapNet: permission-aware local RAG over your folders on a CPU laptop with Ollama
- Hardware
- A CPU laptop running Ollama
- Models & engines
- qwen2.5 models (qwen2.5:3b in the quick start, qwen2.5:7b as the reader in the answer test) and nomic-embed-text for embeddings
- Key gotcha
- Measured and didn't help: recursive spreading, embedding-based query expansion, model-written file descriptions, and letting a 7B model pick folders first (right folder only 39% of the time).
What they built
Gal wanted local RAG that finds the right file without embedding every passage up front, runs on a CPU laptop with Ollama, and respects who is allowed to read what.
Instead of one flat index, MapNet keeps a live map of where knowledge sits: folders, then files, then sections. A word network finds the 50 likeliest passages in about 2 ms, and only those get embedded, on first visit, then re-ranked by meaning.
The project README describes it as a research prototype that runs entirely on your machine with a small model through Ollama; Gal says it is open source (MIT) and was written with Claude Code.
Setup
- A CPU laptop running Ollama
- qwen2.5 models (qwen2.5:3b in the quick start, qwen2.5:7b as the reader in the answer test) and nomic-embed-text for embeddings
- MapNet from github.com/devinvok/MapNet (Python, pip install -r requirements.txt)
- Supported files include .md, .txt, .csv, .pdf and .docx
How it works
- New or edited files are searchable on the next question, with no re-indexing.
- A folder's .access file limits it to some roles; a caller is never scored against, embedded for, or shown a passage they can't open, and restricted pages don't change how rare a word looks to them.
- The README says each file is mapped the first time a question reaches it, with a local model writing a short card per section that guides routing only and is never shown to the answering model.
- Agents can leave notes that are only pointers to files, never instructions, and are checked on every use; false ones weaken and get deleted.
Results & numbers
- On 475 Kubernetes docs with 35 questions and a 7B reader: embedding everything got 86% of answers right, MapNet 77%, words only 74%.
- MapNet found the right file as often as embedding everything (80%), but slightly worse passages cost it 3 of 35 answers.
- Per the README, embedding all 7,703 passages took about 12 minutes before the first question, while MapNet embeds only the 50 passages a question reaches (about 5 seconds the first time).
Gotchas
- Measured and didn't help: recursive spreading, embedding-based query expansion, model-written file descriptions, and letting a 7B model pick folders first (right folder only 39% of the time).
- Small samples: Gal says so plainly.
- The README notes it has not been tested on large real-world corpora yet.
“Small sample, said plainly.”— Gal
Do it yourself
- git clone https://github.com/devinvok/MapNet.git and pip install -r requirements.txt.
- ollama pull qwen2.5:3b (optional; without a model you get the best passage instead of an answer).
- Run python ask.py examples/company to try the sample, then python ask.py ~/Documents/work on your own folder.
- Add a .access file to folders that only some roles should reach, and pass --role hr,finance to ask as those roles.
git clone https://github.com/devinvok/MapNet.git
cd MapNet
pip install -r requirements.txt
ollama pull qwen2.5:3b
python ask.py examples/companySimilar setups
A CPU-only PDF question-answering API with Ollama, Qwen2.5 1.5B and ChromaDB
A developer who wanted to keep documents inside the private network built a small RAG app on a PC with no active GPU: PDFs are indexed into ChromaDB and a local FastAPI endpoint answers questions with Qwen2.5 1.5B on Ollama.
Hearth: a household assistant on Ollama, and proving nothing leaves the house
Hearth answers family questions from manuals and papers with citations, handles voice, notes and reminders, and runs on one home computer; its builders tested small models, prompt injection, and three ways of proving no data leaves.
A CPU-only PDF assistant that cites the page and refuses to guess
A cloud engineer built a question-answering service over technical PDF manuals that runs entirely on a standard Linux server with no GPU, using Ollama with qwen2.5:3b, and answers only from the documents with file and page citations.
Finding why a local Ollama RAG bot ignored its instructions: silent num_ctx truncation
A developer's local RAG bot on llama3.1:8b skipped citations and guessed answers because Ollama silently cut prompts to a 2048-token window; in a 500-question test 312 prompts were truncated, and setting num_ctx to 8192 lifted grounded accuracy from 61% to 84%.