AIToday

LLM Wiki — Desktop App Turns Documents Into Self-Updating Knowledge Base

Hacker News1d ago
LLM Wiki — Desktop App Turns Documents Into Self-Updating Knowledge Base

Key takeaway

LLM Wiki is a new desktop application that automatically converts your documents into an organized, self-updating knowledge base using LLMs. Rather than re-analyzing documents on every query, it builds a persistent wiki once and keeps it current—with a knowledge graph that shows connections between pages, a relevance model that ranks related information, and a chat agent that can search the wiki and generate files. The system supports multiple document formats, tracks source origins, and includes a web research feature for gap-filling.

Summaries like this, in your inbox every morning.

Sign up free →

3 Key Points

  • What happened

    A new cross-platform desktop application called LLM Wiki automatically builds and maintains a structured, interconnected knowledge base from user documents. The system reads PDFs, Office files, web clips, and other formats, generates wiki pages with source citations, and keeps the base current through incremental updates. It adds features beyond the original pattern—a knowledge graph with relevance scoring, community detection, web research integration, and a chat agent that can query the wiki and generate output files.

  • Why it matters

    Instead of repeatedly asking an AI to retrieve and answer from raw documents each time (traditional RAG), LLM Wiki compiles knowledge once into persistent, interlinked pages—saving tokens, time, and keeping the base consistent. For knowledge workers, researchers, and teams, this means a searchable, graph-aware personal or organizational reference that the LLM maintains automatically as new material arrives. The system preserves source links, so answers are traceable.

  • What to watch

    The app includes a local HTTP API (port 19828), an MCP server for AI integration, and a Chrome web clipper for one-click document capture. It supports multiple LLM providers and can be self-hosted. The project is based on Andrej Karpathy's LLM Wiki pattern and is maintained by nash_su, with templates for Research, Reading, Personal Growth, Business, and General use cases.

In Depth

LLM Wiki is a cross-platform desktop application that automatically builds and maintains a persistent, interlinked knowledge base from user documents. Unlike traditional retrieval-augmented generation (RAG), which re-analyzes source material on every query, LLM Wiki compiles knowledge once into a structured wiki and keeps it current as new documents arrive.

The system's architecture consists of three layers, adapted from Karpathy's LLM Wiki pattern: Raw Sources (immutable original documents), Wiki (LLM-generated pages and indexes), and Schema (structural rules and configuration). Users can ingest multiple document formats—PDF, Office documents, EPUB/MOBI, Org mode, images, media, web clips, and batches of URLs—via a persistent queue that survives application restarts. A SHA256 incremental cache ensures that unchanged files are skipped, saving LLM tokens. Folder imports preserve directory structure and pass context to the LLM for better classification. The app automatically detects external changes in the raw/sources/ folder and syncs them with ingest or deletion, keeping the system in sync without manual intervention.

The ingest process uses a two-step chain-of-thought approach. In Step 1, the LLM analyzes the source material to identify key entities, concepts, arguments, and connections to existing wiki content, as well as contradictions or gaps. In Step 2, the LLM generates wiki files—source summaries with YAML frontmatter linking back to original sources, entity and concept pages with cross-references, and updated index and log files. The system also flags items for human review and can suggest web research queries to fill gaps. Every generated page includes a sources[] field in its frontmatter, ensuring full source traceability.

The application features a three-column desktop interface: a Knowledge Tree and File Tree on the left, a Chat panel in the center, and a Preview pane on the right. An icon sidebar switches between Wiki, Sources, Search, Graph, Lint, Review, Deep Research, and Settings views. All state—conversations, settings, review items, and project configuration—persists across restarts. Users can select from predefined scenario templates (Research, Reading, Personal Growth, Business, General) that pre-configure purpose.md (the wiki's goals and scope) and schema.md (structural rules).

LLM Wiki includes a knowledge graph with advanced relevance modeling. The system applies a 4-signal relevance model that scores connections between pages: direct [[wikilinks]] receive a ×3.0 weight, shared raw sources receive ×4.0, common neighbors (Adamic-Adar) receive ×1.5, and same-type pages receive ×1.0 bonus. Graph visualization uses sigma.js, graphology, and ForceAtlas2 layout; node colors represent page types or discovered communities, node sizes reflect link count (√ scaled), and edge thickness and color indicate relevance weight. Louvain community detection automatically discovers knowledge clusters based on link topology and scores each cluster by cohesion (intra-edge density); clusters with cohesion below 0.15 are flagged as sparse. The Graph Insights feature detects surprising connections (cross-community edges, peripheral-to-hub couplings) and knowledge gaps (isolated pages, sparse communities, bridge nodes connecting multiple clusters), ranking them by a composite surprise score. Users can click any insight to highlight the corresponding nodes and edges; knowledge gaps and bridge nodes have a one-click Deep Research button.

Query retrieval uses a multi-phase pipeline. Phase 1 applies tokenized search (word splitting and stop-word removal in English; CJK bigram tokenization in Chinese), with title matches receiving a +10 score bonus. Phase 1.5 optionally adds vector semantic search via any OpenAI-compatible /v1/embeddings endpoint, storing embeddings in LanceDB (Rust backend) for fast approximate nearest neighbor retrieval; semantic results are merged with keyword matches. Phase 2 applies graph expansion, using top search results as seed nodes and following 2-hop connections ranked by the 4-signal relevance model. Phase 3 controls context budget, with configurable token limits (4K to 1M) and proportional allocation across wiki pages (60%), chat history (20%), index (5%), and schema (15%).

The app includes a Rust backend chat agent that can read wiki, source, and graph data, perform web retrieval, generate workspace files, and execute shell commands with user approval. Local "skills" (SKILL.md files) can be scanned and enabled; users select skills with /skill and the agent reads instructions on demand. Generated outputs—Markdown, HTML, images, and other files—appear in an Outputs preview with quick folder access. Mermaid diagram code blocks render directly in chat and preview, with compact error cards instead of raw parser output. An async review system flags items for human judgment with predefined actions and pre-generated search queries.

A Chrome web clipper enables one-click web page capture with auto-ingest into the knowledge base. The system exposes a local HTTP API on 127.0.0.1:19828 for JSON queries, a bundled MCP (Model Context Protocol) server for hybrid search and file operations, and a ready-made agent skill that installs into Claude Code or Codex with one command (npx skills add …). All state is portable: users can export and import complete project archives across devices and rebuild the wiki index from existing pages. The project is cross-platform (desktop) and supports multiple LLM provider configurations, allowing independent routing of Chat and Ingest calls to different models with custom headers and streaming output.

Context & Analysis

LLM Wiki adapts Andrej Karpathy's LLM Wiki pattern—a methodology for using LLMs to build and maintain personal knowledge bases—into a fully-featured desktop application. The original pattern is abstract and relies on an LLM agent to implement; this project is a concrete, cross-platform implementation with substantial enhancements. The core architecture remains faithful: immutable raw sources feed into an LLM-generated wiki, which is governed by structural rules and purpose statements. However, the application layer transforms how that architecture is used.

The most significant innovation is the two-step chain-of-thought ingest process. Rather than analyzing and generating wiki pages in a single LLM pass, the system splits the work into an analysis phase (identifying entities, concepts, connections, and contradictions) followed by a generation phase (producing wiki files with source citations). This separation, combined with SHA256 incremental caching and a persistent queue, reduces token waste and makes the system resilient to interruptions—a key advantage for large or evolving document collections.

A second major addition is the knowledge graph with relevance scoring and community detection. The original pattern uses [[wikilinks]] for cross-references but does not visualize or analyze the resulting graph structure. LLM Wiki applies a weighted 4-signal model (direct links, source overlap, shared neighbors, type affinity) to rank page relationships, then uses Louvain clustering to discover natural knowledge areas. The system then proactively surfaces "surprising connections" (cross-cluster edges that may indicate novel insights) and "knowledge gaps" (isolated or sparsely-connected pages that may need research or deeper coverage). This transforms the wiki from a static repository into an actionable intelligence tool.

The chat agent and Deep Research feature extend the system beyond passive storage. Users can query the wiki with full graph context, request the LLM to fill knowledge gaps via web search (using Tavily, SerpApi, or SearXNG), and auto-ingest the results back into the wiki. The agent can read local "skill" files and execute approved workspace commands, making the system programmable within a larger workflow.

FAQ

What document formats does LLM Wiki support?
The system ingests PDF, Office documents, EPUB/MOBI, Org mode, images, media, web clips, and batches of URLs. PDF processing can be done via built-in, cloud, or local MinerU.
How does LLM Wiki keep the knowledge base current?
A SHA256 incremental cache skips unchanged source files automatically. Files added, edited, or deleted in the raw/sources/ folder are detected automatically and processed via the same ingest lifecycle. The system maintains a persistent queue that survives app restarts and can retry failed tasks up to 3 times.
Can I integrate LLM Wiki with other AI tools?
Yes—the app includes a local HTTP API on 127.0.0.1:19828, a bundled MCP server for hybrid search and graph traversal, and a ready-made agent skill that installs into Claude Code with one command (npx skills add …).
What is the knowledge graph and how does it work?
LLM Wiki builds a 4-signal relevance model that scores connections by direct links (×3.0 weight), source overlap (×4.0), shared neighbors via Adamic-Adar (×1.5), and page type affinity (×1.0). It uses Louvain community detection to automatically discover knowledge clusters, and surfaces "surprising connections" and "knowledge gaps" (isolated or weakly-linked pages) as actionable insights.

Get the latest Large Language Models news every morning

AI-summarized, only the topics you pick — one digest a day via Email, Slack, or Discord.

Free · takes 30 seconds · unsubscribe anytime

Discussion

No comments yet. Be the first to share your thoughts!

Log in to join the discussion

Related Articles

Stay ahead with AI news

Get curated AI news from 200+ sources delivered daily to your inbox. Free to use.

Get Started Free

Free · takes 30 seconds · unsubscribe anytime

1 minute a day. The AI essentials.

200+ sources · Email / LINE / Slack

Get it free →