About this project

# LLM Wiki LLM Wiki is a cross-platform desktop application that transforms your documents into an organized, interlinked knowledge base automatically. Instead of traditional RAG (retrieve-and-answer from scratch every time), the LLM incrementally builds and maintains a persistent wiki from your sources. Knowledge is compiled once and kept current, not re-derived on every query. This project is based on [Karpathy's LLM Wiki pattern](https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f) — a methodology for building personal knowledge bases using LLMs. ## Key Features ### Two-Step Chain-of-Thought Ingest - LLM analyzes first, then generates wiki pages with source traceability and incremental cache - SHA256 incremental cache — unchanged files are skipped automatically, saving tokens and time - Failed tasks auto-retry up to 3 times - Language-aware generation (English or Chinese) ### Multimodal Image Ingestion - Extract embedded images from PDFs - Generate factual captions with a vision LLM - Surface images in image-aware search results with lightbox preview and jump-to-source ### Multi-format Document Parsing - PDF, Office documents, EPUB/MOBI, Org mode, images, media, web clips, and batches of URLs - Built-in, cloud, or local MinerU PDF processing - DOCX via docx-rs — headings, bold/italic, lists, tables → structured Markdown - Web clips via Readability.js + Turndown.js → clean Markdown ### Flexible Model Configuration - Configure models per project - Route Chat and Ingest independently - Manage custom providers, headers, and streaming output - Multi-provider support: OpenAI, Anthropic, Google, Ollama, Custom ### Source-grounded Retrieval - Read Sources Only mode to answer exclusively from original imported material - 4-Signal Knowledge Graph: relevance model with direct links, source overlap, Adamic-Adar, and type affinity - Louvain Community Detection — automatic knowledge cluster discovery with cohesion scoring - Graph Insights — surprising connections and knowledge gaps with one-click Deep Research ### Vector Semantic Search (Optional) - Embedding-based retrieval via LanceDB - Supports any OpenAI-compatible endpoint - Disabled by default; enabled in Settings with independent endpoint, API key, and model configuration - Benchmark: overall recall improved from 58.2% to 71.4% with vector search enabled ### Rust Backend Chat Agent - Tool-using Agent runtime with wiki/source/graph/web retrieval - Workspace file generation, shell approval, cancellation, and streaming tool events - Agent Skills — scan and enable local `SKILL.md` folders, select skills with `/skill` - Generated workspace outputs appear as previews with quick folder access - Safer execution model — project workspace commands can continue smoothly, while external shell commands require explicit approval ### Deep Research - Web search via Tavily, SerpApi, or SearXNG with full content extraction - Multiple search queries per topic, LLM-generated at ingest time - User confirmation dialog — editable topic and search queries shown for review - Research Panel with dynamic height and real-time streaming progress ### Project Management - Export and import complete project archives across devices - Rebuild the Wiki index from existing pages - Folder import preserving directory structure - Delete source files removes their wiki summary page - 3-method matching finds related wiki pages ### Obsidian Compatibility - Wiki directory works as an Obsidian vault - Auto-generated `.obsidian/` directory with recommended settings ### Additional Features - Three-column layout: Knowledge Tree / File Tree (left) + Chat (center) + Preview (right) - Activity panel with real-time processing status - Scenario templates: Research, Reading, Personal Growth, Business, General - Independent chat sessions with per-conversation persistence - Cited references panel with collapsible sections - Markdown rendering with KaTeX math and Mermaid diagrams - Context size slider from 4K to 1M tokens - Chrome Web Clipper extension with offline preview - Local HTTP API + MCP Server + AI Agent Skill - i18n — English + Chinese interface - GitHub Actions CI/CD for macOS, Windows, Linux ## Architecture The application uses a Rust backend for the chat agent and vector search, with a Tauri-based frontend. The wiki directory structure follows Karpathy's design with purpose.md, schema.md, index.md, log.md, and overview.md files. ## Getting Started 1. Install the application for your platform (macOS ARM/Intel, Windows .msi, Linux .deb/.AppImage) 2. Configure your LLM provider (OpenAI, Anthropic, Google, Ollama, or custom) 3. Import documents or folders 4. Let the LLM build your wiki automatically 5. Explore the knowledge graph, chat with your data, and run deep research ## License Open-source software licensed under the MIT license.