Karpathy LLM Wiki Obsidian Plugin

repository·main·Indexed 43 days ago

https://github.com/green-dalii/obsidian-llm-wiki

An Obsidian plugin that implements graph-based RAG (Retrieval-Augmented Generation) using existing note links instead of vector embeddings. It transforms notes into a queryable knowledge base using Personalized PageRank and Monte Carlo PPR. Supports local LLM providers like Ollama and LM Studio, as well as 16+ cloud providers. Features multi-format ingestion for Markdown, PDF, and Office files, and integrates with the Dataview plugin.

Tokens
54K
Snippets
58
Records
230
Agent score
57%

What's inside Karpathy LLM Wiki

  1. Overview of Karpathy LLM Wiki for Obsidian

    main

    Karpathy LLM Wiki is an Obsidian plugin that transforms your existing notes into an interconnected, searchable knowledge base (Wiki) based on the Karpathy LLM Wiki concept.

    Unlike traditional RAG (Retrieval-Augmented Generation) systems that rely on heavy vector databases and embedding models, this plugin uses a zero-embedding, graph-based retrieval approach. It leverages your existing [[wiki-links]] and uses Personalized PageRank (PPR) to navigate your knowledge graph, making it lightweight, local-first, and privacy-friendly.

    Key characteristics:

    • Zero Dependencies: No external vector databases, no embedding models, and no Python/Docker required. Everything runs inside Obsidian.
    • Graph-Based Retrieval: Uses Personalized PageRank (Haveliwala 2002) and Monte Carlo PPR (Fogaras 2005) for high-accuracy retrieval without embeddings.
    • Multi-Format Ingestion: Supports PDF, images, and Office files via MinerU integration.
    • Extensive LLM Support: Compatible with 16+ providers (Anthropic, OpenAI, Bedrock, Gemini, DeepSeek, Ollama, etc.) without requiring specific embedding endpoints.
    • Local-First & GDPR Friendly: Designed to work within your vault with minimal external overhead.
  2. Overview of Karpathy LLM Wiki Plugin

    main

    The Karpathy LLM Wiki plugin for Obsidian transforms your existing Obsidian notes into a connected, queryable knowledge base. Unlike traditional RAG (Retrieval-Augmented Generation) systems that rely on embedding models and vector databases, this plugin uses a graph-based retrieval method (Personalized PageRank and Monte Carlo PPR) over your existing [[wiki-links]].

    Key Characteristics:

    • Zero-embedding architecture: No vector database or embedding models required; it uses your note links for retrieval.
    • Local-first & Private: Runs entirely within Obsidian. Supports local LLM providers like Ollama and LM Studio for complete data sovereignty.
    • Multi-format Ingest: Supports Markdown, PDF, images, and Office files (DOCX, PPTX, XLSX).
    • Extensive LLM Support: Compatible with 16+ providers including Anthropic, OpenAI, Bedrock, Gemini, DeepSeek, and more.
    • Native Obsidian Integration: Uses Obsidian's native Graph View to visualize the generated wiki links.
  3. Overview of Karpathy LLM Wiki Plugin for Obsidian

    main

    The Karpathy LLM Wiki Plugin transforms your Obsidian notes into a connected, queryable knowledge base based on the Karpathy LLM Wiki concept.

    Unlike traditional RAG (Retrieval-Augmented Generation) systems that rely on vector databases and embedding models, this plugin uses graph-based retrieval (Personalized PageRank) directly on your Obsidian [[wiki-links]]. This allows for a 'zero-embedding' and 'zero-vector-DB' architecture that is local-first, privacy-compliant (GDPR), and has no external runtime dependencies.

    Key Characteristics:

    • Integrated Runtime: Runs entirely within Obsidian using its native Graph View, ribbon, and command palette.
    • Zero Dependencies: No Python, Docker, or external databases required. It uses the existing Obsidian vault structure.
    • Multi-format Ingest: Supports native ingestion of PDFs, images, and Office documents (via MinerU).
    • Extensive LLM Support: Compatible with 16+ providers (Anthropic, OpenAI, Bedrock, Gemini, DeepSeek, Ollama, etc.) without requiring embedding endpoints.
  4. Determine if Karpathy LLM Wiki is right for you

    main

    Use this plugin if:

    • You want a 5-minute setup without CLI, Python, separate runtimes, or vector databases.
    • You want a self-contained solution with zero external dependencies (no external embedding models or Docker containers).
    • You want a searchable chat that answers based only on your notes, providing [[wiki-links]] back to your graph.
    • You prioritize data sovereignty (works locally with Ollama or LM Studio).
    • You want to maintain your graph automatically by writing [[wiki-links]] during ingestion.
    • You want automated maintenance via Lint and Smart Fix All.

    Do NOT use this plugin if:

    • You want a general-purpose ChatGPT replacement (it only knows your vault).
    • You need RAG on massive external corpora (e.g., Confluence, Notion, arXiv); it is designed for your local vault and independent PDF/Office files.
    • You need a SaaS/Collaborative backend; everything runs locally within your Obsidian instance.
  5. Integrate the plugin with the Obsidian ecosystem

    main

    The Karpathy LLM Wiki plugin is designed to work seamlessly with your existing Obsidian stack without requiring code modifications. It integrates with the following tools:

    • MinerU Backend: Integrated since v1.27.0 for multi-format document/PDF/image ingestion. You can use the online service or self-host MinerU.
    • Obsidian Graph View: Every [[wiki-link]] becomes a node and every backlink an edge in the native graph view.
    • Obsidian Web Clipper: Use the official browser extension to save web content (articles, Reddit, YouTube transcripts, etc.) to your vault, then use the plugin's "Ingest from folder" command to extract entities and concepts in batch.
    • Dataview: The plugin writes standard frontmatter (tags:, type:, aliases:) to every page, allowing you to query your wiki as a database using DQL or the JS API.
    • Git: Since the plugin only creates new pages under wiki/ and never rewrites your source files, git diff clearly separates your manual edits from LLM-generated content.
    • Marp Slides: Wiki pages are pure Markdown and can be transformed into presentations using the Marp frontmatter (marp: true).
    • Canvas: Use the native Obsidian Canvas to arrange wiki cards for study guides or research synthesis using [[wiki-links]].
    • Obsidian Nous: A complementary plugin for local voice memo capture that generates transcribed wiki hub pages independently.
  6. Why use the Karpathy LLM Wiki plugin?

    main

    The Karpathy LLM Wiki plugin is designed to turn your Obsidian vault into a structured knowledge wiki using LLMs. Unlike other implementations that require CLI tools, Python environments, or external vector databases, this plugin runs entirely within Obsidian.

    Key advantages:

    • Zero Dependencies: No external vector DB, no embedding models, and no Python runtime required. It uses your existing [[wiki-links]] and graph structure.
    • Obsidian Native: It uses Obsidian's built-in Graph View and Command Palette. It lives inside your vault from the moment you click 'Ingest'.
    • Broad LLM Support: Supports 16+ providers (including Anthropic, OpenAI, Gemini, DeepSeek, Ollama, LM Studio, and OpenRouter) without requiring an embedding endpoint.
    • Data Sovereignty: Can work completely offline using local providers like Ollama or LM Studio.
    • Automated Maintenance: Includes 'Lint' scanning and 'Smart Fix All' to manage duplicates, dead links, and orphaned pages.
  7. What is Karpathy LLM Wiki and who is it for?

    main

    Karpathy LLM Wiki is an Obsidian plugin that transforms your notes into a structured wiki using LLMs. It is designed for users who want a zero-dependency, local-first RAG (Retrieval-Augmented Generation) experience within Obsidian.

    ✅ Use this if you want:

    • Fast Setup: 5-minute configuration without CLI, Python, or external vector databases.
    • Self-contained Architecture: Everything lives inside Obsidian; no external Docker containers or pip packages required.
    • Knowledge Graph Integration: The plugin writes [[wiki-links]] back to your vault, enriching your graph automatically.
    • Data Sovereignty: Works fully offline with local providers like Ollama or LM Studio.
    • Multilingual Support: Supports 11 languages for both UI and wiki output.
    • Automated Maintenance: Uses Linting and "Smart Fix All" to manage duplicates and dead links.

    ❌ Do NOT use this if you:

    • Need a general ChatGPT replacement: It only answers based on your vault, not the internet.
    • Need RAG on massive external corpora: It is designed for your Obsidian vault and independent PDF/Office files, not massive external datasets like Confluence or arXiv.
    • Need a collaborative SaaS: There is no backend or shared state; it runs entirely locally within your Obsidian instance.
  8. Overview of PDF Ingestion and OCR Paths

    main

    The Karpathy LLM Wiki plugin offers four distinct paths for ingesting documents (PDF, images, Office files), all of which share a single Markdown output cache. The primary difference between these paths is which model/engine performs the processing.

    PathProcessing LocationDescription
    Cloud Provider (Native PDF)Your configured LLM provider (Anthropic, OpenAI, Google, AWS Bedrock)The plugin sends PDF bytes as a file part to the provider's API. Processing happens in the provider's region (e.g., US by default).
    Built-in MinerU Backendhttps://mineru.net/api/v4 (OpenDataLab)A managed service that handles complex multi-modal parsing (text, images, formulas, tables) and converts them to Markdown.
    Local OCR (Apple Silicon)Your local machine (via oMLX + Markitdown)A fully local pipeline using oMLX and Markitdown. Documents never leave your machine.
    External MarkdownExternal to the pluginYou provide pre-converted Markdown text; the plugin simply ingests it as a standard text source.

    Privacy Note: Using the MinerU backend involves uploading documents to mineru.net. For legal, medical, or privacy-sensitive data, use the Local OCR path or a cloud provider with which you have a Data Processing Agreement (DPA).

  9. How the 5-stage seed selection cascade works

    main

    Unlike traditional RAG (Retrieval-Augmented Generation) that uses vector embeddings and chunking, this plugin retrieves information by traversing the existing [[wiki-link]] graph. When a query is made, it executes a 5-stage selection cascade that stops as soon as sufficient signal is found:

    1. Lexical Fast Path: Direct token overlap check against entity/concept titles and aliases. This is instant and free.
    2. LLM Keyword Generation: The LLM proposes 8–12 cross-lingual keywords to handle synonyms and abbreviations.
    3. Local Substring Scan: Keywords are matched locally against page titles, aliases, and body snippets (no extra LLM calls).
    4. KB LLM Fallback: If lexical/keyword scans are weak, the LLM performs a semantic pass over the entire wiki to re-seed top-N candidates.
    5. PPR Graph Expansion: Uses Personalized PageRank (PPR) on the [[wiki-link]] graph starting from the seed candidates to provide multi-hop context (e.g., connecting "Bill Gates" $\rightarrow$ "Microsoft" $\rightarrow$ "competitors").
  10. Configure Entity and Concept Extraction

    main

    The plugin uses LLMs to extract entities (people, organizations, products, events) and concepts (theories, methods, terms) into standalone wiki pages.

    Key Features:

    • Configurable Granularity: You can adjust the depth of extraction (from Minimal to Fine, plus Custom) to balance extraction depth against LLM costs.
    • Mandatory Aliases: Every generated page includes at least one alias (translation, abbreviation, or variant) to enable cross-language duplicate detection.
    • Custom Tag Vocabulary: You can define your own entity and concept type tags. Navigate to Settings → Wiki → Tag-Vokabular → Custom to inject your schema. Note that this is a schema-injection hint; local models may still drift from this taxonomy, but the plugin will report discrepancies via Linting.
  11. Manage the Wiki Cache and Sidecar Files

    main

    The plugin manages converted content and file storage through the following mechanisms:

    • Bounded Cache: Converted Markdown is stored in .obsidian/plugins/karpathywiki/pdf-cache/. It is indexed by content hash, model, and converter version. Limits: 100 MB total / 1000 entries / 10 MB per entry (uses LRU-by-mtime eviction).
    • Sidecar Markdown: To write converted files directly to your vault instead of just the cache, enable Write PDF Markdown to Vault in Paramètres → Configuration Wiki → Dossier Wiki. This creates <basename>.pdf.md next to the source.
    • Verbatim Citations: Every generated sources/<slug>.md page includes a Mentions in Source section containing verbatim citations to ensure the wiki page is anchored to the actual text of the source document.
  12. Privacy and Data Security

    main

    The plugin is designed with a local-first privacy model:

    • No Backend: There is no central server or data collection. The software runs entirely within Obsidian.
    • Opt-in Network Access: Network access is only used to communicate with the specific LLM provider you configure. You control which provider receives the text you explicitly send for ingestion or queries.
    • Vault Access: File access is limited to managing the wiki (reading notes, generating pages, scanning dead links, detecting duplicates). The plugin never modifies your source files.
    • Clipboard Access: Access to the clipboard is only used when you manually click the "Copy" button in the Query modal.
    • Full Locality: For maximum privacy, use local providers like Ollama or LM Studio so that data never leaves your machine.