Compiled Knowledge Base
The ingestion philosophy underneath the "LLM wiki" pattern (Andrej Karpathy's framing): instead of retrieving from raw documents at query time, an LLM compiles knowledge once into a persistent, interlinked store of markdown files and keeps it current as new sources arrive. The contrast is with ordinary RAG — the gist Karpathy published states that most LLM-plus-documents setups (NotebookLM, ChatGPT file uploads, most RAG systems) rediscover knowledge from scratch on every interaction: ask a question that needs synthesizing five documents and the model has to find and re-piece the fragments every time; nothing is built up. A compiled knowledge base inverts this — on ingest the LLM reads a source, extracts the key information, and integrates it into the existing wiki (updating entity pages, revising topic summaries, noting where new data contradicts old, strengthening or challenging the running synthesis). The knowledge is compiled once and then maintained, not recomputed per query.
The distinguishing payoff is cross-source
connection: because sources are integrated rather than
summarized in isolation, the store surfaces relationships you would miss
reading each source separately — the demoed run ingested two model
documents and the value "that made it worth having as a wiki instead of
two separate summaries" was the link between them (the two
sources referenced each other; one benchmarked against a predecessor,
not the sibling model, using a different harness, so the numbers didn't
line up — a nuance easy to miss reading them apart). This is why a
compiled base is a Retrieval
Maturity Levels Level-2 "topic wiki" and not merely a folder of
notes: the wiki is the compiled synthesis, the raw/ folder
is the untouched source of truth, and a Context Routing file
(CLAUDE.md) owns the ingestion/structure/lint rules. It is
the eager-synthesis relative of the AI
Second Brain ("just files"), and it shares firehose's own spine —
markdown is the durable artifact; contradictions are held, not silently
overwritten.
Claims
- Compile knowledge once into a persistent interlinked wiki and keep it current, rather than re-retrieving and re-synthesizing from raw sources on every query. principle — durable (as the source states it): the value of a knowledge store is accumulation — a system that recomputes the answer each time builds nothing up, so subtle multi-document questions pay the synthesis cost repeatedly. This is the load-bearing distinction from query-time RAG.
- The payoff of compiling is cross-source connection — integrating sources into one linked store surfaces relationships invisible when each source is read in isolation. principle — durable: the link between two sources ("worth having as a wiki instead of two separate summaries") is the thing a per-source summary structurally cannot produce.
- On ingest, the LLM reads → extracts → integrates: it updates entity pages, revises topic summaries, and may split one source into many cross-linked pages (the demoed run turned two sources into ~20 fully cross-linked pages). observation — a factual description of the ingest contract, distinct from "index the file for later retrieval."
- Keep contradictions side by side, never silently overwrite
them — surface the tension.
best practice — context: an
evolving synthesis you will revisit; the demoed schema kept conflicting
claims in a
**Conflict:**block. "Best" precisely because a compiled base's risk is laundering a contradiction into false consensus (the same held-not-dropped discipline firehose runs on). Do not read it as license to adjudicate — record the tension, don't resolve it silently. - Enforce provenance: synthesized claims trace to a source page, and the agent's own reasoning is marked as inference. best practice — context: a store meant to stay trustworthy as it compiles; separating source-attributed claims from agent inference is what keeps the compiled synthesis auditable instead of a confident blur.
- A compiled base is still "just markdown files with routing,"
so it stays portable across agent harnesses.
best practice — context: the
human+agent store; because the wiki is plain
.md, it is not locked to one agent (connect Codex, other agents to the same files). See AI Second Brain, Context Routing. - An independent PKM-side source names the same pattern ("LLM Wiki") as the architecture that braids human-curated notes with AI acceleration: compile structured knowledge at ingest time "so the system stops re-deriving the same synthesis from raw notes on every query." observation — the glukhov.org second-brain article, arriving from personal knowledge management rather than from Karpathy's gist lineage; a further independent statement of the compile-once-vs-recompute contract, paired with the claim that query-time RAG "does not preserve human interpretation by itself."
Related
- AI Second Brain — the "just files, organized so you and your agent can find things again" store; a compiled knowledge base is that store with an eager-synthesis ingest contract layered on (read → extract → integrate), not lazy retrieval.
- Retrieval Maturity Levels — a compiled base is the Level-2 "topic wiki": ingested notes cross-linked into indexed pages, retrieved by following the trail.
- Context Routing — the
CLAUDE.mdthat owns the wiki's structure, ingestion, and lint rules is context routing; it also makes the compiled base retrievable and portable. - Knowledge Graph Retrieval — the sharper cousin: operators colloquially call a backlinked compiled wiki a "knowledge graph," but its backlinks are untyped "see also," not typed edges.
- Incremental Indexing — a different mechanism for the same "keep it current" goal: hash-skip re-embedding for a vector index, vs the LLM re-compiling markdown pages here.
- Query-Shaped Storage — whether to compile a structured wiki or keep a flat store is decided by how the AI will search it.
- Evergreen vs Volatile
Context — the discipline for what to let into the compiled store vs
leave in
raw/reachable but un-synthesized. - Decision Log — the wiki's
append-only
log.mdof batch ingests is a decision-log-shaped ledger of what was compiled and when. - Distillate: Fable 5 + Karpathy's LLM Wiki is Basically Cheating
- Distillate: Every Level of a Claude Second Brain Explained — the retrieval-ladder framing this Level-2 pattern sits on.
- Distillate: Second Brain Explained for Engineers and Knowledge Workers — the PKM-side corroboration of the compile-at-ingest contract ("LLM Wiki").