Offline RAG over 268 Obsidian notes, queryable from a coding agent
- Models & engines
- Embeddings: nomic-embed-text via Ollama (768-dim)
LLM: mistral-nemo:12b via Ollama - Key gotcha
- nomic-embed-text needs 'search_document: ' and 'search_query: ' prefixes; it cost him an hour of debugging
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
Similar setups
A local second brain for Markdown notes with Ollama, Whisper and SQLite
WeekendAiProjects built a phone-to-computer note capture system that tidies, links, searches and answers questions over a Markdown vault with local Qwen models, and graded every answer by hand.
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.
Obsidian vault Q&A with Mini-RAG and llama.cpp
An Obsidian plugin that chats with a note or folder, using separate local llama.cpp servers for chat and embeddings (Ollama works too).
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.