How to Use Local AI with Obsidian: Smart Notes with Ollama

Obsidian is a Markdown-based note-taking app that stores everything locally as plain text files. Pairing it with a local LLM via Ollama gives you an AI assistant that reads and writes your own notes — summarising long notes, generating ideas from existing content, answering questions based on your knowledge base, and drafting new notes — without any of your personal knowledge ever leaving your machine. This guide covers the best Obsidian plugins for local LLM integration and practical workflows.

Prerequisites

You need Obsidian installed (obsidian.md — free for personal use) and Ollama running with at least one model pulled. A general-purpose model works well for most note-taking tasks — Llama 3.2 8B is a good default. For heavy summarisation of long notes, a model with a larger context window (Gemma 3 12B or Llama 3.2 8B with num_ctx set to 32768) handles lengthy documents better.

ollama pull llama3.2
ollama serve  # make sure Ollama is running

The Smart Connections Plugin

Smart Connections is the most powerful Obsidian plugin for local AI integration. It embeds all your notes using a local embedding model and builds a semantic index, enabling you to find notes by meaning rather than just by keyword. It also provides a chat interface where you can ask questions about your entire vault and get answers grounded in your own notes, with source citations linking back to the relevant note.

Install it from the Obsidian Community Plugins browser (Settings → Community Plugins → Browse, search “Smart Connections”). After installing, go to Smart Connections settings and set the Embedding Model to use Ollama with nomic-embed-text:

  • Embedding Model: Ollama — nomic-embed-text
  • Ollama Endpoint: http://localhost:11434
  • Chat Model: Ollama — llama3.2

After saving settings, click “Re-build All” to index your vault. Indexing time depends on vault size — a 500-note vault takes a few minutes; a 5,000-note vault may take 20–30 minutes on first build. The index is stored locally in your vault’s .obsidian/plugins/smart-connections folder and updates incrementally as you add or edit notes.

Once indexed, open the Smart Connections panel (ribbon icon or Cmd+P → “Smart Connections: Open”) and start chatting. Ask questions like “What have I written about machine learning?”, “Summarise my notes on project X”, or “What are the main themes across my research notes?” The plugin retrieves relevant note chunks and passes them to the LLM as context, producing answers that are grounded in your actual notes with clickable links back to the source.

The Ollama Plugin

The Ollama plugin (search “Ollama” in Community Plugins) provides a simpler, more direct integration: a command palette action that sends the current note or selection to Ollama and inserts the response. It is less sophisticated than Smart Connections but useful for specific in-note tasks.

After installing, configure it with your Ollama endpoint and model in settings. The most useful commands it adds to the command palette:

  • Ollama: Summarise — sends the current note and asks for a bullet-point summary, inserted at the cursor
  • Ollama: Continue writing — continues the current note from the cursor position
  • Ollama: Improve writing — rewrites selected text for clarity
  • Ollama: Custom prompt — opens a prompt input box, sends the note + your prompt

The BMO Chatbot Plugin

BMO Chatbot adds a persistent chat sidebar to Obsidian that maintains conversation history across sessions. Unlike Smart Connections which is focused on vault-wide search, BMO is more like having a general assistant available in the sidebar. Configure it with your Ollama endpoint and you get a full chat interface without leaving Obsidian.

The most useful BMO feature for note-taking is its ability to reference the current note in the chat. Type @note in the chat and BMO includes the full current note text as context for the next message — useful for asking questions about a specific note, requesting expansions on a particular section, or generating related questions to explore further.

Practical Workflows

Daily note processing: At the end of each day, open your daily note, run “Ollama: Summarise” to get a bullet-point summary of everything you captured, and paste it into a weekly summary note. Over time this creates a searchable record of what you worked on without requiring manual synthesis.

Research note synthesis: When you have accumulated several notes on a topic across different sources, open Smart Connections and ask “Synthesise my notes on [topic] into a coherent summary”. The plugin retrieves all relevant notes and the LLM produces a synthesised overview with links back to the source notes, which you can save as a new summary note in the vault.

Idea generation: Select a paragraph from an existing note and use a custom Ollama prompt: “Generate 5 related ideas or questions I should explore based on this”. The responses give you new directions to investigate that are grounded in your existing thinking rather than generic suggestions from the model’s training data.

Meeting note cleanup: Paste raw meeting notes into a note, then run a custom prompt: “Clean up these meeting notes, extract action items, and format them with clear headings”. The LLM formats messy real-time notes into a structured document without you having to manually reorganise them.

Context Window Considerations

Obsidian vaults can contain very long notes — research compilations, project histories, long-form writing. The default Ollama context window (2048 tokens for many models) is often too small to process a full long note. When using the Ollama plugin or BMO for in-note tasks, increase the model’s context window. Either set num_ctx in a Modelfile or configure it in the plugin settings if the plugin supports it. For Smart Connections, the retrieval approach sidesteps this — it only passes the most relevant chunks to the model rather than the full vault, so context window size matters less for cross-vault queries.

A 32K context window covers most single-note use cases comfortably — the equivalent of roughly 25,000 words of text. For notes approaching book length, either split them into multiple linked notes (better Obsidian practice anyway) or use a model that supports 128K context like Llama 3.2 8B with num_ctx set accordingly, accepting the higher RAM cost.

Privacy and the Local-First Advantage

The combination of Obsidian and local LLMs is particularly appealing for privacy-conscious users because both are local-first by design. Obsidian stores everything as plain Markdown files on your filesystem — no cloud sync unless you opt in to Obsidian Sync. Ollama processes everything on your machine. The result is a personal knowledge management system with AI capabilities where none of your notes, queries, or personal knowledge ever leaves your computer. For professionals who keep sensitive information in their notes — client details, medical information, proprietary research, personal finances — this architecture provides AI-augmented note-taking without the data exposure of cloud-based AI tools.

Organising Your Vault for Better AI Retrieval

The quality of Smart Connections retrieval improves significantly with a well-organised vault. A few habits make the semantic index more effective. First, use descriptive note titles rather than dates or codes — “Transformer Architecture: Attention Mechanisms and Position Encoding” retrieves better for relevant queries than “2024-03-15 research notes”. Second, start each note with a brief summary paragraph that captures the main idea — embedding models weight the beginning of a document more heavily, so a clear opening sentence dramatically improves retrieval precision. Third, avoid very long notes that cover many unrelated topics — split them into focused single-topic notes with links between them. A 200-word focused note on one concept is more retrievable than a 2,000-word catch-all note that mentions the concept in passing.

These are also good Obsidian practices independently of AI — they make manual navigation easier too. The AI retrieval quality essentially scales with how well-structured your vault already is, which means improving vault organisation benefits both human and AI navigation simultaneously.

Using Templates with AI Generation

Obsidian’s templating system (either the built-in Templates plugin or the more powerful Templater plugin) combines well with local AI to automate note creation. Create a template that includes an Ollama prompt as a dynamic field — when you create a new note from the template, it automatically runs the prompt and fills in the generated content.

For example, a meeting notes template that automatically generates an agenda from the meeting title, or a literature review template that generates an outline for a paper based on its title and abstract, can save significant setup time when creating notes. The Templater plugin supports running shell commands or JavaScript that can call the Ollama API, making arbitrarily complex AI-powered templates possible for users comfortable with scripting.

Connecting Obsidian to Other Tools via Local AI

For power users who want to go beyond in-vault AI assistance, Obsidian’s vault is just a folder of Markdown files — which means any local script or application can read and write notes directly. A Python script using Ollama’s API can process your vault programmatically: batch-summarise a collection of notes, generate a weekly digest, extract all action items across your daily notes, or create a structured index of a research project. This scriptable access, combined with Ollama’s local API, makes your Obsidian vault a first-class data source for custom AI workflows that would be complex or expensive to build against a cloud notes service.

import ollama
from pathlib import Path

VAULT_PATH = Path.home() / 'Documents/MyVault'

def summarise_note(note_path: Path, model: str = 'llama3.2') -> str:
    content = note_path.read_text(encoding='utf-8')
    if len(content.split()) < 100:
        return '(too short to summarise)'
    response = ollama.chat(
        model=model,
        messages=[{
            'role': 'user',
            'content': f'Summarise this note in 2-3 bullet points:\n\n{content[:4000]}'
        }]
    )
    return response['message']['content']

# Summarise all notes in a folder
research_folder = VAULT_PATH / 'Research'
for note in research_folder.glob('*.md'):
    print(f'## {note.stem}')
    print(summarise_note(note))
    print()

This scriptable approach is the most powerful integration mode for developers — the combination of Obsidian's plain-text vault, Ollama's local API, and Python gives you a fully programmable personal knowledge system that can automate repetitive knowledge management tasks without any cloud dependencies.

Recommended Starting Point

If you are new to AI-enhanced note-taking in Obsidian, the most practical starting point is Smart Connections with nomic-embed-text embeddings and Llama 3.2 as the chat model. Install it, let it index your vault overnight, and spend 10 minutes the next day asking it questions about your own notes. The experience of getting accurate, source-cited answers from your own knowledge base — rather than from the model's generic training data — is usually enough to make the workflow immediately compelling. From there, add the Ollama plugin for in-note tasks as the second step, and BMO Chatbot only if you want a persistent sidebar assistant. Start with Smart Connections because vault-wide semantic search is the capability that delivers the most value relative to setup effort, and it works well even with a modest vault of a few dozen notes.

Leave a Comment