LLM Knowledge Compilation: From Bookmark Hoarding to a Knowledge Wiki
Saved articles and notes often create an illusion of accumulation without real understanding. This article explains why bookmark collections turn into forgotten information, contrasts retrieval-augmented generation (RAG) with knowledge compilation, and outlines a practical four-layer architecture for building an intelligent wiki with LLMs. It also covers data ingestion and cleaning, agent-based review and health reports, and the risks involved in reorganizing, writing back, and rolling back changes.
After Collecting, Where Does Knowledge Go?
Many developers have hundreds of “read later” articles on their phones and thousands of saved items and idea fragments in note-taking apps. This content looks like accumulation, but most of it is never truly digested. When it is time to write a proposal, make a technical choice, or prepare a presentation, people often search through their notes and still cannot find the key information, let alone connect several sources into a coherent judgment.
The reason collections easily become forgotten information is that the information is not processed. When reading an article, readers rarely compare it with existing material or record how it affects their work. Over time, more and more material accumulates, but no directly usable knowledge is formed.
Traditional organization methods gradually fail as volume grows. Tag systems become inconsistent over time, and the same concept may map to three or four tags. The deeper the folder hierarchy, the harder it is to find an entry point. Keyword search only matches literal text. It cannot recognize that “vector store” and “vector database” refer to the same kind of thing, nor can it determine whether two articles discuss the same problem.
How RAG Differs from Knowledge Compilation
In the past year or two, some developers have proposed the idea of an “LLM Wiki.” Its core is to change the relationship between large models and source material. To understand this idea, it helps to first look at the most common current approach.
How Retrieval-Augmented Generation (RAG) Works
RAG usually involves several steps. The system first splits material into chunks and builds a vector index or keyword index for each chunk. When a user asks a question, the system retrieves several relevant fragments from the index, concatenates them into the prompt, and passes the result to a large model to generate an answer.
This approach is practical for large-scale material, but it has several inherent limitations. First, answer quality depends on retrieval quality. If chunking is unreasonable, key information may be cut off; if too few chunks are retrieved, the fragments needed for an answer may never enter the context. Second, the context window has a limit. Retrieving too much consumes space and increases inference cost. Third, each question triggers an independent retrieval process. The model does not remember conclusions produced by a previous organization pass, and cross-document connections must be assembled anew each time.
How Knowledge Compilation Works
Knowledge compilation moves organization work earlier. A large model first reads through a batch of material, extracts concepts, summaries, and conclusions, generates several structured wiki pages, and creates links between pages. Later Q&A can consult these pages directly instead of searching the original material again each time.
The cost of this approach is maintenance. When new material is added, the system needs to determine which pages it affects and whether it supplements, corrects, or overturns existing conclusions. Without this handling, pages will contradict one another, and the wiki’s credibility will decline. Therefore, the effectiveness of knowledge compilation depends on three things: the quality of the source material, the prompts and rules used during compilation, and the frequency of human review.
How the Two Approaches Work Together
The two approaches do not replace each other. When material volume is large, retrieval is still needed to locate original documents. A more reasonable approach is to use the compiled wiki as an index layer: first find relevant pages in the wiki, then return to the original material as needed for evidence. This preserves both the advantages of structured knowledge and the traceability of source text.
Architecture for an Intelligent Wiki
A system that can be implemented usually contains four parts.
The data ingestion layer is responsible for obtaining material from note platforms or local directories and recording sync progress.
The compilation layer consists of agents and large models. Agents schedule tasks, while large models read, review, and generate page drafts.
The review layer generates health reports and provides a diff comparison before write-back for human confirmation.
The publishing layer writes confirmed pages into the wiki directory, keeps backups, and supports rollback.
The boundaries between these four layers must be clear. The compilation layer should not directly have permission to write all notes, and the publishing layer should not overwrite original material without confirmation.
Implementation Step 1: Data Ingestion and Cleaning
Data ingestion is the foundation of the entire workflow. Common problems include authentication failures, missed pagination, rate limiting, and duplicate syncs.
The following points matter in practice.
- Authentication: Use an access token. Read the token from environment variables, and do not write it into code or logs. Grant the token only the permissions needed to read and write specified directories.
- Pagination: APIs usually return results page by page. The code must keep requesting until there is no next page, rather than reading only the first page.
- Rate limiting and retries: On 429 or 5xx status codes, retry with exponential backoff and set timeouts to avoid blocking threads for long periods.
- Incremental sync: Record the timestamp of the last sync (the watermark) and fetch only notes updated since then. Write sync progress to a local file so an interrupted task can resume from the breakpoint.
- Cleaning rules: Remove blank lines and duplicate tags, normalize title formats, strip advertising paragraphs introduced by clipping, and organize metadata into consistent front matter.
- Desensitization: Before sending content to the model, replace sensitive information such as phone numbers, email addresses, and keys using rules. Rules can cover only common formats, so manual spot checks are still needed before sending.
The cleaning result should preserve the original meaning. If cleaning changes numbers, version numbers, or citation relationships, later compilation conclusions will be built on incorrect input.
Implementation Step 2: Agent Review and Health Reports
A health report is a diagnosis performed before compilation. Its goal is to let the model identify problems, not to rewrite content directly.
Recommended checks are as follows.
- Timeliness: Whether version numbers, API names, industry data, or prices may be outdated, with the basis for the judgment and the date noted.
- Relatedness: Whether two notes discuss the same problem, have an evolutionary relationship, or complement each other.
- Gaps: Whether existing content lacks a prerequisite concept, or whether an obviously related topic has not been included.
- Conflicts: Whether two notes describe the same fact inconsistently.
- Duplicates: Whether content is highly similar and can be merged.
- Permissions: Whether a note has access restrictions and whether compilation results would expand its visibility.
- Sensitive information: Whether content contains keys, personal information, or internal addresses.
Reports should be output in JSON format for programmatic reading. An example field structure follows. Note that the example data is fictional:
{"note_id": "note_101","outdated": [{"item": "Deployment method for a framework v1.2", "reason": "The original post was published two years ago, and the major version has been updated", "confidence": 0.7}],"related_notes": ["note_102", "note_245"],"gaps": ["Missing a basic concept page for 'vector index'"],"conflicts": [],"duplicates": [],"sensitive": false,"needs_update": true}
Acceptance criteria can be made more specific. For example, extract 30 reports and have a human judge whether each “outdated” conclusion in the report holds. If the false-positive rate exceeds a set threshold, adjust the prompts or add examples rather than launching directly.
Implementation Step 3: Reorganization, Write-Back, and Rollback
This step carries the highest risk because it modifies
