Source: Paul Iusztin, "Build an LLM Wiki From First Principles", Decoding AI, published 2026-10-20 (page metadata shows modified 2026-11-05). Free, not paywalled. Code published at decodingai-magazine/llm-wiki-workshop (licence unverified).
What it is
A knowledge base an agent navigates, built entirely from Markdown files, Python scripts and LLM calls — no vector store, no graph database. The author's own framing is that it is "a very light GraphRAG technique" and "a knowledge graph represented with Markdown files", with "a huge overlap" with GraphRAG proper.
The four-step contract is the part worth internalising:
Ingestion copies each item into
raw/.raw/is immutable and never edited.An LLM turns
raw/into pages underwiki/.The agent queries only
wiki/.
That separation does the heavy lifting. The original bytes are a durable audit trail that no model ever rewrites; everything an agent reads is derived and regenerable. If a page is wrong, you fix the generator and recompute, rather than patching the artifact and losing track of what produced it.
The layout, as given:
wiki-<slug>/
log.md append-only history
raw/<slug>.md immutable copies, plus assets/
wiki/index.md generated root
wiki/overview.md LLM-written summary of the whole wiki
wiki/sources/ one page per raw file
wiki/entities/
wiki/concepts/
Ingest order is fixed: collect and deduplicate, copy to raw/, write source pages, count mentions, write entity and concept pages, write the overview, rebuild indexes, append to the log. Deduplication is by slug — the same item ingested twice is skipped.
The two-source rule
An entity or concept gets its own page only when at least two distinct sources extract it. The author's justification is the sharpest line in the piece: one note mentioning something is a fact about the note; two notes make it a fact about your knowledge.
This is a promotion threshold, and it is the idea most worth stealing. Extraction pipelines fail by producing a page for every noun that appeared once, and the resulting graph is mostly singletons that dilute every index an agent reads. Requiring corroboration before an entity becomes navigable turns a noise problem into a parameter.
Mechanics: scripts/count_mentions.py walks every source page's frontmatter and reports which slugs reached the threshold. A promoted page carries a source_count field and a list of wiki links to its sources. A one-source entity gets no page at all — it survives only as a mention in the source page's frontmatter, so nothing is lost, it just is not navigable yet. The worked example: Obsidian appeared in one source and stayed unpromoted; agent memory appeared in two and got wiki/concepts/agent-memory.md.
Two limits to note. "Distinct source" is never formally defined — in practice each source page, one per raw file, counts as one source, so two articles by the same author quoting the same press release count as corroboration. And the threshold is described as tunable and held in CONVENTIONS.md, but no setting name or location is given. The author is explicit that the threshold trades noise against recall, which is the right way to describe it.
Page generation and the ontology
Each raw file produces exactly one source page: executive summary, key claims, notable quotes, connections. From that page the LLM extracts entities (tools or frameworks — concrete things you can point at) and concepts (theoretical ideas). The author calls this pair an ontology and notes it is swappable for people, companies, organisations, locations or tools, depending on the corpus.
Output is Markdown with YAML frontmatter following Google's Open Knowledge Format: a mandatory type plus name and description, with ontology pages adding graph fields — aliases, sources, related. The agent-memory example carries type: concept, title, description, aliases (unified memory, knowledge graph memory, GraphRAG), sources, related, created, timestamp and source_count: 2, with body sections Definition, Key claims and Relationships.
Scale from the worked exercise: 5 notes → 5 source pages, 4 entities, 5 concepts. One note alone yielded 3 entities (MCP, Claude Code, FastMCP) and 4 concepts. The author's own book wiki is at 196 raw sources, 7 repos and 399 nodes, at chapter 5 of 12; an earlier snapshot was 135 sources and 120 nodes.
The prompt text is not published — templates live in a PAGES.md the article links but does not reproduce.
Retrieval as progressive disclosure
Indexes are built by Python, not an LLM (scripts/build_index_md.py): one index per folder, each a bulleted list of wiki links with descriptions. The root wiki/index.md links the three sub-indexes and shows page counts. An LLM then rewrites overview.md, and the event is appended to log.md.
The agent's navigation order is explicit: root index, then one or two relevant sub-indexes; then one to three pages, preferring entity and concept pages over source pages; then, only if those fall short, the linked source pages, and finally the raw files. It stops as soon as the question is answered.
The author's own description is the useful one: this is "RAG built from files", where the one-to-three pages are the top-k and link-following is multi-hop traversal used only when needed. A worked query — when to use an MCP server versus a CLI — touched three pages.
Two design choices deserve credit. Putting index generation in Python rather than in a model makes the one artifact every query reads deterministic and free. And because entity and concept pages are synthesised across sources rather than duplicated, the agent's first substantive read is already the merged view.
Models used: ingestion on Sonnet 5.5, queries on Opus 5.5, with subagents defaulting to Sonnet — a sensible split, cheap model for the bulk derivation, strong model for the reasoning.
Incremental recompute
A new source triggers a recount, and only the entity and concept pages the new source touches are rewritten. For a changed note, the skill swaps the raw copy, rewrites that source page, and recomputes just the pages linked to it. There is no full re-ingest, and raw/ is never overwritten.
The gap: the article does not say how changed files are detected, nor exactly how "touched" pages are identified beyond the source page's links. That matters, because a new source can change a promotion decision — pushing a one-source entity to two — for an entity the new source links to only indirectly. A recompute scoped to direct links can miss that.
Scaling the ingestion, which is the better-engineered half
The second exercise adds a source-adapter contract (SOURCES.md with a routing table), per-role subagent definitions (source_writer, repo_writer, page_writer, overview_writer) and fetchers for articles, repos, YouTube and Reddit. Every adapter normalises to the same raw artifact fields: origin, original path, title, authors, published date, raw path.
Ingestion runs in parallel with a barrier: fetching in parallel, one source writer per raw file, a barrier waiting for all source pages, then one page writer per qualifying slug, then the overview writer. The barrier is not optional — the two-source count is only correct once every source page exists, so promotion cannot begin until the fan-out completes. That is a real dependency in the data, not a scheduling preference, and it is nice to see it drawn as one.
One more detail worth copying: the skill enters ingest mode only on an explicit verb (ingest, add, build) or dropped paths; otherwise it is in query mode. An ambiguous instruction does not silently rewrite the knowledge base.
There is no evaluation, and the author says so
This is the honest part and it should be stated plainly. No token counts, no costs, no accuracy measurement, no recall measurement. The author's own words: the system runs "with just vibes at this point". Precision was checked informally against topics he already knows; recall is unknown; proper RAG-style evaluation is described as the next step.
So every claim about quality here is a design argument, not a result. The architecture is worth reading on its merits; the two-source rule is worth adopting on its logic. Neither has a number behind it.
Limitations, as the author states them
Latency. Multi-file reads are slower than a graph-database neighbour lookup, which returns in one call.
Scale. "Scaling ingestion and search past 1,000 sources can be challenging."
Token burn at ingest. Poor economics for one-off questions over a pile of files.
Maintenance. Hard to maintain next to a real knowledge graph; explicitly the wrong long-term memory for a product serving millions.
Repos are an anti-pattern. Turning a codebase into a wiki means re-syncing on every commit — "the repo is already the graph."
Noise calibration is unsolved. He is still working out when a note should be created from multiple concepts; too many pages make the wiki useless.
Ontology breadth. Too narrow misses things, too broad extracts everything.
Hallucination. Every claim is supposed to cite its page and the agent is supposed to say when the wiki does not know. No measured rate.
Review checklist
Keep the raw layer immutable and query only the derived layer. It is the cheapest provenance guarantee available, and it makes every page regenerable.
Adopt a promotion threshold. Two distinct sources before an entity becomes navigable; keep one-source mentions in frontmatter so nothing is lost.
Define "distinct source" yourself. Per-file counting treats two syndicated copies as corroboration.
Generate indexes with code, not a model. The artifact every query reads should be deterministic.
Scope recompute by promotion impact, not just by direct links — a new source can change a threshold decision for an entity it does not directly reference.
Barrier before promotion. Counting is only valid once every source page exists.
Gate ingest mode on an explicit verb, so an ambiguous instruction cannot rewrite the base.
Do not carry quality claims from this design into your own. There is no evaluation behind any of it; measure recall on your own corpus before trusting it.
Do not wiki a repository. The repo is the graph.
Related reading
Pairs directly with work on extraction-built graphs whose published evaluation shows high precision and low recall — the same failure mode applies here and is unmeasured — and with compiled semantic layers that separate an inspectable build pipeline from a per-question loop. The shared lesson across all three: the expensive artifact should be deterministic and rebuildable, and the model's judgement belongs inside it at named steps rather than spread across it.