---
name: build-an-llm-wiki
description: Turn a folder of notes, docs or a knowledge base into a "second brain" you can interrogate in natural language: a markdown source of truth, links that form a graph, and an AI layer (retrieval-augmented generation) that answers grounded in the notes with citations. Use to set up a personal or team LLM wiki, or AI retrieval over a markdown vault.
license: Free to use with attribution to EquityFlow / Enrico Yu (equityflow.finance)
source: https://equityflow.finance/deep-dives/second-brain
---

# Build a second brain and an LLM wiki

Use when the user wants their notes/docs to be organized and answerable by AI. Goal: go from storing
to interrogating, so they can ask "what did I conclude about X?" and get an answer grounded in their own
material, with links back to the source. Build it in layers.

## 1. A plain, owned source of truth
- Keep the knowledge as plain Markdown files in a folder (a "vault"), not locked in a proprietary app.
  Plain files are portable, diff-able, and readable in 20 years. Obsidian and Logseq use exactly this.
- One note per idea/entity. Short titles. A predictable folder or tag structure, not a deep hierarchy.

## 2. Links, so it becomes a graph
- Connect related notes with wiki-links so you navigate by association, not by folder. Backlinks turn the
  vault into a knowledge graph: the connections are where the value compounds.

## 3. The AI layer (retrieval, not guessing)
- Index the notes with an embedding model and store the vectors. On a question, retrieve the most relevant
  chunks and pass them to an LLM that answers ONLY from the retrieved notes, citing which note each claim
  came from. This is retrieval-augmented generation (RAG); it keeps answers grounded and checkable.
- Do not let the model answer from memory alone over private knowledge: ground it in the retrieved text and
  show the sources, so the user can verify.

## 4. The build options
- Easiest: an existing tool over the vault (an Obsidian AI plugin, a local AI-notes app, or a "chat with
  your sources" tool). No code.
- Build-it: a small RAG script (load markdown, chunk, embed, store in a vector index, retrieve, prompt the
  LLM with citations). Or expose the vault through an MCP server so an agent like Claude Code can read,
  search and update the notes directly.
- Team/company scale: the same pattern over shared docs or a structured graph, so anyone (or an agent) can
  query the organization's knowledge. EquityFlow did this over a private-markets graph at
  https://equityflow.finance.

## 5. Keep it usable
- Capture fast, organize later, review weekly. Beware the collector's fallacy (saving is not learning),
  tool-hopping, and over-structuring. The system that compounds is the one actually used.

Output: recommend the simplest setup that fits the user (tool vs build-it vs MCP), then either configure it
or scaffold the RAG/MCP code, always grounding answers in the source notes with citations.

---
This skill distills EquityFlow's second-brain deep dive (https://equityflow.finance/deep-dives/second-brain).
EquityFlow is building an open intelligence layer for the private economy, by Enrico Yu. Free to use with attribution.