RAGBrain is a powerful plugin for Obsidian that leverages Retrieval-Augmented Generation (RAG) to create a personalized AI assistant that works with your vault. It enables you to chat with your notes, ask questions, and get intelligent responses based on your personal knowledge base.
First, you need to set up a Qdrant vector database server. Follow the Qdrant quickstart guide or use these commands:
# Pull the Qdrant image
docker pull qdrant/qdrant
# Run the Qdrant container
docker run -p 6333:6333 -p 6334:6334 \
-v "$(pwd)/qdrant_storage:/qdrant/storage:z" \
qdrant/qdrantEnsure the server is running before moving onto the next step.
To manually install the RAGBrain plugin:
- Head to the Releases section of this repository
- Download the following three files from the latest release:
main.jsmanifest.jsonstyles.css
- Create a new folder named
rag-braininside your.obsidian/pluginsdirectory (create the plugins folder if it doesn't exist). - Paste the three downloaded files into the
rag-brainfolder. - Reload Obsidian and enable the RAGBrain plugin from the settings panel.
After installing the plugin in Obsidian:
- Open the plugin settings
- Configure all parameters (do NOT leave any blank)
- The Qdrant URL when hosted locally is typically
http://localhost:6333 - Current Embeddings Model, OCR model, and LLM model are fixed (more options coming soon)
- Upon loading the plugin, you'll see a new brain icon added to your side panel
- Click on it to open the AI Chat interface
- Prompt the AI chat with your questions about your notes
- Currently, the chat history doesn't inform future prompts
RAGBrain currently uses Google's Gemini models because:
- Superior OCR Capabilities: Gemini scores exceptionally high on OCR image processing tasks, making it ideal for extracting text from images in your notes
- High-Quality Embeddings: Gemini embeddings provide excellent semantic representation of your content, leading to more accurate retrieval
- Context Understanding: Gemini excels at understanding complex relationships between different pieces of information in your vault
⚠️ CAUTION: If OCR is enabled, the vectorization process may take quite a while depending on the number of images in your vault. Consider running the initial vectorization when you don't need immediate access to Obsidian.
RAGBrain includes a lightweight custom version control system that tracks changes to your vault without relying on Git. This ensures the embedding pipeline and Qdrant index stay in sync efficiently.
- File Hashing: Each file in your vault is hashed using SHA-256 to detect content changes.
- Timestamp Checking: Last modified timestamps are compared to detect updates.
- Deletion Detection: Files that no longer exist in the vault are automatically removed from tracking.
- Efficient Updates: Only changed or deleted files are reprocessed, keeping performance high.
The plugin maintains a file called rag-brain-version-control.json in your .obsidian folder, which stores hashes and timestamps for each tracked file. This allows RAGBrain to determine exactly which files need re-indexing.
- Ability to toggle and query only the currently opened file instead of the entire vault
- Change Gemini model support
- Use chat history as context for future prompts
- Chat embeddings and expanded LLM support
- Better UI indicators for progress of vectorization
Contributions are most certainly welcome! This is a passion project of mine as I look to leverage AI to make my knowledge base more efficient.




