Karpathy LLM Wiki
approvedby Greener-Dalii
This plugin has not been manually reviewed by Obsidian staff. Karpathy's LLM Wiki implementation - multi-page knowledge generation with entity/concept pages and conversational query.

๐ง Karpathy LLM Wiki Plugin for Obsidian
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 94/100 | Native support for 8 languages | Actively maintained, continuously evolving
English | ไธญๆๆๆกฃ | ๆฅๆฌ่ช | ํ๊ตญ์ด | Deutsch | Franรงais | Espaรฑol | Portuguรชs
Official Site | Feedback & Discussion | ๐ค Explore Repo with DeepWiki
๐ก What is LLM-Wiki?
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. Drop notes into sources/ and 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.
โก Why Obsidian + LLM-Wiki?
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.
- ๐ Your Graph View comes alive. New notes don't just sit there โ they sprout links to entities, concepts, and sources. The graph grows organically, and the plugin maintains it: detecting duplicates, fixing dead links, bridging languages with aliases.
- ๐ฌ Your notes learn to talk back. Search becomes conversation. "What did I write about X?" becomes a dialogue, with streaming responses and
[[wiki-links]]as breadcrumbs. Every answer is a path deeper into your own knowledge. - ๐ง Obsidian becomes a thinking partner. It stops being a cabinet for notes and starts being something that helps you think โ surfacing hidden connections, flagging contradictions, remembering what you forgot you knew.
๐ Quick Start
๐ฆ Installation
๐ Recommended โ Obsidian Community Plugin Market:
- In Obsidian, go to Settings โ Community plugins
- Click Browse and search for "Karpathy LLM Wiki"
- Click Install, then Enable
๐ Or from the Community Plugin website โ visit community.obsidian.md/plugins/karpathywiki and click Add to Obsidian to install directly.
โ๏ธ Manual (alternative):
- Download
main.js,manifest.json,styles.cssfrom Releases - In Obsidian, go to Settings โ Community plugins. On the Installed plugins tab, click the folder icon to open your plugins directory
- Create a folder named
karpathywiki, drop the three files inside - Back in Obsidian, click the refresh icon โ Karpathy LLM Wiki will appear under Installed plugins
- Toggle it on to enable
๐จ Development: git clone, pnpm install, pnpm build.
๐ Updating
This project evolves rapidly โ new features, bug fixes, and improvements are shipped frequently. We recommend keeping up to date:
Option A โ Manual update (recommended):
- Go to Settings โ Community plugins
- Click Check for updates
- Find Karpathy LLM Wiki in the list and click Update
Option B โ Enable auto-update:
- Go to Settings โ Community plugins
- Toggle on Automatically check for plugins updates
- New versions will be detected automatically; update manually at your convenience
๐ก 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.
๐ Configure an LLM Provider
- Open Settings โ Karpathy LLM Wiki
- Pick a provider from the dropdown (Anthropic, Anthropic Compatible, Google Gemini, OpenAI, DeepSeek, Kimi, GLM, Ollama, OpenRouter, or custom)
- Enter your API key (not needed for Ollama)
- Click Fetch Models to populate the model dropdown, or type a model name manually
- Click Test Connection, then Save Settings
๐ฆ Ollama (local, no API key): Install Ollama, pull a model (ollama pull gemma4), select "Ollama (Local)" in the provider dropdown.
See README_CN.md for provider-specific instructions in Chinese.
๐ฎ Usage
| Method | How |
|---|---|
| ๐ฅ Ingest single source | Cmd+P โ "Ingest single source" โ select a note 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 |
| ๐ Query wiki | Cmd+P โ "Query wiki" โ ask questions, get streaming answers with [[wiki-links]] |
| ๐ ๏ธ Lint wiki | Cmd+P โ "Lint wiki" โ health scan: duplicates, dead links, empty pages, orphans, missing aliases |
| ๐ Regenerate index | Cmd+P โ "Regenerate index" โ rebuild wiki/index.md with current pages and aliases |
| ๐ก Suggest schema updates | Cmd+P โ "Suggest schema updates" โ LLM analyzes Wiki and proposes schema improvements |
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 an Older Version?
If you're upgrading from a version before v1.7.11 (or much earlier), your existing Wiki pages were generated without several capabilities added over many releases. Follow these steps after upgrading to bring your Wiki up to date:
1๏ธโฃ Rebuild your index
Cmd+P โ "Regenerate index" โ This rebuilds wiki/index.md with alias entries for every page, enabling alias-aware search (e.g., searching "DSA" finds "DeepSeek-Sparse-Attention"). The old index format only listed page titles.
2๏ธโฃ Run Lint wiki
Cmd+P โ "Lint wiki" โ This scans your entire Wiki and shows:
- ๐ท๏ธ Missing aliases: Pages without aliases (all pre-v1.7.11 pages). Click "Complete Aliases" โ the LLM generates translations, acronyms, and alternate names in bulk. This is critical for duplicate detection.
- ๐ Duplicate pages: Pages with overlapping content (e.g., "CoT" vs "ๆ็ปด้พ" created by older versions that didn't have alias-aware dedup). Click "Merge Duplicates" to fuse them and preserve all aliases.
- ๐ Dead links / Empty pages / Orphans: Standard wiki maintenance issues.
3๏ธโฃ Use Smart Fix All Click "Smart Fix All" in the Lint report for a one-click, causality-ordered repair: aliases completed โ duplicates merged โ dead links fixed โ orphans linked โ empty pages expanded. This is the fastest way to clean up a wiki built across many versions.
4๏ธโฃ Enable parallel page generation Settings โ Ingestion Acceleration:
- โก Page Generation Concurrency: Set to 3 for most providers (was 1/serial by default before v1.7.3). Speeds up ingestion 2โ3ร on sources with 10+ entities.
- โฑ๏ธ Batch Delay: Start at 300ms. Increase to 500โ800ms if you hit rate limits.
5๏ธโฃ Review new settings (added since v1.4.0โv1.7.x):
- ๐ Wiki Output Language (v1.6.5): Independent from UI language โ your Wiki can be in Chinese while the plugin UI stays in English, or vice versa.
- ๐ Extraction Granularity (v1.6.2, expanded in v1.10.0): Five options control how deeply the LLM extracts entities from sources:
- Fine (~100 items) โ Deep analysis, edge-case mentions included. High token cost, best for key sources.
- Standard (~50 items) โ Balanced extraction. Good default for daily notes.
- Coarse (~10 items) โ Quick overview, core entities only. Low cost, fast ingestion.
- Minimal (~5 items) โ Essential items only. Ideal for batch processing 100+ files or testing new sources.
- Custom (1โ300 items) โ User-defined entity/concept limits for specialized workflows.
๐ก Recommendation: Use Minimal or Coarse for large folders to save time and API costs. Use Fine selectively on key documents that warrant deep analysis.
- ๐ Auto-Maintenance (v1.4.0): Optional file watcher, periodic Lint, and startup health check. All default OFF โ enable only if you want automatic background processing.
๐ก๏ธ Safety: Parallel generation uses
Promise.allSettledโ if one page fails, others continue. Failed pages are retried individually with exponential backoff. Smart Batch Skip (v1.7.7) automatically detects already-ingested files to save time and API costs.
โจ Features
๐ Knowledge Quality
- ๐ Entity/Concept Extraction โ LLM extracts entities (people, orgs, products, events) and concepts (theories, methods, terms) from your notes with flexible extraction granularity (Minimal
5 items, Coarse10, Standard50, Fine100, Custom 1โ300) to balance analysis depth vs. API cost - ๐ท๏ธ Mandatory Page Aliases โ Every generated page includes at least 1 alias (translation, acronym, alternate name), enabling cross-language duplicate detection
- ๐ Duplicate Detection & Merge โ Semantic tiering catches true duplicates (cross-language translations, abbreviations, spelling variants); intelligent LLM merge fuses content and preserves aliases
- ๐งฉ Smart Knowledge Fusion โ Multi-source updates merge new info without redundancy, contradictions preserved with attribution,
reviewed: truepages protected from overwrite - ๐ Content Truncation Protection โ 8000 max_tokens with automatic stop_reason detection and retry at 2ร tokens across all providers
- ๐ Verbatim Source Mentions โ Original language quotes preserved with optional translation for traceability
๐ ๏ธ Maintenance
- ๐ Lint Health Scan โ Detects duplicates, dead links, empty pages, orphans, missing aliases, and contradictions in one comprehensive report
- ๐ฏ Semantic-Tier Duplicate Detection โ Tier 1 (direct name matches: cross-language, abbreviations, high-similarity titles) always verified; Tier 2 (indirect signals: shared links, moderate similarity) fills token budget
- โก Smart Fix All โ Causality-ordered batch fix: duplicates merged โ dead links resolved โ orphans linked โ empty pages expanded
- ๐ท๏ธ Alias Completion โ One-click parallel batch generation of missing aliases, improving future duplicate detection
- ๐ Auto-Maintenance โ Multi-folder file watcher, periodic lint, startup health check (all optional)
- โ ๏ธ Contradiction State Machine โ
detected โ review_ok โ resolved(AI fix) ordetected โ pending_fix(manual)
๐ฌ Query & Feedback
- ๐ค Conversational Query โ ChatGPT-style dialog with streaming Markdown and
[[wiki-links]], multi-turn history - ๐ค Query-to-Wiki Feedback โ Save valuable conversations to Wiki with entity/concept extraction, semantic dedup before save
- ๐ Duplicate Save Prevention โ Hash tracking prevents re-evaluation of unchanged conversations
๐ LLM & Language
- ๐ Multi-Provider โ Anthropic, Anthropic Compatible (Coding Plan), Gemini, OpenAI, DeepSeek, Kimi, GLM, OpenRouter, Ollama, custom endpoints
- ๐ 5xx Retry โ Automatic exponential backoff retry (max 2) on HTTP 5xx/429 errors across all clients
- ๐ Dynamic Model List โ Real-time fetching from provider APIs
- ๐ Wiki Output Language โ 8 languages independent of UI (EN/ZH/JA/KO/DE/FR/ES/PT), with custom input
- ๐ Full UI Internationalization โ Plugin UI supports 8 languages (EN/ZH/JA/KO/DE/FR/ES/PT), 269+ UI fields fully translated with natural local expressions
- โก Rate Limit Guardian โ When parallel generation triggers rate limits, auto-detects and suggests: lower concurrency, increase batch delay, switch provider
- ๐ฆ Web Clipper Compatible โ One-click add Obsidian Web Clipper's
Clippings/folder to watch list, auto-ingest web clips into Wiki
๐๏ธ Architecture & Performance
- โก Parallel Page Generation โ Configurable 1โ5 concurrent pages, default 3 (parallel), 2โ3ร faster for large sources, error isolation per page
- ๐ Iterative Batch Extraction โ Adaptive batch sizing eliminates max_tokens bottleneck for long documents
- ๐๏ธ Three-Layer Architecture โ
sources/(read-only) โwiki/(LLM-generated) โschema/(co-evolved config) - ๐งฉ Modular Codebase โ 13 focused modules in
src/
โจ๏ธ Commands
| Command | Description |
|---|---|
| ๐ฅ Ingest single source | Select a note โ generate Wiki pages with entities, concepts, and summary |
| ๐ Ingest from folder | Select a folder โ batch generate Wiki from existing notes |
| ๐ Query wiki | Conversational Q&A over your Wiki, streaming responses with [[wiki-links]] |
| ๐ ๏ธ Lint wiki | Full health scan: duplicates, dead links, empty pages, orphans, missing aliases, contradictions |
| ๐ Regenerate index | Manually rebuild wiki/index.md |
| ๐ก Suggest schema updates | LLM analyzes Wiki and proposes schema improvements |
๐ Example
Input: sources/machine-learning.md
# Machine Learning
Machine learning uses algorithms to learn from data.
## Types
- Supervised learning
- Unsupervised learning
- Reinforcement learning
Output โ Entity page: wiki/entities/supervised-learning.md
---
type: entity
created: 2026-05-15
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..."
๐ค Model Selection Guide
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 | 2M context window, excellent for very large wikis |
| 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 | MiMo-V2.5-Flash | 1M tokens | Xiaomi's cost-effective option, 309B MoE architecture |
| 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 |
For local models (Ollama): context windows are typically smaller (8Kโ128K). Consider using a cloud provider for ingestion + local model for query.
๐ 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.
๐ก Subscription plans: Coding Plan, OpenAI Pro, or Anthropic Pro plans are excellent options for cost control with frequent use. This plugin supports these services.
๐๏ธ Architecture
Karpathy's three-layer separation design:
sources/ # ๐ Your source documents (read-only)
โ ingest
wiki/ # ๐ง LLM-generated Wiki pages
โ query / maintain
schema/ # ๐ Wiki structure configuration (naming, templates, categories)
Codebase (src/):
wiki/ # Wiki engine modules
wiki-engine.ts # ๐ฏ Orchestrator
query-engine.ts # ๐ฌ Conversational query
source-analyzer.ts # ๐ Iterative batch extraction
page-factory.ts # ๐๏ธ Entity/concept CRUD + merge
lint-controller.ts # ๐ Lint orchestration
lint-fixes.ts # ๐ ๏ธ Fix logic for dead links, empty pages, orphans
lint/ # Lint sub-modules
duplicate-detection.ts # ๐ Programmatic candidate generation
fix-runners.ts # โก Batch fix execution helpers
contradictions.ts # โ ๏ธ Contradiction detection
system-prompts.ts # ๐ฃ๏ธ Language directive + section labels
schema/ # Schema co-evolution
schema-manager.ts # ๐ Schema CRUD + suggestions
auto-maintain.ts # ๐ File watcher + periodic lint
ui/ # User interface
settings.ts # โ๏ธ Settings panel
modals.ts # ๐ฆ Lint/Ingest/Query modals
+ shared modules: llm-client.ts, prompts.ts, texts.ts, utils.ts, types.ts
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 log
โ FAQ
Keep your plugin updated. This project ships frequently โ new features and fixes land every few days. Run Settings โ Community Plugins โ Check for updates regularly.
For more, see the FAQ Discussion on GitHub.
๐ก General
What does the plugin actually do?
You drop notes in, it extracts people, concepts, and theories, then generates an interlinked wiki with [[bidirectional links]]. Ask questions and get answers grounded in your notes โ not internet hallucinations.
Minimum requirements? Obsidian v1.6.6+, desktop (Windows/macOS/Linux), an LLM provider API key. Ollama works locally with no API key. See Configure an LLM Provider above.
Which model should I use? See Model Recommendations above. Long-context models work best โ the larger your wiki, the more context the LLM needs.
๐ท๏ธ Aliases & Duplicates
Why does Lint show "missing aliases" on almost all my pages? Pages generated before v1.7.11 didn't include aliases. This is harmless โ aliases are an enhancement, not a bug. Click Complete Aliases in the Lint report to batch-generate translations, acronyms, and alternate names. Once aliases exist, duplicate detection and alias-aware search become much more effective.
Why do I see duplicate pages like "CoT" and "ๆ็ปด้พ"? Pre-v1.7.10 versions lacked alias-aware duplicate detection. Run Lint Wiki โ Merge Duplicates to fuse them. The merged page preserves aliases from both, preventing future duplicates.
How does duplicate detection work? (v1.7.10+) Two-tier semantic detection: Tier 1 (always LLM-verified) catches cross-language matches, abbreviations, high-similarity titles. Tier 2 fills remaining token budget with moderate-similarity candidates. Aliases are critical for Tier 1 โ run Complete Aliases if your pages are pre-v1.7.11.
What are "polluted pages"? (v1.9.0)
Pages with folder prefixes accidentally baked into filenames โ e.g. concepts/conceptsๅธๅฑไผๅ.md. Run Lint Wiki โ ๐งน Fix Polluted Pages to rename and update all incoming links.
โก Performance & Cost
How do I speed up ingestion? In Settings โ Ingestion Acceleration: increase Page Generation Concurrency to 3โ5 (parallel page creation), lower Batch Delay to 100โ300ms (watch for rate limits). Choose "Minimal", "Coarse", or "Standard" Extraction Granularity to reduce page count and save API costs.
Why am I getting HTTP 429 errors? The plugin auto-detects rate-limiting and suggests: lower concurrency to 1โ2, increase Batch Delay to 500โ800ms, or switch to a higher-limit provider.
How do I control API costs?
- Auto-Maintenance is OFF by default (enable only if you need background processing)
- Smart Batch Skip automatically skips already-ingested files
- "Standard" or "Coarse" granularity = fewer LLM calls
- Batch Delay > 500ms spaces calls without increasing token usage
- Lint report shows counts before you run fixes โ decide what's worth it
๐งน Maintenance
What does Smart Fix All do? Runs fixes in causality order (v1.9.0+):
- ๐งน Fix polluted pages โ 2. ๐ท๏ธ Complete aliases โ 3. ๐ Merge duplicates โ 4. ๐ Fix dead links โ 5. ๐ Link orphans โ 6. ๐ Expand empty pages
Lint freezes on a large Wiki? Upgrade to v1.7.17+ โ Lint now yields to Obsidian's UI thread every 50 pages, preventing multi-second freezes even on 1200+ page wikis.
๐ Troubleshooting
Query can't find pages I know exist? Three common causes: (1) Index is stale โ Regenerate index. (2) Missing aliases โ Complete Aliases. (3) Try different phrasing โ LLM does semantic matching, not keyword search.
Can I manually edit Wiki pages?
Yes. Set reviewed: true in frontmatter to protect from overwrite. Manual aliases, tags, and sources are preserved during merges.
Safe upgrade?
The plugin never modifies your source files. Backup wiki/ โ update plugin โ Regenerate index โ Lint Wiki โ fix selectively.
How do I get help?
- GitHub Issues โ bug reports
- GitHub Discussions โ questions & feedback
๐ License
MIT License โ see LICENSE.
๐ Acknowledgments
- ๐ก Concept: Andrej Karpathy's LLM Wiki โ the original vision that inspired this plugin
- ๐ ๏ธ Platform: Obsidian Plugin API
- ๐ LLM SDKs: Anthropic SDK, OpenAI SDK
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.