Vault RAG Agent
A fully local RAG agent that answers questions about my Obsidian vault in plain language and cites the exact notes - a CLI, a streaming web page and a native macOS app, all backed by one small Python core. Nothing leaves the machine.
- Type
- Personal Project · AI / RAG
- Year
- 2026
- Role
- Sole developer - from the vault parser to the macOS app.
Runs entirely on-device through Ollama - no cloud, no API keys; indexes 585 notes into 2,702 chunks in a single SQLite file and scores 5/5 hit@6 on the retrieval eval.
- 100% local - no cloud, no API keys
- 585 notes to 2,702 chunks in one SQLite file
- Retrieval eval hit@6 = 5/5
The problem
My vault is ~585 private, mostly German notes - too many to search by memory, and I didn't want to send them to a cloud model just to ask questions across them.
Ask my notes questions in natural language and get answers grounded in - and linked back to - the real notes, without anything leaving my machine.
What I did
- Parse the vault (frontmatter, tags, [[links]]) with heading-aware chunking, embed locally with bge-m3 into a sqlite-vec store, and re-embed only changed notes.
- Retrieve the top-k chunks per question, expand one hop along wikilinks, and let a local qwen2.5 model answer in the question's language with [[source]] citations.
- Wrapped the same core in three interfaces - a CLI, a streaming FastAPI web page and a native pywebview macOS app - and added a hit@k retrieval eval.
Outcome
A working local agent over 585 notes / 2,702 chunks (15 MB index) that answers in German and cites the right notes - retrieval eval hit@6 = 5/5, no LangChain, no network.
Stack
- Python
- Ollama
- bge-m3 (embeddings)
- qwen2.5 (chat)
- sqlite-vec
- FastAPI
- pywebview
