Obsidian for AI: Build a Second Brain That Talks Back
There are two ways people work with LLMs today. The first is the chat window. The second is the vault — and once you've tried it, you can't go back.
The chat-window way: open a tab, type a question, get an answer, close the tab, forget it ever happened. The vault way: every prompt, every result, every reusable instruction lives in plain Markdown files that you own, link together, and feed back into the model on demand.
Obsidian is the best tool I've found for the second approach. It's a free, local-first Markdown editor with a graph database, a plugin ecosystem, and — crucially — native AI integrations that don't lock you to one provider. This post walks through the exact setup I use, the settings that matter, and a few patterns that will pay for themselves in the first week.
Why Obsidian, specifically
Three properties matter for AI work, and Obsidian is one of the few tools that nails all three.
Plain Markdown on your disk. Your notes are .md files in a folder. No proprietary database, no export step. That means an LLM can read them directly, a script can grep them, and you can pipe the whole vault into a RAG index without asking anyone's permission.
Wikilinks and backlinks. The [[concept]] syntax turns notes into a graph. When you ask an AI to "summarize everything I know about X," you can hand it not just the X note but every note that links to X.
A plugin ecosystem built around extensibility. The community has already built the bridges to OpenAI, Anthropic, local Ollama models, and embedding stores. You don't have to write a single line of Python to get a working AI workflow.
The starting vault structure
Before touching any plugin, set up a folder layout. The exact names don't matter, but the separation does — when you eventually point a RAG plugin at a folder, you'll want clean boundaries.
my-vault/
├── 00-inbox/ ← raw captures, unfiled chat exports
├── 10-prompts/ ← reusable system prompts and templates
├── 20-notes/ ← permanent notes (your actual thinking)
├── 30-projects/ ← active work, one folder per project
├── 40-references/ ← clippings, papers, docs to feed AI
├── 90-logs/ ← daily notes, AI chat transcripts
└── _attachments/ ← images, PDFs
The numeric prefixes keep things sorted; the underscore on _attachments keeps it out of the way. In Settings → Files and links, set "Default location for new attachments" to _attachments so images from pasted screenshots don't sprinkle themselves across your prompt files.
Core settings to change immediately
Out of the box, Obsidian is fine. With four tweaks, it becomes a much better AI workbench.
In Settings → Editor, turn on "Strict line breaks." Markdown's default behavior of collapsing single line breaks into spaces is fine for blog posts but terrible for prompts, where each line often matters. With strict mode on, what you write is what the LLM sees.
In Settings → Files and links, switch "New link format" to "Relative path to file" and turn on "Use [[Wikilinks]]." Relative paths survive when you move folders around; wikilinks make the graph readable.
In Settings → Core plugins, enable Templates and Daily notes. Templates are how you'll stop rewriting the same prompt scaffolding; daily notes give you a single landing pad where every AI session gets logged automatically.
In Settings → Hotkeys, bind "Insert template" to something fast — I use Ctrl+T. You'll use it constantly.
The AI plugins that actually matter
The community plugin directory has dozens of AI plugins. Most are redundant. Here is the minimal set I'd install on a fresh vault, in order of importance.
01Copilot for Obsidian
This is the workhorse. It adds a chat pane that can see your current note, your selection, or your whole vault, and it works with OpenAI, Anthropic, Google, Cohere, and any local model running on Ollama or LM Studio.
Install it from Settings → Community plugins → Browse → "Copilot" by logseq/copilot (verify the author — there are forks). After installing, go to its settings tab and:
Under API Settings, paste your provider key. For Anthropic, the model string you want today is something like claude-sonnet-4-5 or claude-opus-4-5 — Copilot has a dropdown, but if your provider just released something newer, the "custom model" field accepts any valid string.
Under General, set "Default Mode" to Vault QA if you mostly want to query your notes, or Chat if you mostly want a sidebar assistant. You can switch per-conversation.
Under QA Settings, pick an embedding model. text-embedding-3-small (OpenAI) is cheap and good; nomic-embed-text via Ollama is free and runs offline. Click Refresh Vault Index after changing this, or your old embeddings will silently mismatch.
Set "Chunk size" to around 1000 and "Chunk overlap" to 200 as a starting point. Bump the chunk size up for long-form notes (essays, papers) and down for atomic notes.
02Templater
Built-in Templates can substitute a date and a title. Templater can run JavaScript, prompt you for input, and pull from other notes — which is exactly what you need for reusable prompt scaffolding.
After installing, in Templater settings, set "Template folder location" to 10-prompts/templates. Turn on "Trigger Templater on new file creation" only if you've also set per-folder templates; otherwise it'll fire on every new note and annoy you.
03Smart Connections
If you want semantic search across your vault without sending everything to a cloud API, Smart Connections runs embeddings locally. It adds a sidebar that shows notes semantically related to whatever you're currently viewing — different from Obsidian's built-in backlinks, which only show explicit [[links]].
In its settings, pick the Transformers (local) embedding model on first run. The first index takes a few minutes; after that, it updates incrementally.
04Text Generator
If Copilot feels too opinionated, Text Generator is a thinner wrapper that runs a prompt template against any selection and pastes the result inline. Useful for things like "rewrite this paragraph in plain English" where you don't want a chat — you want a transformation.
A concrete prompt template
This is where the real value compounds. Create the file 10-prompts/templates/explain-code.md:
---
prompt-tag: code-explainer
model: claude-sonnet-4-5
temperature: 0.2
---
You are a senior engineer reviewing code for a junior teammate.
Explain the following code:
1. What it does, in one sentence.
2. Any non-obvious assumptions it makes.
3. One thing you would change and why.
Code:
<%tp.file.selection()%>
The frontmatter is metadata that Dataview and your AI plugins can read. The <%tp.file.selection()%> is Templater syntax — when you trigger this template with text selected, it inserts that selection. So the workflow is: paste code into a note, select it, hit Ctrl+T, choose explain-code, and you get a fully-formed prompt ready to send.
The daily AI log pattern
In Daily notes settings, point "Template file location" to 10-prompts/templates/daily.md and create that file with something like:
# <% tp.date.now("YYYY-MM-DD") %>
## Today's questions
-
## AI sessions
### [[session-<% tp.date.now("HHmm") %>]]
- Model:
- Goal:
- Outcome:
## Followups
-
Every time you have a substantive AI conversation, export it (Copilot has a "Save chat as note" command) into a new note named session-1430.md or similar, and link it from the day's log. After a month, your daily notes become a searchable index of every prompt that worked, every one that didn't, and what you learned.
This is the thing chat apps cannot give you: continuity. You're not starting from zero every session. You're building a graph.
Querying your vault with Dataview
Install the Dataview plugin and you get a SQL-ish query language over your notes' frontmatter. Combined with the prompt-tag field above, you can do this:
```dataview
TABLE model, temperature
FROM "10-prompts"
WHERE prompt-tag
SORT file.mtime DESC
```
That renders a live table of every prompt template, what model it targets, and when you last touched it. When a model gets deprecated, you can find every template that needs updating in one query.
A few things to avoid
Don't sync your vault to a public Git repo if it contains API keys, client work, or anything you wouldn't post on a billboard. Use a private repo, Obsidian Sync, or git-crypt.
Don't dump 50,000 web clippings into the vault and expect RAG to magically find what matters. The quality of your AI workflow is bounded by the quality of your notes. A small, curated vault outperforms a huge messy one.
Don't pay for every plugin that has an AI badge on it. The four above cover roughly 90% of what people actually do, and Copilot alone covers about 70%.
Where this leads
After a few weeks of running this setup, something shifts. You stop thinking of LLM sessions as ephemeral and start thinking of them as input to a permanent system. Your prompts get sharper because you can see every prior version. Your notes get more interlinked because the AI keeps surfacing connections you missed. The vault becomes a place where your thinking and the model's thinking meet, and the friction between them goes down every week.
That's the actual promise of a "second brain." Not a folder of clippings, but a workspace where the tools that help you think are right there in the same window as the thinking itself.
Vault structure conventions borrowed loosely from Johnny Decimal and PARA. The opinions about plugins are mine; your mileage will vary depending on which models you use most.
Comments
Post a Comment