A personal knowledge base that builds itself. Instead of stateless RAG, the LLM incrementally maintains a persistent, interlinked markdown wiki — compounding over time.
A pattern for using LLMs to build personal knowledge bases that accumulate and self-reference over time, rather than recomputing from raw sources on every query.
Traditional retrieval-augmented generation (RAG) is stateless — the model rediscovers relevant context on every question by searching a corpus of raw documents. This works but it's wasteful: cross-references are recomputed, synthesis is redone, and the model never builds on its prior reasoning.
The LLM Wiki pattern inverts this. The LLM incrementally builds and maintains a persistent, structured, interlinked collection of markdown files. Over time, the wiki becomes a compounding artifact:
Karpathy's observation:
Humans are good at reading and insight. They're bad at:
LLMs excel at exactly this consistency-maintenance work. The human curates and analyzes; the LLM keeps the knowledge graph coherent.
Medical records, fitness data, life decisions. A wiki per life domain.
Papers, notes, experiments. The wiki becomes your second brain for a thesis or research thread.
Book notes that compound. Re-read becomes re-synthesize.
Shared knowledge base where every Slack thread, doc, and meeting gets ingested.
Track competitors over time — feature launches, blog posts, hires accumulate into intelligence.
Each lecture ingested builds interconnected mastery of the subject.
Three persistent layers work together: immutable sources on the bottom, LLM-generated wiki in the middle, and a schema/config document governing both.
The ground truth. Immutable. The LLM reads from here but never writes. Provenance is preserved — every claim in the wiki traces back to a specific source file and location.
LLM-generated, structured markdown. Organized into conventional folders:
| Folder / File | Purpose |
|---|---|
| index.md | Content-oriented catalog, organized by category with one-line summaries |
| log.md | Append-only chronological record with parseable timestamps |
| overview.md | Auto-updated summary of the entire wiki's state |
| entities/ | Pages for named things: people, projects, organizations |
| concepts/ | Pages for ideas, theories, patterns |
| sources/ | One page per ingested source with metadata and summary |
| queries/ | Resolved question pages — past queries filed as reference |
| synthesis/ | Cross-cutting analysis pages stitching multiple entities |
| comparisons/ | Side-by-side analyses of related entities or concepts |
A configuration document — often named CLAUDE.md or AGENTS.md in Karpathy's original, or split into purpose.md and schema.md in nashsu's implementation. This governs:
The wiki has three primary operations: Ingest, Query, and Lint. Everything else is a variation on these.
Processing new sources into the wiki. The LLM:
sources/Asking questions against the wiki. The LLM:
queries/Periodic health checks. The LLM audits the wiki for:
Two pages making claims that can't both be true. Flag for human resolution.
Statements that may no longer be accurate given newer sources.
Pages nothing links to. Either link them or archive.
Pages that should link to each other but don't.
Sparse areas of the knowledge graph that warrant research.
index.md out of sync with actual pages; category counts wrong.
A desktop application built by @nashsu that implements Karpathy's pattern with a polished three-column UI, knowledge graph visualization, and a raft of extensions beyond the base spec.
Karpathy's gist describes the pattern. nashsu's implementation adds substantial features that make it practically usable:
Analysis phase extracts entities and connections; generation phase writes wiki pages with full source traceability.
Relevance scoring combines direct links (×3.0), source overlap (×4.0), Adamic-Adar (×1.5), and type affinity (×1.0).
Automatic discovery of knowledge clusters. The graph self-organizes into topical communities.
Surfaces surprising cross-community connections and knowledge gaps. One-click Deep Research from sparse areas.
Optional embedding-based retrieval via LanceDB. Recall improved from 58.2% to 71.4% with vectors enabled.
Serial processing with crash recovery, cancel, retry, and progress visualization.
Recursive folder ingestion preserving directory structure. Folder context guides LLM classification.
LLM-optimized search queries, multi-query web search via Tavily, auto-ingest results.
LLM flags items needing human judgment with predefined actions and pre-generated search queries.
One-click capture using Mozilla Readability.js with auto-ingest.
Four phases run for every user question:
Three-column desktop interface:
Independent sessions, configurable history depth, cited references panel grouping sources by type.
Rolling 5-line display with opacity fade for <think> blocks. Collapsed by default.
Inline and block LaTeX via remark-math and rehype-katex. Auto-detects LaTeX environments.
Deleting a source removes related wiki pages. Shared entities preserved; only source-specific refs removed.
PDF, DOCX, PPTX, XLSX/XLS/ODS, images, video/audio transcripts, web clips.
English and Chinese UI via react-i18next. LLM responds in configured language.
A Rust + TypeScript desktop app built on Tauri, with considered choices at every layer.
| Component | Technology |
|---|---|
| Desktop framework | Tauri v2 (Rust + WebView) |
| Frontend | React 19 + TypeScript + Vite |
| UI components | shadcn/ui + Tailwind CSS v4 |
| Editor | Milkdown (ProseMirror-based) |
| Graph visualization | sigma.js + graphology + ForceAtlas2 |
| Vector DB | LanceDB (Rust, embedded) |
| State management | Zustand |
| Web search | Tavily API |
pdf-extract (Rust)
docx-rs (Rust)
ZIP + XML parsing
calamine for XLSX/XLS/ODS
Vision LLM ingestion
Mozilla Readability.js via Chrome extension
Smaller binary, native Rust backend for document processing and vector DB integration.
No separate server. Vector index lives in the same filesystem as the wiki markdown.
ProseMirror-based, extensible, and natively markdown. Matches the wiki's file format.
GPU-accelerated graph rendering handles wikis with thousands of pages and tens of thousands of edges.
From cold start to a living, growing knowledge base — the eight-step quickstart.
purpose.md — what is this wiki for?Drop files directly into the Sources panel. Folders ingest recursively.
One-click capture of any web page. Auto-cleans with Readability.js, auto-ingests.
Give the LLM a topic; it generates multi-query web searches, fetches results, and ingests them.
Paste text directly for quick capture of snippets, meeting notes, or Slack messages.
Ask natural-language questions in the Chat panel. The retrieval pipeline:
Answers come with citations to wiki pages, grouped by type in the references panel. Valuable answers can be filed as new pages.
The graph panel uses sigma.js with ForceAtlas2 layout. Features:
Two maintenance panels keep the wiki healthy:
Three install paths: pre-built binaries for the impatient, build-from-source for hackers, and Chrome extension for the Web Clipper.
Fastest path. Download from the GitHub Releases page:
.dmg installer — drag to Applications
.msi installer — run and follow prompts
.deb (Debian/Ubuntu) or .AppImage (portable)
Requires Node.js and Rust. Builds for your current platform.
The browser extension for one-click web page capture:
extension/ directory from the llm_wiki repoThe documentation site you're reading is a single-file HTML SPA deployed to Cloudflare Pages via Wrangler. Same workflow works for any static docs site.
Minimum viable LLM Wiki — what you need:
Everything else — vector search, knowledge graph, clustering, Chrome extensions — is optimization. Claude Code with Agent Skills can implement the base pattern in under an hour; the value comes from sustained use.