wiki / concepts / llm-wiki-pattern
LLM Wiki Pattern
loading…
LLM Wiki Pattern
andrej karpathy’s approach to durable knowledge: compile it once into interlinked markdown, keep it current, cross-reference, flag contradictions. Instead of rediscovering the same knowledge from scratch each time you ask an LLM, build a wiki that the LLM can reference.
Why
LLMs don’t persist learning between sessions. Every conversation starts fresh. A wiki is the external memory: the knowledge is compiled once (with sources, confidence, contradictions noted) and loaded on demand. The alternative — re-researching every time — wastes tokens and produces inconsistent results.
How it works
SCHEMA.mddefines the structure: frontmatter, tags, page thresholds, update policy.index.mdlists every page.log.mdrecords every change.- Wikilink syntax (for example:
[[concept-slug]]or[[concept-slug|custom label]]) connects pages into a graph. Minimum 2 outbound links per page. raw/holds source articles. Pages cite raw sources via provenance markers.- The schema enforces quality: page thresholds (create when 2+ sources mention it), update policy (newer supersedes older, contradictions noted not hidden).
Relation to context engineering
context engineering (Matt) is the same idea applied to project instructions (AGENTS.md, CONTEXT.md). The wiki is for knowledge; those are for project context. Both say: compile once, keep current, don’t rediscover.
In 2026 the pattern was productized: TencentDB Agent Memory ships “LLM-Wiki” as one of its four governed memory asset types, explicitly crediting Karpathy’s knowledge-base pattern (see agent native infrastructure).
Related
context engineering, andrej karpathy, agent native infrastructure, progressive disclosure.
| karpathy-guidelines-skill-2026 | https://github.com/multica-ai/andrej-karpathy-skills/blob/main/skills/karpathy-guidelines/SKILL.md | ingested 2026-08-22 sha256:3dbba31cbdb8… |
| karpathy-wiki-ecosystem-analysis-2026 | ingested archive |