jjwheatley3k downloadsLeverage Retrieval Augmented Generation (RAG) for your notes using a locally running LLM or AI.
Local Retrieval Augmented Generation for your Obsidian notes
Mini-RAG lets you chat with a locally running LLM, in the context of selected Obsidian notes and folders. When you open a chat with a note or folder, Mini-RAG chunks the content into excerpts, generates vector embeddings for each chunk, and retrieves the most semantically relevant excerpts to include with each question.
It works with either of two local servers:
Everything runs on your machine, which is also why Mini-RAG is a desktop-only plugin.
Pick one server and set it up, then choose it under Provider in Mini-RAG's settings. You can switch at any time — each provider remembers its own URL and model choices.
ollama pull llama3.1.ollama pull nomic-embed-text.Ollama runs on http://localhost:11434 by default.
-hf downloads it from Hugging Face the first time; -m your-model.gguf runs a file you already have:llama-server -hf bartowski/Qwen2.5-3B-Instruct-GGUF:Q4_K_M -ngl 99 -c 8192 --port 8080
llama-server serves exactly one model per process, and answers with that model whatever a request asks for. So Mini-RAG uses the models your servers are actually running: the Chat Model follows the chat server, and if the embedding model you pick isn't the one the embedding server is running, the settings say which one is in use and how to restart the server with yours. To use a different chat model, restart llama-server with it; the settings panel shows the command. To use a dedicated embedding model, start a second server with embeddings enabled and point Embedding server URL at it:
llama-server -hf nomic-ai/nomic-embed-text-v1.5-GGUF:Q8_0 --embeddings --port 8081
Open "options" by clicking on the gear icon then navigate to Community Plugins > Mini-RAG > Options.
The settings are laid out as three steps.
Named after the provider you chose, with a status beside it: ✓ Connected once the server answers, or Not connected. These settings are remembered separately for each provider, so you can try another and come back without losing anything.
ollama pull <model> command.llama-server -hf <model> --embeddings --port 8081 command.llama-server, running your embedding model (http://localhost:8081 by default). The embedding model list comes from this server.These are shared by every provider, and the defaults work well to start with.
If your chat model can't generate embeddings and no dedicated embedding model is set, Mini-RAG still works: it includes as much of the note or folder as fits the model's context with each question, instead of retrieving excerpts, and says if any notes were left out.
You can open a chat from the right-click context menu, or via the Command Palette (Ctrl/Cmd+P → "Mini-RAG: Open chat panel"). You will see the Mini-RAG menu option when you:
Follow-up questions remember the earlier turns of the chat. For each question, Mini-RAG retrieves fresh excerpts from your notes and sends them alongside it, so the excerpts always match what you're asking about. In a very long chat, the oldest turns are dropped first to keep within the model's context.
Every request is sized to fit the chat model's context window, so nothing is silently cut off by the server. Mini-RAG asks the server how big the window is:
-c).OLLAMA_CONTEXT_LENGTH), Mini-RAG still sizes requests for 4,096 tokens.When notes have to be left out of a request, a short line in the chat says so, and says when the window was assumed.
Switching model (from the chevron beside the model name) or provider starts a fresh conversation.
Responses stream in token-by-token as the model generates them. This is by design, to give a more responsive feel to the behaviour.
Click any chat bubble (yours or the model's) to copy its text to the clipboard.
To save a Mini-RAG conversation, click the Save (disk) icon. If you continue the conversation after saving, click Save again to update the file.
To save under a custom name, click the chevron (▾) next to the Save button and choose Save as…
When a chat has context (opened from a file or folder), a Summarize (sparkles) button appears. Click it to ask the model to summarize the context.
A note or folder that fits the model's context is summarized in one go. A larger one is summarized in stages: Mini-RAG summarizes it part by part, then combines the parts into one summary, so every note is covered. A line in the chat counts the parts as it goes ("Summarizing part 3 of 16…"), and the Summarize button becomes Stop while it runs. Larger folders take longer — each part is a separate request to the model.
The conversation remembers the summary, so you can ask follow-up questions about it.
Generating embeddings for a large folder can take a while. With Cache embeddings on disk enabled, Mini-RAG stores the results so that the next time you open the same note or folder, unchanged notes are loaded instantly and only new or edited notes are re-embedded.
The cache is stored per folder under plugins/mini-rag/cache/ in your vault's configuration folder (.obsidian, unless you have changed it), mirroring your vault's folder structure. Each note's entry is keyed by a hash of its content, the chunking version, the provider, the embedding model, and the embedding server's address — so editing a note, or switching embedding model or provider, automatically re-embeds only what changed. Entries for deleted notes are cleaned up automatically.
If the embedding model behind a server changes without its name changing (for example, llama-server restarted on a different model on the same port), Mini-RAG notices that the embeddings no longer match, clears the cache, and asks you to rebuild.
What the cache contains: the cache files store your note text and its embedding vectors in plain (unencrypted) JSON. Embedding vectors are not anonymous — much of the original text can be reconstructed from them — so treat the cache as being as sensitive as the notes themselves.
Keeping the cache private:
.gitignore into the cache folder automatically, so the cache is never committed if your vault is a git repository..obsidian configuration folder (including installed community plugins), the cache will sync with it. If your vault syncs to a location where you would not want note content copied, leave this setting off (the default).Your settings are migrated automatically: your existing Ollama URL and models carry over, and Ollama stays selected. The embedding cache uses a new format, so it is rebuilt once the first time you open each note or folder.
Mini-RAG communicates only with the local server you configure (by default http://localhost:11434 for Ollama, or http://localhost:8080 for llama.cpp). No data is sent to any external server.
Mini-RAG writes to the clipboard when you click a Copy button (e.g. to copy a chat message, or to copy a setup command such as ollama pull from the settings panel). It never reads clipboard content.
Mini-RAG shows a link to support its development (GitHub Sponsors) in three places, all within its own interface: a row at the top of its settings, a heart button in the chat panel's header, and the Support development command. The link opens in your browser only when you click it; Mini-RAG never shows it anywhere else, or unprompted.
Mini-RAG is free and open source. If it helps you, you can support its development on GitHub Sponsors.
For more about the author visit JJWheatley.com