Offline RAG over 268 Obsidian notes, queryable from a coding agent
What they built
Alex Beattie's vault holds 268 markdown files: internal docs, architecture decisions, API specs and meeting notes. Built-in search only finds exact terms, and he wanted natural-language questions with synthesized, cited answers, completely offline.
He built a local RAG pipeline and wrapped it as MCP tools, so his coding agent checks the vault instead of him switching context.
Setup
- Embeddings: nomic-embed-text via Ollama (768-dim)
- Vector DB: ChromaDB, persistent on disk
- LLM: mistral-nemo:12b via Ollama
- MCP server: FastMCP (stdio), configured in .cursor/mcp.json
- Code: github.com/alexbeattie/obsidian-rag
How it works
- Chunk on ## / ### headings, dropping chunks under 150 chars and splitting over 2,000 at paragraph boundaries
- Embed with task prefixes; IDs are content hashes so re-ingestion upserts
- Retrieve and synthesize with mistral-nemo, with citations
- Expose search and Q&A as MCP tools
Results & numbers
- Skipping the nomic prefixes silently drops recall by 15-20%
Gotchas
- nomic-embed-text needs 'search_document: ' and 'search_query: ' prefixes; it cost him an hour of debugging
“No API keys, no cloud services, no data leaving my machine.”— Alex Beattie
Do it yourself
- ollama pull nomic-embed-text && ollama pull mistral-nemo:12b
- Split notes on headings with min/max chunk guardrails
- Prefix documents with 'search_document: ' and queries with 'search_query: '
- Store in ChromaDB with content-hash IDs; re-run ingest safely
- Optionally wrap search as an MCP server for your editor's agent
Related
Home RAG assistant for embedded-systems docs on Proxmox
Ollama, llama.cpp, Open WebUI, BGE-M3 and SearXNG in a GPU-passthrough VM. Moving from 6 GB to 16 GB of VRAM changed which models could run.
Overnight video-to-RAG pipeline for 2,000+ saved clips
A local Qwen3.6 35B with ffmpeg, scenedetect and Whisper indexes saved TikToks and YouTube videos, so you can later find 'that one plumbing tutorial'.
Hybrid workflow: local for private and repetitive, cloud for hard
A Linux sysadmin stopped trying to replace cloud LLMs. Ollama now handles private docs, overnight article summaries and VS Code autocomplete.
mdrag: a Rust CLI to chat with an Obsidian vault
A self-contained RAG tool built on SQLite with sqlite-vec and gemma3:1b. It answers 'how did I fix that Git submodule issue?' from your own notes.