LLM Wiki: Using AI to Compile Your Personal Knowledge Base

    This article explains how to build an LLM Wiki, a structured, cross-referenced knowledge base compiled from scattered notes by a large language model. It clarifies how this pre-compilation approach differs from traditional RAG, then walks through a five-layer architecture, directory and page templates, an idempotent incremental compilation workflow, consistency checks, and a question flow that feeds answers back into the wiki. Engineering notes on privacy, cost, rollback, portability, and evaluation are included. Readers will learn how to turn an overflowing collection of bookmarks into an auditable personal encyclopedia that improves with use.

    1. The Problem: Collecting Is Forgetting

    Most people have a similar digital life: thousands of saved items sitting in a notes app, a link list that keeps growing, and almost none of it ever opened again. On the surface this looks like knowledge accumulation; in reality it is information hoarding. Once the number of entries crosses a certain threshold, the three traditional approaches—folders, tags, and full-text search—all fail at the same time. Classification systems require constant manual maintenance, tag semantics drift over time, and keyword search cannot express the relationships between concepts.

    The real bottleneck is not an insufficient volume of saved material but the absence of a digestion step: compressing source text into key points, attaching those points to topics, and drawing edges between topics. The core premise of LLM Wiki is to hand this step over to the model.

    2. Concept Clarification: LLM Wiki vs. RAG

    LLM refers to a large language model; Wiki refers to a structured knowledge site with cross-references. Combined, the term describes using a model to continuously organize scattered material into a personal encyclopedia with a table of contents, links, and incremental revisions.

    Traditional retrieval-augmented generation (RAG) is on-demand retrieval: every question triggers a temporary scan of the raw corpus, and selected fragments are stitched into the context. It is like asking the librarian to search the stacks again on every inquiry. The advantage is that no preprocessing is needed; the drawbacks are repeated labor, a limited context budget, and difficulty in reliably establishing cross-document relationships.

    LLM Wiki is pre-compilation: the corpus is first organized offline into pages and an index, and at query time only the relevant pages are read. The two are not replacements for each other. A common combination in practice is to let the Wiki carry long-term memory and structure while RAG serves as a fallback for looking up raw fragments that have not yet been compiled.

    3. Overall Architecture

    A working implementation can be split into five layers:

    1. Collection layer: a cloud notes app acts as the raw material pool, preserving original text, source, and timestamps.
    2. Convention layer: directory structure, page templates, and naming rules are agreed upon—this is the prerequisite for compilation.
    3. Compilation layer: an AI coding tool reads notes according to the rules and generates or updates Wiki pages.
    4. Validation layer: broken links, duplicate entries, orphan pages, and contradictory conclusions are checked.
    5. Consumption layer: at query time the index is read first, then the pages, and answers come with citations and update timestamps.

    The key design principle is “raw material is read-only, Wiki pages are writable.” The raw layer guarantees traceability, while the compilation layer can be overwritten repeatedly, preventing model rewrites from polluting the evidence chain.

    4. Directory and Template Conventions

    A four-level structure is recommended, using numeric prefixes to fix the ordering:

    1. wiki/
    2. 00-index.md # Master index: topic list + change log
    3. 10-concepts/ # Concept pages: one concept per page
    4. 20-topics/ # Topic pages: overview + links to concept pages
    5. 30-sources/ # Source pages: origin, date, credibility
    6. 40-open-questions.md # Pending verification and conflict records

    Keep page templates minimally sufficient:

    1. # Concept name
    2. - One-sentence definition:
    3. - Upstream dependencies: [[related concept]]
    4. - Common misconceptions:
    5. - Evidence: [[source page]] paragraph locator
    6. - Last updated: YYYY-MM-DD
    7. - Confidence: high/medium/low

    Bidirectional links and the confidence field may look plain, but they are the handles for later automated validation: links form a graph structure in which orphan nodes can be computed, while confidence and update time form a freshness metric that can be sorted to flag items for review.

    5. Incremental Compilation Workflow

    Break compilation into idempotent steps so that any step can be re-run after a failure:

    1. Scan: list notes with their modification times and filter out new or changed items.
    2. Extract: for each item, output key points, entities, conclusions, and uncertainties.
    3. Place: map key points to existing concept or topic pages, deciding whether to create or append.
    4. Merge: do not overwrite conflicting conclusions; write them to the pending-verification list with evidence from both sides.
    5. Write back: update the index, update timestamps, and the change log.

    An illustrative rules file (which an AI coding tool can load as a skill):

    1. rules:
    2. max_page_words: 600
    3. require_citation: true
    4. on_conflict: append_to_open_questions
    5. naming: "snake_case"
    6. update_index: always

    The more explicit the constraints, the more stable the output. A word limit forces the model to compress rather than copy; mandatory citations make every conclusion traceable; the conflict-handling policy prevents the model from arbitrarily “reconciling” contradictions.

    6. Consistency Checks and Health Reports

    After compilation, run an inspection that produces a readable health report, typically covering four kinds of problems: possibly stale entries (old update time and frequently referenced), missing associations (two topics share an entity but have no link), coverage gaps (topics that appear in the index but have no corresponding page), and duplicate entries (pages that are highly similar in meaning).

    Humans only confirm or reject; the tool performs the edits. This division of labor—suggest, confirm, execute—concentrates human effort on judgment rather than moving text around.

    7. Asking Questions and Feeding Knowledge Back

    Questions follow the order “index first, then pages, then the raw source if necessary,” and answers must include citations and update timestamps. More importantly, write the Q&A results back into the Wiki: new clarifications are added to concept pages, and new disagreements go to the pending-verification list. The more you use it, the thicker the pages get and the lower the cost of repeated explanation—this is where the compounding effect comes from.

    8. Engineering Considerations

    • Permissions and compliance: note content may contain sensitive information, so redact and minimize data transfer before calling a model, and keep only summaries of sensitive material.
    • Cost control: recompile only changed content; process long documents in segments; cache and reuse stable pages.
    • Rollback: put the Wiki directory under version control and make one commit per compilation, making it easy to locate the source of an error.
    • Portability: directories and templates are plain text and can be moved to object storage or a code repository, avoiding lock-in to a single tool.
    • Evaluation: use a fixed set of questions to measure hit rate and citation accuracy, and watch the improvement curve over time.

    9. Conclusion

    The value of LLM Wiki lies not in smarter retrieval but in turning “read—compress—connect—revise” into a repeatable engineering process. Once a knowledge base has a table of contents, citations, timestamps, and conflict records, it stops being a bookmark folder that gets messier with use and becomes a personal encyclopedia that can be continuously compiled and audited.