add: AGENTS.md schema, seed files, sample topic page

This commit is contained in:
truetype committed 2026-05-10 17:36:15 +02:00
1 parent 2326fc758f
commit 125f74c563
2 files changed
+139

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
# LLM Wiki Pattern (Karpathy)
> A method for building persistent, structured knowledge bases using LLM agents — compiled once, kept current, queried efficiently.
## Tags
`concept` `methodology` `knowledge-management` `2026-05-10`
## Overview
Andrej Karpathy proposed the "LLM Wiki" pattern as an alternative to RAG (Retrieval-Augmented Generation). Instead of searching raw documents on every query, an LLM agent incrementally builds and maintains a wiki of interlinked markdown pages.
## Core Architecture
### Three Layers
1. **Raw Sources** (`raw/`) — Original documents, immutable. Never modified by the LLM.
2. **Wiki** (`wiki/`) — Structured, interlinked markdown pages compiled by the LLM.
3. **Schema** (`AGENTS.md`) — Rules, conventions, and workflows. The "operating system" of the wiki.
### Workflows
- **Ingest**: Drop source in `raw/` → LLM reads, extracts, creates/updates ~10-15 wiki pages per source
- **Query**: Ask question → LLM reads `index.md` → drills into relevant pages → synthesizes answer with citations
- **Lint**: Periodically audit wiki for contradictions, orphans, stale claims
## Key Principles
- One concept = one file
- Cross-reference everything with `[[wikilinks]]`
- The LLM owns the wiki directory; humans only edit `raw/` and the schema
- Good answers get filed back into the wiki as new pages (compounding knowledge)
- Works with any LLM that can read/write files (Claude Code, Codex, Cursor, local models via Ollama)
## Related
- [[AGENTS.md]] — Schema file for this wiki
- [[index]] — Master catalog
## Sources
- Karpathy's original idea file (GitHub Gist)