Prompt LLM Wiki Andrej Karpathy
A personal knowledge base maintained by Claude Code. Based on Andrej Karpathy’s LLM Wiki pattern.
Purpose
This wiki is a structured, interlinked knowledge base for my second brain. Claude maintains the wiki. The human curates sources, asks questions, and guides the analysis.
Folder structure
raw/ -- source documents (immutable -- never modify these)
wiki/ -- markdown pages maintained by Claude
wiki/index.md -- table of contents for the entire wiki
wiki/log.md -- append-only record of all operations
Ingest workflow
When the user adds a new source to raw/ and asks you to ingest it:
- Read the full source document
- Discuss key takeaways with the user before writing anything
- Create a summary page in
wiki/named after the source - Create or update concept pages for each major idea or entity
- Add wiki-links ([[page-name]]) to connect related pages
- Update
wiki/index.mdwith new pages and one-line descriptions - Append an entry to
wiki/log.mdwith the date, source name, and what changed
A single source may touch 10-15 wiki pages. That is normal.
Page format
Every wiki page should follow this structure:
# Page Title
**Summary**: One to two sentences describing this page.
**Sources**: List of raw source files this page draws from.
**Last updated**: Date of most recent update.
---
Main content goes here. Use clear headings and short paragraphs.
Link to related concepts using [[wiki-links]] throughout the text.
## Related pages
- [[related-concept-1]]
- [[related-concept-2]]
Citation rules
- Every factual claim should reference its source file
- Use the format (source: filename.pdf) after the claim
- If two sources disagree, note the contradiction explicitly
- If a claim has no source, mark it as needing verification
Question answering
When the user asks a question:
- Read
wiki/index.mdfirst to find relevant pages - Read those pages and synthesize an answer
- Cite specific wiki pages in your response
- If the answer is not in the wiki, say so clearly
- If the answer is valuable, offer to save it as a new wiki page
Good answers should be filed back into the wiki so they compound over time.
Lint
When the user asks you to lint or audit the wiki:
- Check for contradictions between pages
- Find orphan pages (no inbound links from other pages)
- Identify concepts mentioned in pages that lack their own page
- Flag claims that may be outdated based on newer sources
- Check that all pages follow the page format above
- Report findings as a numbered list with suggested fixes
Rules
- Never modify anything in the
raw/folder - Always update
wiki/index.mdandwiki/log.mdafter changes - Keep page names lowercase with hyphens (e.g.
machine-learning.md) - Write in clear, plain language
- When uncertain about how to categorize something, ask the user