LLM Wiki

Neil HaddleyApril 20, 2026

Karpathy's LLM Wiki

AIclaude-codeai-agentanthropicagentic-codingollamallmwiki

Andrej Karpathy published a concept for building a personal knowledge base using LLMs — a "wiki" where you ingest raw source documents (PDFs, emails, notes) and have Claude synthesise structured wiki pages from them. Each page follows a consistent YAML frontmatter schema with type, sources, confidence level, and related pages. A master index tracks everything and an activity log records every ingest. The power is in the cross-referencing: once your documents are in the wiki, you can ask Claude to compare cases, find patterns, or draft documents grounded entirely in your own ingested material.

I applied this to a personal project — building a knowledge base around a dog attack case — and was immediately struck by how useful it became. Within an afternoon I had ingested correspondence, legal precedents, council records, and court filing templates, and could query across all of them with Claude Code.

I set up the CLAUDE.md file defining the wiki schema — project structure, YAML frontmatter conventions, and the ingest workflow

I set up the CLAUDE.md file defining the wiki schema — project structure, YAML frontmatter conventions, and the ingest workflow

claude.md

MARKDOWN
1# LLM Wiki Schema
2
3## Project Structure
4- `raw/` — immutable source documents. NEVER modify.
5- `wiki/` — LLM-generated wiki. You own this entirely.
6- `wiki/index.md` — master catalog. Update on every ingest.
7- `wiki/log.md` — append-only activity log.
8
9## Page Conventions
10Every wiki page MUST have YAML frontmatter:
11```
12---
13title: Page Title
14type: concept | entity | source-summary | comparison
15sources: [list of raw/ files referenced]
16related: [list of wiki pages linked]
17created: YYYY-MM-DD
18updated: YYYY-MM-DD
19confidence: high | medium | low
20---
21```
22
23## Ingest Workflow
24When I say "ingest [filename]":
251. Read the source file in raw/
262. Discuss key takeaways with me
273. Create/update a summary page in wiki/sources/
284. Update wiki/index.md
295. Update all relevant concept and entity pages
306. Append an entry to wiki/log.md
31
32## Query Workflow
33When I ask a question:
341. Read wiki/index.md to find relevant pages
352. Read those pages
363. Synthesize an answer with [[wiki-link]] citations
374. If the answer is valuable, offer to file it as
38   a new wiki page
39
40## Lint Workflow
41When I say "lint":
421. Check for contradictions between pages
432. Find orphan pages with no inbound links
443. List concepts mentioned but lacking own page
454. Check for stale claims superseded by newer sources
465. Suggest questions to investigate next
I opened the Obsidian graph view showing the knowledge base with all the interconnected wiki pages and source documents

I opened the Obsidian graph view showing the knowledge base with all the interconnected wiki pages and source documents

I asked Claude Code to compare my case to a similar Dog Attack case I had ingested into the wiki

I asked Claude Code to compare my case to a similar Dog Attack case I had ingested into the wiki

Claude Code read the relevant wiki pages and began building the comparison

Claude Code read the relevant wiki pages and began building the comparison

Claude Code produced a detailed side-by-side comparison table highlighting the strong parallels between the two cases

Claude Code produced a detailed side-by-side comparison table highlighting the strong parallels between the two cases

I asked Claude Code to draft a Rule 5.2 summons and affidavit using the ingested legal precedents and case details

I asked Claude Code to draft a Rule 5.2 summons and affidavit using the ingested legal precedents and case details

Claude Code edited the draft, updating dates and inserting the relevant Companion Animals Act provisions

Claude Code edited the draft, updating dates and inserting the relevant Companion Animals Act provisions

I previewed the affidavit — the Relief Sought section asked the council to disclose the dog owner's registered residential address

I previewed the affidavit — the Relief Sought section asked the council to disclose the dog owner's registered residential address

The completed summons addressed to Central Coast Council, citing Rule 5.2 of the Uniform Civil Procedure Rules 2005

The completed summons addressed to Central Coast Council, citing Rule 5.2 of the Uniform Civil Procedure Rules 2005

PROMPT
1I just added a new article to raw/[2024] NSWDC 602.docx Please ingest it.
I typed the ingest prompt into Claude Code, asking it to process the newly added NSWDC 602 article

I typed the ingest prompt into Claude Code, asking it to process the newly added NSWDC 602 article

Claude Code read the full case and presented the key takeaways — including a $460,998.99 total award, the highest precedent in my wiki

Claude Code read the full case and presented the key takeaways — including a $460,998.99 total award, the highest precedent in my wiki

Claude Code updated the master index, created a full case summary page, and flagged Hardy v Eclipse K9 as the highest-award precedent at $761,500 indexed

Claude Code updated the master index, created a full case summary page, and flagged Hardy v Eclipse K9 as the highest-award precedent at $761,500 indexed