chore: sync vault to ~/cosmic-brain (Obsidian-registered path)
This commit is contained in:
70
wiki/concepts/Compounding Knowledge.md
Normal file
70
wiki/concepts/Compounding Knowledge.md
Normal file
@@ -0,0 +1,70 @@
|
||||
---
|
||||
type: concept
|
||||
title: "Compounding Knowledge"
|
||||
complexity: basic
|
||||
domain: knowledge-management
|
||||
aliases:
|
||||
- "Knowledge Compounding"
|
||||
- "Persistent Synthesis"
|
||||
created: 2026-04-07
|
||||
updated: 2026-04-07
|
||||
tags:
|
||||
- concept
|
||||
- knowledge-management
|
||||
status: mature
|
||||
related:
|
||||
- "[[LLM Wiki Pattern]]"
|
||||
- "[[Hot Cache]]"
|
||||
- "[[Andrej Karpathy]]"
|
||||
- "[[Nate Herk LLM Wiki Transcript]]"
|
||||
sources:
|
||||
- "[[wiki/sources/Nate Herk LLM Wiki Transcript]]"
|
||||
---
|
||||
|
||||
# Compounding Knowledge
|
||||
|
||||
The central insight behind the [[LLM Wiki Pattern]]: knowledge in a wiki compounds like interest in a bank. Every source added, every question answered, every analysis filed makes the wiki more valuable — not just by adding pages, but by enriching the connections between existing pages.
|
||||
|
||||
---
|
||||
|
||||
## Why Normal AI Chats Don't Compound
|
||||
|
||||
In a standard chat, knowledge is ephemeral. Each session starts fresh. Even if you upload the same documents repeatedly, the LLM re-derives the same insights from scratch. Nothing accumulates.
|
||||
|
||||
The same is true of most RAG systems: they index raw documents and retrieve chunks at query time. The retrieval gets the right fragments, but no synthesis is built up. Nothing is compiled. Ask the same complex question twice and you get the same assembly process twice.
|
||||
|
||||
---
|
||||
|
||||
## How Wiki Knowledge Compounds
|
||||
|
||||
When a new source arrives, the LLM doesn't just index it. It integrates it:
|
||||
- Updates entity pages with new information
|
||||
- Flags contradictions with existing claims
|
||||
- Strengthens or challenges the evolving synthesis
|
||||
- Adds cross-references from the new source to existing pages and back
|
||||
|
||||
The cross-references are already there next time. The contradictions have already been flagged. The synthesis already reflects everything that was read.
|
||||
|
||||
**The wiki is pre-compiled knowledge.** RAG re-compiles on every query.
|
||||
|
||||
---
|
||||
|
||||
## The Maintenance Problem
|
||||
|
||||
Wikis maintained by humans decay. The maintenance burden grows faster than the value — updating cross-references, keeping summaries current, noting when new data contradicts old claims. Humans abandon wikis because no one wants to do the bookkeeping.
|
||||
|
||||
LLMs don't get bored. They don't forget to update a cross-reference. The cost of maintenance is near zero. This is the practical reason the wiki pattern works: the entity that's best at the tedious maintenance work is the same entity that reads and writes the wiki.
|
||||
|
||||
---
|
||||
|
||||
## In Practice
|
||||
|
||||
One X user turned 383 scattered files and over 100 meeting transcripts into a compact wiki and dropped token usage by 95% when querying with Claude. The drop came from two sources: better navigation (index + hot cache vs. full document search) and pre-compiled synthesis (no re-deriving the same insights from scratch).
|
||||
|
||||
---
|
||||
|
||||
## Connections
|
||||
|
||||
See [[LLM Wiki Pattern]] for the full architecture.
|
||||
See [[Hot Cache]] for the session context mechanism.
|
||||
See [[Andrej Karpathy]] for the origin of this framing.
|
||||
95
wiki/concepts/Hot Cache.md
Normal file
95
wiki/concepts/Hot Cache.md
Normal file
@@ -0,0 +1,95 @@
|
||||
---
|
||||
type: concept
|
||||
title: "Hot Cache"
|
||||
complexity: basic
|
||||
domain: knowledge-management
|
||||
aliases:
|
||||
- "hot.md"
|
||||
- "Session Cache"
|
||||
- "Context Cache"
|
||||
created: 2026-04-07
|
||||
updated: 2026-04-07
|
||||
tags:
|
||||
- concept
|
||||
- knowledge-management
|
||||
- context
|
||||
status: mature
|
||||
related:
|
||||
- "[[LLM Wiki Pattern]]"
|
||||
- "[[Compounding Knowledge]]"
|
||||
- "[[index]]"
|
||||
- "[[hot]]"
|
||||
sources:
|
||||
- "[[wiki/sources/Nate Herk LLM Wiki Transcript]]"
|
||||
---
|
||||
|
||||
# Hot Cache
|
||||
|
||||
A ~500-word summary of the most recent context in the wiki vault. Stored in `wiki/hot.md`. Updated at the end of every session and after every significant ingest or query.
|
||||
|
||||
The hot cache exists to answer one question: "where did we leave off?" A new session reads `hot.md` first. If the answer is there, it skips crawling the rest of the wiki.
|
||||
|
||||
---
|
||||
|
||||
## What It Stores
|
||||
|
||||
- What was most recently ingested or discussed
|
||||
- Key recent facts and takeaways
|
||||
- Pages recently created or updated
|
||||
- Active threads and open questions
|
||||
- What the user is currently focused on
|
||||
|
||||
---
|
||||
|
||||
## Format
|
||||
|
||||
```markdown
|
||||
---
|
||||
type: meta
|
||||
title: "Hot Cache"
|
||||
updated: YYYY-MM-DDTHH:MM:SS
|
||||
---
|
||||
|
||||
# Recent Context
|
||||
|
||||
## Last Updated
|
||||
YYYY-MM-DD — [what happened]
|
||||
|
||||
## Key Recent Facts
|
||||
- [Most important recent takeaway]
|
||||
- [Second]
|
||||
|
||||
## Recent Changes
|
||||
- Created: [[New Page 1]]
|
||||
- Updated: [[Existing Page]] (added section on X)
|
||||
- Flagged: Contradiction between [[Page A]] and [[Page B]]
|
||||
|
||||
## Active Threads
|
||||
- User is researching [topic]
|
||||
- Open question: [thing being investigated]
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Rules
|
||||
|
||||
- Keep it under 500 words. It is a cache, not a journal.
|
||||
- Overwrite it completely each time. Not append-only.
|
||||
- One file. Not split by date.
|
||||
- Updated after every ingest, significant query, and at the end of each session.
|
||||
|
||||
---
|
||||
|
||||
## Why It Matters
|
||||
|
||||
Without the hot cache, every session starts cold: read the index (1000 tokens), read several domain sub-indexes, read several individual pages. With the hot cache, the first 500 tokens often have everything needed.
|
||||
|
||||
Nate Herk reported that adding `hot.md` to his executive assistant vault reduced the token cost of session startup significantly compared to crawling multiple wiki pages.
|
||||
|
||||
The hot cache is especially valuable in cross-project setups: another Claude Code project can point at this vault and read `hot.md` first to get recent context at minimal token cost.
|
||||
|
||||
---
|
||||
|
||||
## Connections
|
||||
|
||||
The hot cache is part of the [[LLM Wiki Pattern]] token discipline strategy. See [[index]] for how the broader navigation works.
|
||||
98
wiki/concepts/LLM Wiki Pattern.md
Normal file
98
wiki/concepts/LLM Wiki Pattern.md
Normal file
@@ -0,0 +1,98 @@
|
||||
---
|
||||
type: concept
|
||||
title: "LLM Wiki Pattern"
|
||||
complexity: intermediate
|
||||
domain: knowledge-management
|
||||
aliases:
|
||||
- "LLM Knowledge Base"
|
||||
- "Karpathy Wiki"
|
||||
- "Persistent Wiki"
|
||||
created: 2026-04-07
|
||||
updated: 2026-04-07
|
||||
tags:
|
||||
- concept
|
||||
- knowledge-management
|
||||
- llm
|
||||
- obsidian
|
||||
status: mature
|
||||
related:
|
||||
- "[[Hot Cache]]"
|
||||
- "[[Compounding Knowledge]]"
|
||||
- "[[Andrej Karpathy]]"
|
||||
- "[[Nate Herk LLM Wiki Transcript]]"
|
||||
- "[[index]]"
|
||||
sources:
|
||||
- "[[wiki/sources/Nate Herk LLM Wiki Transcript]]"
|
||||
---
|
||||
|
||||
# LLM Wiki Pattern
|
||||
|
||||
A pattern for building persistent, compounding knowledge bases using LLMs. Originated by [[Andrej Karpathy]]. The key insight: instead of re-deriving knowledge from raw documents on every query (RAG), the LLM incrementally builds and maintains a structured wiki that gets richer with every source added.
|
||||
|
||||
---
|
||||
|
||||
## The Core Idea
|
||||
|
||||
Most AI knowledge tools work like RAG: index raw documents, retrieve chunks at query time, generate an answer. Nothing accumulates. Ask a question that needs five documents and the LLM reassembles fragments every time.
|
||||
|
||||
The wiki pattern is different. When a new source arrives, the LLM reads it, extracts what matters, and integrates it into the wiki: updating entity pages, noting contradictions, strengthening the synthesis. The cross-references are already there. The knowledge is compiled once and kept current.
|
||||
|
||||
**The wiki is a persistent, compounding artifact.** The human curates sources and asks questions. The LLM writes and maintains everything.
|
||||
|
||||
---
|
||||
|
||||
## Three Layers
|
||||
|
||||
```
|
||||
.raw/ Layer 1 — immutable source documents
|
||||
wiki/ Layer 2 — LLM-generated knowledge base
|
||||
CLAUDE.md Layer 3 — schema that tells the LLM how to maintain it
|
||||
```
|
||||
|
||||
The LLM owns Layer 2 entirely. It creates pages, updates them when new sources arrive, maintains cross-references, and keeps everything consistent. The human reads; the LLM writes.
|
||||
|
||||
---
|
||||
|
||||
## Operations
|
||||
|
||||
**Ingest** — drop a source into `.raw/`, tell the LLM to process it. The LLM reads the source, discusses key takeaways, writes a summary page, updates entity and concept pages, and logs the operation. One source typically touches 8-15 wiki pages.
|
||||
|
||||
**Query** — ask a question. The LLM reads the index to find relevant pages, synthesizes an answer with citations. Good answers get filed back into the wiki.
|
||||
|
||||
**Lint** — periodic health check. Find orphan pages, dead links, stale claims, missing cross-references.
|
||||
|
||||
---
|
||||
|
||||
## Index and Log
|
||||
|
||||
**index.md** — content-oriented. A catalog of all pages with one-line summaries, organized by category. The LLM reads this first on every query to find relevant pages.
|
||||
|
||||
**log.md** — chronological. Append-only record of every ingest, query, and lint pass. Parseable: `grep "^## \[" log.md | head -10`
|
||||
|
||||
---
|
||||
|
||||
## Why It Works
|
||||
|
||||
The tedious part of maintaining a knowledge base is bookkeeping: updating cross-references, noting when new data contradicts old claims, keeping summaries current. Humans abandon wikis because the maintenance burden grows faster than the value. LLMs don't get bored. The wiki stays maintained because the cost of maintenance is near zero.
|
||||
|
||||
At small scale (~100 sources, ~hundreds of pages), the index file is sufficient. No vector database, no embeddings, no infrastructure. Just markdown files.
|
||||
|
||||
---
|
||||
|
||||
## Comparison to RAG
|
||||
|
||||
| Dimension | LLM Wiki | Semantic RAG |
|
||||
|-----------|----------|-------------|
|
||||
| Finding | Reads index, follows links | Similarity search over embeddings |
|
||||
| Infrastructure | Just markdown files | Embedding model + vector DB |
|
||||
| Cost | Tokens only | Ongoing compute + storage |
|
||||
| Maintenance | Run a lint | Re-embed when content changes |
|
||||
| Scale limit | Hundreds of pages | Millions of documents |
|
||||
|
||||
---
|
||||
|
||||
## Connections
|
||||
|
||||
See [[Compounding Knowledge]] for why the pattern produces more value over time.
|
||||
See [[Hot Cache]] for the session context optimization.
|
||||
See [[Andrej Karpathy]] for the pattern's origin.
|
||||
Reference in New Issue
Block a user