Greener-Dalii21k downloadsKarpathy's LLM Wiki implementation - multi-page knowledge generation with entity/concept pages and conversational query.

AI-powered structured knowledge base that ingests your notes and generates a connected Wiki — based on Andrej Karpathy's LLM Wiki concept.
Obsidian official score 95/100 | Native support for 10 languages | Zero-embedding graph retrieval | Full data sovereignty | Works with every provider
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Deutsch | Français | Español | Português | Italiano
Official Site | Obsidian Marketplace | Blog | Feedback & Discussion
🚀 Quick Start | ✨ Features | 🤖 Model Selection Guide | 🔒 Transparency & Compliance | ❓ FAQ
← If this plugin has helped you, feel free to buy me a coffee♥️ or drop a star🌟↗
⚡ Quick Update Reminder: This project evolves rapidly with frequent bug fixes, performance improvements, new features, and UX optimizations. We recommend updating to the latest version regularly in Obsidian (Settings → Community plugins → Check for updates), or enabling automatic plugin updates to ensure the best experience.
You write. AI organizes. You ask. That's it.
🎯 The problem. Your notes are a goldmine — people, concepts, ideas, connections. But right now they're just files in folders. Finding what relates to what means searching, tagging, and hoping you remember the thread.
✨ The fix. Andrej Karpathy suggested something elegant: treat your notes as raw material, and let an LLM do the architect work. It reads what you write, pulls out entities and concepts, and weaves them into a structured Wiki — complete with [[bidirectional links]], an auto-generated index, and a chat interface that answers questions from your knowledge.
📚 So you don't have to be the librarian. No deciding what deserves a page. No maintaining cross-links. No wondering if something is out of date. Pick any note (or folder, or selection) from your vault — the LLM reads, extracts, writes, links, and even flags contradictions — while you stay in flow.
🤖 And it's not another chatbot. ChatGPT knows the internet. LLM-Wiki knows you — or rather, what you've taught it. Every answer carries [[wiki-links]] back into your knowledge graph. Every response is a trailhead, not a dead end.
🏆 Key differentiator — Graph-powered retrieval at zero embedding cost. Most knowledge-base plugins use vector embeddings (expensive, per-provider, internet-dependent). LLM-Wiki runs Personalized PageRank over your existing [[wiki-link]] graph — matching embedding-grade retrieval quality with zero API calls, no new dependencies, and full local-model support. Add zero-LLM Tier B section extraction (i18n-aware, 10 languages) and you get a knowledge engine that works for every user, on every provider.
Obsidian is brilliant at linked thinking. But there's a catch: you're the one doing all the linking.
LLM-Wiki flips that. Instead of you building the graph by hand, the AI grows it with you. Add a note about a new concept — it finds the connections you'd miss. Ask a question — it walks your own knowledge graph and brings back answers with citations.
[[wiki-links]] as breadcrumbs. Every answer is a path deeper into your own knowledge.🌟 Recommended — Obsidian Community Plugin Market:
🌐 Or from the Community Plugin website — visit community.obsidian.md/plugins/karpathywiki and click Add to Obsidian to install directly.
⚙️ Manual (alternative):
main.js, manifest.json, styles.css from Releaseskarpathywiki, drop the three files inside🔨 Development: git clone, pnpm install, pnpm build.
This project evolves rapidly — new features, bug fixes, and improvements are shipped frequently. We recommend keeping up to date:
Option A — Manual update (recommended):
Option B — Enable auto-update:
💡 Why stay updated? Each release may include new features, performance improvements, and important bug fixes. We actively maintain this plugin — missing updates means missing out on a better experience.
🦙 Ollama (local, no API key): Install Ollama, pull a model (ollama pull gemma4 or ollama pull qwen3.5:27b), select "Ollama (Local)" in the provider dropdown.
🎛️ LM Studio (local, no API key): Install LM Studio, start its local server (default http://localhost:1234/v1), select "LM Studio (Local)" in the provider dropdown. LM Studio runs a built-in OpenAI-compatible server — API key field is optional.
🔐 ChatGPT Plan (Codex OAuth) — experimental: This is separate from OpenAI, which uses an OpenAI Platform API key and separate usage billing. Select ChatGPT Plan (Codex OAuth), then use Sign in with browser on desktop (localhost callback) or Use device code on desktop/mobile and finish authorization on OpenAI's page. The plugin synchronizes picker-visible models from the signed-in Codex account and caches only sanitized catalog metadata; use Refresh account models to update it. If the catalog is temporarily unavailable, the last successful cache or a minimal bundled fallback remains available. Run Test Connection, then save. OAuth credentials are stored only in Obsidian SecretStorage; Sign out clears them. Availability follows OpenAI Codex authentication, model, and allowance policies; this is third-party compatibility, not an OpenAI partnership or a general ChatGPT API.
See Model Selection Guide for details.
| Method | How |
|---|---|
| 📥 Ingest single source | Cmd+P → "Ingest single source" — select a note (Markdown or PDF, v1.25.0+) to extract entities and concepts into Wiki pages |
| 📂 Ingest from folder | Cmd+P → "Ingest from folder" — pick a folder, batch generate Wiki from all notes inside |
| 📑 Ingest multiple files | Cmd+P → "Ingest multiple files" — pick specific notes via two-pane modal (recursive folder tree + per-file checkboxes), then batch ingest the selection (with live queue + per-file cancel) |
| 🎯 Ingest current file | Click the sticker icon in the left ribbon, or Cmd+P → "Ingest current file" — ingest the file you're editing |
| 🔍 Query wiki | Cmd+P → "Query wiki" — conversational Q&A over your Wiki, streaming responses with [[wiki-links]] |
| 🛠️ Lint wiki | Cmd+P → "Lint wiki" — full health scan: duplicates, dead links, empty pages, orphans, missing aliases, contradictions. Schema suggestions surfaced inside the Lint Modal |
| 📋 Regenerate index | Cmd+P → "Regenerate index" — rebuild wiki/index.md with current pages and aliases |
| 📊 View Ingestion History (v1.21.0) | Cmd+P → "View Ingestion History" — browse past ingestions, lint reports, and maintenance runs in a searchable, filterable UI |
| ⏹ Cancel current operation | Cmd+P → "Cancel current ingestion" — stop an in-progress operation cleanly at the next batch boundary |
| 🎉 Recreate Welcome Note (v1.23.0) | Cmd+P → "Recreate Wiki Welcome Note" — re-generate the first-run Welcome note |
Re-ingesting the same source does incremental updates on entity/concept pages (new info merged in). Summary pages are regenerated.
💡 Smart Batch Skip: When ingesting a folder, the plugin automatically detects already-processed files and skips them to save time and API costs. The batch report shows skipped count.

🔧 Upgrading from v1.24.x. PDF ingest (v1.25.0) writes its cache to
.obsidian/plugins/karpathywiki/pdf-cache/(up to 100 MB / 1000 entries / 10 MB single-entry; LRU-by-mtime eviction on startup and at each batch ingest). Your vault is not modified by default — turn on Write PDF Markdown to Vault (Settings → Wiki Configuration → Wiki Folder) only if you want a<basename>.pdf.mdsidecar next to the source PDF. Two new settings — Force PDF Support (advanced, default off) and Write PDF Markdown to Vault (default off) — are fully backward-compatible: olddata.jsonwithout them defaults tofalse.
🔧 Upgrading from v1.24.0. The internal
<!-- reviewed: keep -->comment marker (v1.24.0, #244) that protected only a page's Mentions in Source section has been removed. To keep a curated Mentions section, setreviewed: truein the page frontmatter — it protects the whole page (Mentions included) and, unlike the hidden comment, stays visible in the Properties panel and survives Markdown linters.
Backward compatible. No breaking changes since v1.0.0 — your existing wiki pages, settings, and workflows are preserved without reconfiguration.
After upgrading, run Lint Wiki → Smart Fix All for a one-click, causality-ordered repair:
Then Regenerate Index to rebuild wiki/index.md with alias entries for every page, enabling
alias-aware search (e.g., "DSA" finds "DeepSeek-Sparse-Attention").
📖 Detailed upgrade walkthroughs for specific version jumps (v1.20.3 slug fingerprint, v1.16.0 double-nested links) are maintained in GitHub Discussions / Upgrading.
Settings to review: Force PDF Support (Settings → LLM Configuration → Advanced, off by default — only needed for non-NATIVE providers), Write PDF Markdown to Vault (Settings → Wiki Configuration → Wiki Folder, off by default), Wiki Output Language (independent from UI), Extraction Granularity (Minimal–Fine, + Custom), Page Generation Concurrency (default 3), Batch Delay (default 300ms).
Four themes: cache-only PDF ingest, local-model guidance, prompt centralization for PDF transcriber, and eight e2e bug fixes. Recommended upgrade for everyone on v1.24.x.
[[wiki-link]] workflow applies unchanged. Result is content-hash cached in .obsidian/plugins/karpathywiki/pdf-cache/ (key includes converterVersion so prompt upgrades invalidate stale entries). See the Local PDF OCR Path for the recommended local-Apple-Silicon setup.<basename>.pdf.md next to the source PDF after conversion. Off by default.[illegible] / [figure: ...] / [equation: ...] anti-hallucination markers; small/local models that wrap output in ```markdown fences are auto-cleaned before cache write. Prompt centralized into src/wiki/prompts/pdf.ts alongside every other LLM-call prompt in the project.Settings to review: Force PDF Support (Settings → LLM Configuration → Advanced, default off — only relevant for non-NATIVE providers), Write PDF Markdown to Vault (Settings → Wiki Configuration → Wiki Folder, default off — opt-in sidecar).
Hotfix release over v1.25.0: eight LLM-call-output and lint silent-loss fixes, three big-file splits, and one build-verification root cause. Recommended upgrade for everyone on v1.25.0.
preserveExistingSections helper shared across merge + related paths.http://localhost:1234/v1) now ingests without a placeholder key; non-LM-Studio providers still require an explicit API key (unchanged).wiki-engine.ts 1799 → smaller (Phase C-PR1, 4 internal modules), settings.ts 1439 → smaller (Phase C-PR2, 8 section renderers), main.ts 1304 → 300 LOC (Phase C-PR3, 6 main-commands modules). DiskCache<T> extracted with bounded growth (100 MB / 1000 entries / 10 MB single-entry caps + LRU-by-mtime eviction).pnpm-lock.yaml ↔ CI package-lock.json drift was the real cause of v1.25.0's npm-registry swap; both lockfiles are now regenerated from a single node_modules snapshot to keep local build and Obsidian's CI build identical.ingestActiveFile, selectSourceToIngest) now hides the persistent Ingesting: <basename> Notice when an exception fires, so failed ingests don't leave the spinner on screen until the next successful ingest.DiskCache<T>, lint-fix-all-completion, page-batch-runner, graph-cache, index-generator, log-writer, and section-header-canonicalizer modules.Settings to review: none — this release is bugfix + refactor only; no new settings, no new commands, no new locales.
reviewed: true pages are protected from overwrite.Medical_Arzneimittel, 法规). The plugin respects your vocabulary in extraction prompts and frontmatter validation; the existing Lint audit (Issue #85 v7) reports any page whose tags fall outside the active vocabulary.
Pick a PDF from your vault — the plugin reads it through your LLM provider's native file input, converts it to Markdown, and re-enters the regular Markdown ingest pipeline. Every existing entity/concept/alias/[[wiki-link]] workflow applies unchanged.
.obsidian/plugins/karpathywiki/pdf-cache/; cache key embeds a converterVersion so prompt upgrades invalidate stale entries automatically.<basename>.pdf.md next to the source PDF after conversion. Off by default (cache-only).[illegible] / [figure: ...] / [equation: ...] anti-hallucination markers; small/local models that wrap output in ```markdown fences are auto-cleaned before cache write.🔍 5-stage PPR seed-selection cascade (v1.24.1 PATCH). When you ask a multi-hop question, Query Wiki composes the answer through five complementary stages before any generation runs:
[[wiki-link]] graph starting from the candidate seed set; gives the LLM-graph-aware multi-hop context that linear search can't reach.The cascade automatically truncates to whichever step returned enough signal — no fixed 5-step cost, no LLM calls when lex is sufficient, no lost precision when the LLM augmentation is needed. End-to-end relevance (PPR @5 = 27.1% on the project's own benchmark corpus) outperforms pure-knn baselines (24.1%) without opt-in embedding. Stage 1.5 (steps 2–3) handles the multi-hop query types that pure lex misses; Stage 1.7 (step 4) recovers when the LLM-injected keywords haven't seen enough signal yet; Stage 1.9 (step 5) guarantees that the LLM sees neighbor context, not just a flat top-N list. Replaces the older binary-tier cascade.
🤖 Conversational query — ChatGPT-style dialog with streaming Markdown output, automatic [[wiki-links]], and multi-turn history.
🪟 Right-docked side panel (v1.22.1, PR #196). Query Wiki opens in a Copilot-style right sidebar leaf (reusing an existing leaf if already open) instead of a centered popup. The message-circle ribbon icon and Query Wiki command activate/reveal the panel; your notes stay visible alongside the conversation. All functionality is preserved unchanged.

detected → review-passed → resolved (AI-fix) or detected → unresolved (manual).
.trash.Clippings/ folder to the watch list; clipped web pages auto-ingest into the Wiki.[[wiki-link]] edges between your wiki pages; the cascade seeds PPR at the cascade's top-N candidate set so multi-hop context travels through up to 3 expansion rings. This is what makes the Query Wiki answers graph-aware (a "Founders of Microsoft" question resolves via Bill Gates → Microsoft → competitors, not just literal title overlap). 2,137-page vaults typically see <100 ms warm + 3-hop expansions, regardless of vault size. Used by all 4 stages of the seed-selection cascade (Query & Feedback section above) and by lint duplicate detection when indirect links tie two candidate pages together.wiki/ (LLM-generated pages organized as wiki/sources/, wiki/entities/, wiki/concepts/) → schema/ (co-evolved configuration).src/.Input: sources/machine-learning.md
### Machine Learning
Machine learning uses algorithms to learn from data.
### Types
- Supervised learning
- Unsupervised learning
- Reinforcement learning
Output — Concept page: wiki/concepts/supervised-learning.md
---
type: concept
created: 2025-12-01
updated: 2026-05-15
sources: ["[[sources/machine-learning]]"]
tags: [method]
aliases: ["监督学习", "Supervised Learning"]
---
### Supervised Learning
### Basic Information
- Type: method
- Source: [[sources/machine-learning]]
### Description
Supervised learning is a machine learning paradigm where models learn
from labeled training data to make predictions on unseen data...
### Related Concepts
- [[concepts/Machine-Learning|Machine Learning]]
- [[concepts/Unsupervised-Learning|Unsupervised Learning]]
### Related Entities
- [[entities/Arthur-Samuel|Arthur Samuel]]
### Mentions in Source
- "Supervised learning uses labeled data to train predictive models..."
This plugin follows Karpathy's philosophy: feed the LLM full Wiki context, not chunked RAG retrieval. Long-context models are strongly recommended — the larger your Wiki grows, the more context the LLM needs.
💡 Why not RAG? Karpathy's original critique argues that RAG fragments knowledge and breaks the LLM's ability to reason across the full knowledge graph.
💰 Value-First Strategy: You don't need flagship models. The following cost-effective alternatives deliver excellent results at lower prices:
| Tier | Model | Context | Why |
|---|---|---|---|
| 🌟 Value Pick | DeepSeek V4-Flash | 1M tokens | Lowest cost ($0.14/M), 284B MoE, ideal for batch ingestion |
| 🌟 Value Pick | Gemini-3.5-Flash | 1M tokens | 4× faster output than GPT-5.5, great for agent tasks |
| 🌟 Value Pick | Qwen3.6-Plus | 1M tokens | Strong coding & agentic capabilities, competitive pricing |
| 🌟 Value Pick | Grok-4 | 2M tokens | xAI 2025-07 flagship, 2M context, strong reasoning & code tasks |
| Balanced | Claude Sonnet 4.6 | 1M tokens | Great quality/cost balance, $3/$15 per million tokens |
| Lightweight | Claude Haiku 4.5 | 200K tokens | Fast and affordable for smaller wikis |
| Budget | Xiaomi MiMo-V2.5 | 1M tokens | Xiaomi 310B/15B MoE, MIT open-source 2026-04, agent & multimodal |
| Flagship | Claude Opus 4.7 | 1M tokens | Ultimate quality, higher cost — use selectively |
| Flagship | GPT-5.5 | 1M tokens | Top reasoning, higher cost — use selectively |
Local inference wins on data sovereignty, offline use, and zero API cost. The trade-off is context window (most sit between 8K–128K; recent open-weight families reach 262K) and instruction following vs. flagship cloud models. Pick by your hardware budget: larger parameter counts buy world knowledge and instruction fidelity (better extraction quality, fewer hallucinations); smaller counts buy speed and memory headroom but pay for it in hallucinations and weaker long-context reasoning. The sweet spot on a 24 GB Apple Silicon or single consumer GPU is the 27B–35B-A3B class.
| Model | Params | Context | Why |
|---|---|---|---|
| Qwen3.5 27B | 27B dense | 262K | Best quality/size trade-off for ingest; MLX 4-bit fits in 24 GB |
| Qwen3.5 35B-A3B | 35B total / 3B active MoE | 262K | Faster than 27B dense at similar quality; ideal memory saver |
| Qwen3.5 122B-A10B | 122B / 10B MoE | 262K | Quality ceiling; needs ≥48 GB VRAM or dual GPUs |
| Qwen3.6 27B | 27B dense | 256K+ | 2026-04 refresh over Qwen3.5 27B — prefer this if your hardware can take it |
| Qwen3.6 35B-A3B | 35B / 3B MoE | 262K | Same trade-off as Qwen3.5 35B-A3B, newer weights |
| Gemma 4 31B IT | 31B dense | 262K | Strong instruction following, clean Markdown output |
| Gemma 4 26B A4B IT | 26B / 4B MoE | 262K | Lower memory than 31B dense at comparable quality |
| Gemma 4 E2B / E4B IT | 2B / 4B | 131K | CPU-runnable; use only for small wikis or quick previews |
Quantization: MLX 4-bit on Apple Silicon is typically 1.5–2× faster than GGUF Q4_K_M at the same effective bitrate. GGUF Q4_K_M is the default cross-platform choice; reach for Q5/Q8 only if you have the VRAM headroom and notice quality regression at Q4.
Context strategy: When your Wiki grows past ~500 pages, a 262K local model still sees most of the context the Query engine assembles, but ingest on a 2000-page vault will outrun it. Common pattern: cloud for ingest + local for query. For full local setups, the 27B/35B-A3B class is the sweet spot.
v1.25.0's PDF ingest works with any provider that accepts PDF as a file part. For a fully local pipeline on Apple Silicon (the only platform oMLX currently supports), the recommended setup is:
The PDF never leaves your machine — Markitdown does the structural conversion locally, Unlimited-OCR does the visual recognition locally, and the local LLM does the summarization locally. The plugin's cache (.obsidian/plugins/karpathywiki/pdf-cache/) then keeps re-ingests instant.
Fallback: if oMLX/Markitdown is unavailable (Linux/Windows or older Macs), point Force PDF Support directly at a local multimodal LLM that accepts PDF file parts — quality is good when the model is large enough, but VRAM demands scale steeply with page count.
🔌 Anthropic Compatible (Coding Plan): If your provider offers an Anthropic-compatible API endpoint, select "Anthropic Compatible" and enter your provider's Base URL and API Key.
💡 OpenAI billing boundary: OpenAI uses a separately billed Platform API key. ChatGPT Plan (Codex OAuth) is an experimental, distinct provider that uses eligible Codex allowance after browser or device-code sign-in; availability is not guaranteed by plan name.
Karpathy's three-layer separation design:
📄 Your vault notes (any folder) # 📖 You pick which notes to ingest
↓ ingest
wiki/ # 🧠 LLM-generated Wiki pages (wiki/sources/, wiki/entities/, wiki/concepts/)
↓ query / maintain
schema/ # 📋 Wiki structure configuration (naming, templates, categories)
📖 See the full codebase structure in CONTRIBUTING.md → Project Structure.
Generated pages:
wiki/sources/filename.md — 📄 Source summarywiki/entities/entity-name.md — 👤 Entity pages (people, orgs, projects, etc.)wiki/concepts/concept-name.md — 💡 Concept pages (theories, methods, terms, etc.)wiki/index.md — 📑 Auto-generated indexwiki/log.md — 📝 Operation logKeep your plugin updated — new features and fixes ship frequently. Run Settings → Community Plugins → Check for updates regularly.
📖 More FAQs on GitHub Discussions.
What does the plugin actually do?
Pick any note, folder, or selection from your vault; the LLM extracts entities and concepts and generates an interlinked wiki with [[bidirectional links]]. Ask questions and get conversational answers grounded in your notes — not internet search. Generated summaries live under wiki/sources/, entities under wiki/entities/, and concepts under wiki/concepts/ — your original vault notes are never modified.
Is my data sent to third parties? 🔒 Privacy first. No backend, no tracking, no analytics — the plugin runs entirely inside Obsidian. Only text you explicitly send for ingestion/query leaves your device, and only to the LLM provider you configure. For complete data locality, use a local provider (Ollama or LM Studio with no API key) — your data never touches the internet.
How is this different from RAG chatbots?
Unlike chunked RAG that fragments context, LLM-Wiki runs a Personalized PageRank engine over your existing [[wiki-link]] graph — finding related pages via link structure, not vector embeddings. This means zero embedding cost, no new dependencies, and full support for local and offline models.
Which LLM should I use? Long-context models (≥200K tokens) work best. Budget-friendly picks: DeepSeek V4-Flash ($0.14/M), Gemini 3.5 Flash, Qwen3.6-Plus. Local models via Ollama/LM Studio work for query but have smaller context windows (8K–128K). See the Model Selection Guide for details.
How do I get started? Install from Obsidian Community Plugins → pick an LLM provider → Test Connection → run Ingest single source (or Ingest from folder) on any note in your vault → your first wiki pages appear within seconds. See Quick Start above.
How can I control API costs? Use Coarse or Minimal extraction granularity for batch ingestion (fewer LLM calls). Smart Batch Skip auto-detects already-ingested files. Auto-Maintenance is OFF by default (enable only if needed). Lint shows counts before running fixes — nothing is charged without your approval.
Is my existing wiki safe?
✅ Backward compatible since v1.0.0. Set reviewed: true on any page to protect it from overwrite. The plugin never modifies your original vault notes — only generates new pages inside the wiki/ folder.
Can I use the plugin in my language? 🌐 10 languages for both UI and wiki output: English, 简体中文, 繁體中文, 日本語, 한국어, Deutsch, Français, Español, Português, Italiano. UI and wiki language are independent — your wiki can be in Chinese while the interface stays in English. Adding an 11th language is contributor-driven (follow the Italian PR #159 pattern).
What minimum setup is needed? Obsidian v1.11.4+ (desktop or mobile). An LLM provider API key, a local Ollama/LM Studio model, or an authorized ChatGPT Plan (Codex OAuth) credential. The plugin's llmReady guard requires a successful connection test before core features unlock — this prevents silent failures from misconfigured providers.
How do I cancel a running operation?
Click the status bar text (shows "Ingesting… click to cancel") or Cmd+P → "Cancel current ingestion". Stops cleanly at the next batch boundary, preserving all completed work.
Where do I get help?
Ctrl+Shift+I / Cmd+Option+I) — copy logs with module-name prefixes for faster diagnosisThis plugin is listed on the Obsidian Community Plugin Market and undergoes automated review for security and permissions.
The plugin has no backend, no server infrastructure, and no data collection of any kind. It is purely local software running inside Obsidian. The plugin cannot and does not collect, store, or transmit your data to any server — because no such server exists.
Network access is used only to communicate with the LLM provider you configure — no other network calls are made. This is entirely under your control: you choose the provider, you enter the API key, you decide where your data goes.
File system access (vault enumeration) is required to build and maintain the wiki: reading your source notes, generating pages, scanning for dead links, and detecting duplicate pages. The plugin never modifies your source files — only files under the wiki folder.
Clipboard access is used exclusively by the "Copy" button in the Query modal, and only when you click it.
If you prefer complete data locality, use a local LLM provider such as Ollama or LM Studio. With a local provider, your data never leaves your machine.
If LLM-Wiki has become a meaningful part of your knowledge workflow, you can support its ongoing development:
Sponsorship is entirely optional. The plugin stays Apache-2.0-licensed and feature-complete regardless.
Thanks to the following people for supporting the project:
Apache License, Version 2.0 — see LICENSE and NOTICE.
@ai-sdk/openai, @ai-sdk/anthropic, @ai-sdk/openai-compatible) via Obsidian requestUrl