LLM Wiki: Your Self-Building Personal Knowledge Base (Complete Guide)
LLM Wiki: Your Self-Building Personal Knowledge Base (Complete Guide)
What Is LLM Wiki?
Andrej Karpathy published a gist in early 2026 titled "LLM Wiki" — a pattern for building personal knowledge bases using LLMs. The core insight was simple but powerful: instead of retrieving raw chunks from your documents at query time (the traditional RAG approach), have the LLM incrementally build and maintain a persistent wiki — a structured, interlinked collection of markdown files that sits between you and your raw sources.
nashsu took that abstract pattern and turned it into a full cross-platform desktop application built with Tauri v2. It's not just a wrapper around the idea — it adds a two-step chain-of-thought ingest pipeline, a 4-signal knowledge graph with Louvain community detection, a Chrome Web Clipper, an optional vector search via LanceDB, a review system, Deep Research capabilities, and a local HTTP API that lets your AI agents query your knowledge base directly.
The result: you drop documents in, the LLM reads them, extracts entities and concepts, updates cross-references, maintains the index, and keeps everything consistent. You never write a wiki page yourself. The wiki compiles from everything you've read and keeps getting richer with every source you add.
Why Is It Trending?
LLM Wiki hit 8,900+ GitHub stars in just over a month since its initial release in April 2026. It's trending on GitHub because it solves a real pain point: knowledge management doesn't scale manually, and RAG is a poor substitute for a real knowledge base.
RAG systems (ChatGPT file uploads, NotebookLM, most enterprise RAG stacks) re-derive answers from scratch on every query. They don't accumulate. Ask a subtle question requiring synthesis across five documents, and the LLM has to find and piece together the relevant fragments every time. Nothing is built up.
LLM Wiki flips this model: knowledge is compiled once and kept current. The cross-references are already there. The contradictions have already been flagged. The synthesis already reflects everything you've read.
The fact that it's a polished desktop app (not just a CLI script) with Obsidian compatibility, a knowledge graph visualization, and a Chrome extension makes it immediately useful for researchers, students, writers, and anyone doing deep reading on complex topics.
Architecture Overview
LLM Wiki follows a three-layer architecture inherited from Karpathy's original pattern, with a desktop application layer on top.
The Three Layers
Raw Sources Layer — Your curated collection of documents (PDF, DOCX, PPTX, Markdown, images, web clips). These are immutable: the LLM reads from them but never modifies them. Sources are organized in raw/sources/ with optional raw/assets/ for local images.
Wiki Layer — A directory of LLM-generated markdown files organized into entities, concepts, sources summaries, comparisons, synthesis, and saved queries. Every page has YAML frontmatter with sources: [] linking back to raw documents. The LLM creates, updates, and cross-references pages here automatically. The wiki is also fully Obsidian-compatible — you can open it as an Obsidian vault and use the graph view, Dataview queries, and hotkeys.
Schema Layer — Two configuration files that define how the wiki works: purpose.md (goals, key questions, evolving thesis) and schema.md (structural rules, page types, conventions). These guide the LLM's behavior during every ingest and query.
The Desktop App
On top of these layers sits the Tauri v2 desktop application with:
- Three-column layout: Knowledge Tree / File Tree (left) + Chat (center) + Preview (right)
- Icon sidebar for switching between Wiki, Sources, Search, Graph, Lint, Review, Deep Research, Settings
- Activity Panel — real-time ingest progress showing file-by-file status
- Persistent state — conversations, settings, review items survive restarts
- Scenario templates — Research, Reading, Personal Growth, Business, General
Two-Step Chain-of-Thought Ingest
This is the core innovation over the original pattern. Instead of a single LLM call that reads and writes simultaneously:
Step 1 (Analysis) — The LLM reads the source and produces a structured analysis: key entities, concepts, arguments, connections to existing wiki content, contradictions with existing knowledge, recommendations for wiki structure.
Step 2 (Generation) — The LLM takes the analysis and generates wiki files: source summary with frontmatter, entity pages, concept pages with cross-references, updated index.md, log.md, overview.md, and review items for human judgment.
Additional enhancements: SHA256 incremental cache (unchanged files are skipped), persistent ingest queue with crash recovery and auto-retry, folder import preserving directory structure, source folder auto-watch, and language-aware generation.
Knowledge Graph & Vector Search
The 4-signal relevance model computes connections between pages using:
| Signal | Weight | Description |
|---|---|---|
| Direct links | ×3.0 | [[wikilinks]] between pages |
| Source overlap | ×4.0 | Pages sharing the same raw source |
| Adamic-Adar | ×1.5 | Pages sharing common neighbors |
| Type affinity | ×1.0 | Same page type (entity↔entity) |
The graph is visualized with sigma.js + ForceAtlas2: node colors by page type or community, edge thickness by relevance weight, hover interactions, and Louvain community detection automatically discovers knowledge clusters with cohesion scoring.
Optional vector search via LanceDB uses any OpenAI-compatible embeddings endpoint, improving recall from 58.2% to 71.4%.
Prerequisites
- A computer running macOS, Windows, or Linux
- An LLM provider API key: OpenAI, Anthropic (Claude), Google (Gemini), Ollama (local), or any custom OpenAI-compatible endpoint
- Node.js 20+ and Rust 1.70+ (only if building from source)
- Optional: A web search API key (Tavily, SerpApi, or a SearXNG instance) for Deep Research
- Optional: Chrome browser for the Web Clipper extension
Installation
Option 1: Pre-built Binary (Recommended)
- Go to the Releases page
- Download the appropriate package for your OS:
- macOS:
LLM.Wiki-*-aarch64.dmg(Apple Silicon) orLLM.Wiki_*_amd64.dmg - Windows:
LLM.Wiki_*_x64_en-US.msiorLLM.Wiki_*_x64-setup.exe - Linux:
LLM.Wiki_*_amd64.deb(Debian/Ubuntu),LLM.Wiki_*_x86_64.rpm(Fedora), orLLM.Wiki_*_amd64.AppImage(universal)
- macOS:
- Install and launch the application
Option 2: Build from Source
git clone https://github.com/nashsu/llm_wiki.git
cd llm_wiki
npm install
npm run tauri dev # Development mode
# or
npm run tauri build # Production build
Option 3: Chrome Extension (Web Clipper)
- Open
chrome://extensions - Enable "Developer mode" (top-right toggle)
- Click "Load unpacked" and select the
extension/directory from the cloned repo - The extension communicates with the app via the local HTTP API on port 19827
Quick Start Guide
Step 1: Launch and Configure
- Launch LLM Wiki — you'll be greeted with a project creation dialog
- Choose a scenario template that fits your use case: Research, Reading, Personal Growth, Business, or General
- Go to Settings (gear icon in the sidebar) and configure:
- LLM Provider: Select your provider (OpenAI, Anthropic, Google, Ollama, or Custom)
- API Key: Enter your API key
- Model: Choose your preferred model (e.g.,
gpt-4o,claude-sonnet-4-20250514,gemini-2.5-flash) - Context Window: Adjust the slider from 4K to 1M tokens depending on your model's capabilities
Step 2: Import Documents
- Click the Sources icon in the sidebar
- Drag and drop files or click to upload — supported formats include PDF, DOCX, PPTX, XLSX, Markdown, and images
- You can also import an entire folder recursively using the Folder Import button
- Optional: enable Source Folder Auto-Watch in Settings to automatically pick up files added, edited, or deleted in
raw/sources/
Step 3: Watch the Wiki Build Itself
- Once documents are queued, the Activity Panel shows real-time ingest progress
- Each file goes through the two-step pipeline: first analysis, then generation
- The LLM creates entity pages, concept pages, updates the index, and cross-references everything
- You can browse the growing wiki in real time — switch to the Wiki view to see pages being created
- Click the Graph icon to watch the knowledge graph expand as connections form
Step 4: Query Your Knowledge Base
- Go to the Chat (center panel) and start asking questions
- The LLM searches the wiki using a multi-phase pipeline:
- Tokenized keyword search + optional vector search
- Graph expansion (2-hop traversal using the 4-signal relevance model)
- Budget-controlled context assembly (60% wiki pages, 20% chat history, 5% index, 15% system)
- Responses include numbered citations linking back to specific wiki pages
- Use the Save to Wiki button to archive valuable answers as new wiki pages
Step 5: Explore the Knowledge Graph
- Open the Graph view to see how all your pages connect
- Toggle between Type (entity/concept/source) and Community (Louvain clusters) coloring
- Hover over nodes to see neighbors highlighted and non-neighbors dimmed
- Check Graph Insights for:
- Surprising Connections — unexpected relationships between pages
- Knowledge Gaps — isolated pages, sparse communities, bridge nodes
Step 6: Deep Research
When the LLM identifies knowledge gaps during ingest, it generates research topics:
- Go to the Deep Research panel
- Review the suggested topics and search queries (editable)
- LLM-supported web search (via Tavily, SerpApi, or SearXNG) finds relevant sources
- Results are synthesized into wiki research pages with cross-references
- Research output is automatically ingested into the wiki
Step 7: Web Clipper
- Install the Chrome Extension (see Installation section)
- Navigate to any web article
- Click the LLM Wiki extension icon
- Choose which project to clip into
- The article is extracted (ads, nav, sidebars removed), converted to Markdown, and auto-ingested
- The clip watcher polls every 3 seconds and processes new clips automatically
Step 8: Agent Integration
LLM Wiki ships a local HTTP API at http://127.0.0.1:19828:
- Enable the API server in Settings → API Server
- Generate an access token
- Install the agent skill into Claude Code / Codex:
npx skills add https://github.com/nashsu/llm_wiki_skill.git --skill llm_wiki_skill
- Now your AI agent can query your wiki: "What does my LLM Wiki say about transformer architectures?" or "Search my wiki for recent papers on attention mechanisms"
Configuration Details
Context Window Budget
The context window is allocated proportionally:
- 60% — Wiki pages (prioritized by combined search + graph relevance)
- 20% — Chat history
- 5% — Index (content catalog)
- 15% — System prompt (purpose, schema, language rules, citation format)
Multi-Provider LLM Support
| Provider | Streaming | Notes |
|---|---|---|
| OpenAI | ✅ | GPT-4o, GPT-4o-mini, o3, o4-mini |
| Anthropic | ✅ | Claude Sonnet 4, Haiku 3.5 |
| ✅ | Gemini 2.5 Flash, Gemini 2.5 Pro | |
| Ollama | ✅ | Local models via Ollama |
| Custom | ✅ | Any OpenAI-compatible endpoint |
Web Search Providers
| Provider | API Key Required | Notes |
|---|---|---|
| Tavily | ✅ | Optimized for LLM search |
| SerpApi | ✅ | Multi-engine support |
| SearXNG | ❌ (self-hosted) | Open-source meta search engine |
Verification Checklist
When querying your wiki, verify that:
- Your LLM provider is correctly configured in Settings
- Documents appear in the Sources view with processing status
- Wiki pages are being generated with proper YAML frontmatter
- The knowledge graph shows connections between pages
- Search returns relevant results (both keyword and vector if enabled)
- Chat responses cite specific wiki pages
- The Chrome extension successfully clips web pages
- The local HTTP API responds on port 19828
- Agent skill successfully queries the wiki
Resources
- GitHub Repository: github.com/nashsu/llm_wiki
- Releases: github.com/nashsu/llm_wiki/releases
- Karpathy's Original Gist: gist.github.com/karpathy/llm-wiki.md
- Agent Skill: github.com/nashsu/llm_wiki_skill
- License: GPL v3.0