Vault RAG
pendingby Enrique Vasallo
Ask questions about your notes using local AI (Ollama + LangGraph)
ObsidianRAG π§
Ask questions about your Obsidian notes using local AI
π v3 Now Available! - Native Obsidian plugin with local AI. Manual installation or via Community Plugins (pending approval).
A RAG (Retrieval-Augmented Generation) system for querying your Obsidian vault using LangGraph and local LLMs (Ollama). Get intelligent answers based on your personal knowledge base, with full privacy and offline capability.
β¨ Key Features
- π Native Obsidian Plugin - Install with one click, no terminal required
- π 100% Local & Private - All AI runs on your machine, zero cloud dependencies
- π Advanced RAG - Hybrid search (Vector + BM25) + CrossEncoder reranking
- πΈοΈ GraphRAG - Follows
[[wikilinks]]to expand context intelligently - π Multilingual - Works in any language (Spanish, English, etc.)
- β‘ Real-time Streaming - See answers generated token-by-token
- π Source Attribution - Every answer shows relevance scores and links
π¦ Installation
For End Users (Recommended)
1. Install the Obsidian Plugin
- Open Obsidian β Settings β Community Plugins
- Browse and search for "Vault RAG"
- Click Install β Enable
Note: The plugin is currently pending approval for Community Plugins. For now, install manually by downloading from GitHub Releases.
2. Install Backend
pip install obsidianrag
# or
pipx install obsidianrag
3. Install Ollama
Download Ollama from ollama.ai and pull a model:
ollama pull gemma3
4. Done!
Open the plugin from the ribbon icon (π§ ) or command palette: ObsidianRAG: Open Chat
For Developers
Clone and setup for development:
git clone https://github.com/Vasallo94/ObsidianRAG.git
cd ObsidianRAG
# Backend
cd backend
uv sync
uv run pytest
# Plugin
cd ../plugin
pnpm install
pnpm run dev
π Quick Start
Using the Plugin
-
Start the backend server (auto-starts if enabled in settings):
- Command palette β
ObsidianRAG: Start Backend Server - Or manually:
obsidianrag serve --vault /path/to/vault
- Command palette β
-
Open the chat:
- Click the π§ icon in the ribbon, or
- Command palette β
ObsidianRAG: Open Chat
-
Ask questions:
What notes do I have about Python? Summarize my meeting notes from this week What did I learn about machine learning? -
Get answers with:
- β Answer text (with markdown formatting)
- π Source links to your notes
- π’ Relevance scores (green = most relevant)
βοΈ Configuration
Plugin Settings
Access via Settings β ObsidianRAG:
| Setting | Default | Description |
|---|---|---|
| Server Port | 8000 | Backend API port |
| LLM Model | gemma3 | Ollama model (gemma3, qwen2.5, llama3.2, etc.) |
| Auto-start Server | true | Start backend when Obsidian opens |
| Show Source Links | true | Display note links in answers |
Backend Configuration
The backend auto-configures from your vault, but you can customize via CLI:
obsidianrag serve --vault /path/to/vault --port 8000 --model qwen2.5 --reranker
Available CLI options:
--vault: Path to your Obsidian vault (required)--port: Server port (default: 8000)--model: Ollama model to use (default: gemma3)--reranker/--no-reranker: Enable/disable reranking (default: enabled)
ποΈ Architecture
System Overview
βββββββββββββββββββββββββββββββββββββββββββ
β Obsidian β
β ββββββββββββββββββββββββββββββββββ β
β β ObsidianRAG Plugin (TS) β β
β β β β
β β β’ Chat View β β
β β β’ Server Manager β β
β β β’ Settings β β
β ββββββββββββ¬ββββββββββββββββββββββ β
βββββββββββββββΌββββββββββββββββββββββββββββ
β HTTP (localhost:8000)
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β Backend (Python) β
β β
β FastAPI β LangGraph β Ollama β
β β β
β ChromaDB + Reranker β
βββββββββββββββββββββββββββββββββββββββββββ
RAG Pipeline
flowchart LR
Q[Question] --> R[Retrieve]
R --> H[Hybrid Search<br/>Vector + BM25]
H --> RR[Reranker<br/>CrossEncoder]
RR --> G[GraphRAG<br/>Link Expansion]
G --> C[Context]
C --> L[LLM Generate]
L --> A[Answer]
Retrieve Node:
- Hybrid search (60% vector, 40% BM25)
- Reranking with BAAI/bge-reranker-v2-m3
- GraphRAG expansion (follows
[[wikilinks]]) - Score filtering (removes low-relevance < 0.3)
Generate Node:
- Build prompt with context
- Stream tokens from Ollama LLM
- Return answer + sources
π€ Supported Models
LLMs (via Ollama)
| Model | Size | Best For | Install |
|---|---|---|---|
gemma3 | 5GB | General use, balanced | ollama pull gemma3 |
qwen2.5 | 4.4GB | Spanish, multilingual | ollama pull qwen2.5 |
qwen3 | 5GB | Better reasoning | ollama pull qwen3 |
llama3.2 | 2GB | Smaller, faster | ollama pull llama3.2 |
Embeddings
- HuggingFace (default):
paraphrase-multilingual-mpnet-base-v2(auto-downloads) - Ollama (optional):
nomic-embed-text(ollama pull nomic-embed-text)
π§ Troubleshooting
See docs/TROUBLESHOOTING.md for detailed solutions.
Quick Fixes
β Server shows "Offline"
# Make sure backend is installed
pip install obsidianrag
# Start manually
obsidianrag serve --vault /path/to/vault
β "Ollama not running"
# Make sure Ollama is running
ollama serve
# Verify
curl http://localhost:11434/api/tags
β Model not found
ollama pull gemma3
π Project Structure
ObsidianRAG/
βββ backend/ # Python backend (PyPI package)
β βββ obsidianrag/ # Main package
β β βββ api/ # FastAPI server
β β βββ cli/ # CLI commands
β β βββ core/ # RAG logic (LangGraph, ChromaDB)
β β βββ config/ # Settings
β βββ tests/ # 79 tests
β
βββ plugin/ # Obsidian plugin (TypeScript)
β βββ src/main.ts # Plugin entry point
β βββ tests/ # 32 tests
β βββ styles.css # UI styles
β
βββ docs/ # Documentation
π§ͺ Testing
# Backend tests (79 tests)
cd backend
uv run pytest
# Plugin tests (32 tests)
cd plugin
pnpm test
Coverage:
- Backend: 42% (focus on core logic)
- Plugin: Unit tests for HTTP/parsing/settings
π€ Contributing
We welcome contributions!
- Fork the repo
- Create a feature branch:
git checkout -b feature/awesome-feature - Commit changes:
git commit -m 'feat: add awesome feature' - Push:
git push origin feature/awesome-feature - Open a Pull Request
See docs/CONTRIBUTING.md for detailed guidelines.
π License
MIT License - see LICENSE
π Acknowledgments
- LangChain & LangGraph - RAG framework
- Ollama - Local LLM runtime
- Obsidian - Note-taking app
- ChromaDB - Vector database
Made with β€οΈ for the Obsidian community
π Star us on GitHub
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.