Concepts
LLM Wiki
Karpathy’s pattern: LLMs compile raw sources into a persistent interlinked markdown wiki—entity/concept pages, index, log—rather than re-deriving answers from RAG on every query.
Core idea
Most LLM+document systems are RAG: retrieve chunks at query time and regenerate. An LLM wiki sits between you and raw sources as a compiled layer of markdown. On ingest, the agent extracts claims into entity/concept pages, updates cross-links, flags contradictions, and strengthens synthesis. Knowledge accumulates; queries read the wiki instead of rediscovering fragments every time.
Three layers
- Raw sources — immutable (this repo’s
raw/plus original URLs) - Wiki — LLM-maintained summaries, entities, concepts, comparisons, overview, synthesis
- Schema —
AGENTS.md/CLAUDE.mdconventions for ingest, query, and lint
Operations Karpathy emphasizes
| Operation | Intent |
|---|---|
| Ingest | One source → many page updates (not only a new leaf file) |
| Query | Answer from wiki pages; file good answers back as pages |
| Lint | Contradictions, stale claims, orphans, missing entity pages |
How this project maps
This AI Wiki follows the schema and Ask surface strongly, but the entity/concept compilation layer is still thinner than raw feed volume. Prefer curated hubs such as eve, ai-sdk, and ai-gateway over leaf captures when answering product questions.