An LLM builds your wiki for you.
You curate raw sources and ask questions; the LLM does the writing, linking, and upkeep. Five slash commands in your coding agent — no UI, no SaaS, no vector database. The pattern is Andrej Karpathy’s.
/wiki-query against the demo wiki that ships in the repo — answer text verbatim.5slash commands — the whole interface
495pages, and reads per answer still fell 3 → 0
10binary retrieval checks, no LLM grader
37deterministic smoke checks, wired into CI
Three commands are the whole loop.
Everything runs inside your coding agent. Sources land in an immutable raw/ layer; the wiki is rebuilt knowledge on top; every claim cites its way back.
-
01 · /wiki-extract
Acquire the source
A URL, PDF, DOCX, spreadsheet, image, or YouTube transcript is parsed to markdown and captured in
raw/with provenance frontmatter — publisher, date, hash. Raw files are never edited again./wiki-extract https://example.com/some-article
-
02 · /wiki-ingest
Integrate into the wiki
A seven-step pipeline turns raw sources into interlinked pages: entities with provenance, typed relations (
supersedes,causes, …), valid-time dates, and inline citations back toraw/<file>#<anchor>. Idempotent via body hash./wiki-ingest
-
03 · /wiki-query
Ask — with receipts
Answers come from structure, not similarity: dates for point-in-time questions, a graph walk for “what replaced X”, an explicit refusal when the answer isn’t in the wiki. Every claim carries its raw citation.
/wiki-query "what changed in the April memo?"
Two more commands keep it healthy: /wiki-lint finds broken links, contradictions, and stale claims; /wiki-visualize renders the link graph.
Why not a vector database?
Embedding flattens exactly the metadata that distinguishes true from stale from out-of-scope — time, scope, succession, source. The hardest retrieval cases are the ones where the wrong chunks are the most similar ones: a February memo and the April memo that superseded it are near-duplicates in embedding space.
This wiki keeps that metadata as first-class structure the agent traverses with reasoning instead of cosine distance. The retrieval eval checks it, deterministically:
- Point-in-time — “what did we believe in March?” answered from dated sources
- Supersession — “what replaced X?” answered by a typed-edge graph walk
- Refusal on absence — no nearest-neighbour guess when the answer isn’t there
- Citation locus — every answer resolves to a real span of a real source
- Citation integrity — a receipt that doesn’t resolve is caught, not trusted
- Feedback loops — cycles in the causal graph, classified reinforcing or balancing
And it holds as the wiki grows. The same eval re-run against a corpus padded to 495 pages with deliberate distractors — written in the needles’ own vocabulary, for other services — scored 21 / 21, up from 20 / 21 at 19 pages, while median file reads per answer fell from 3 to 0. The held-out question set, never run by default and never in CI, passed 4 / 4 at that size. Retrieval cost tracks hops, not corpus size.
Three tiers, each checking the one below: the wiki is written by an LLM, the eval grades it with no LLM in the grading path, and a suite of oracles grades the eval. Latest full run 32 / 35 (2026-07-30) — the losses were one fabricated citation anchor and one citation pointing into frontmatter instead of body text, both caught by the checks rather than by luck.
Quick start — first answer in one block
You need one thing: an agentic AI tool on your $PATH. The reference path is Claude Code; Cursor, Cline, Copilot, Gemini, and Codex shims ship in the repo.
git clone https://github.com/FrancyJGLisboa/llm-wiki-bootstrap my-wiki cd my-wiki && claude
The repo ships with a working demo wiki, so the very first command already returns a cited answer — zero setup:
/wiki-query "what is an llm-wiki, and why not just use RAG?"