Files
memory/llm-wiki-pattern.md
T

32 lines
1.6 KiB
Markdown

# LLM Wiki Pattern
## Core Idea
A pattern for building personal knowledge bases using LLMs. The LLM incrementally builds and maintains a persistent wiki - a structured, interlinked collection of markdown files that sits between you and the raw sources.
## Three Layers
1. **Raw Sources** - Immutable collection of source documents (articles, papers, images, data files)
2. **The Wiki** - LLM-generated markdown files (summaries, entity pages, concept pages, comparisons, overview, synthesis)
3. **The Schema** - Document that tells the LLM how the wiki is structured, conventions, and workflows
## Operations
- **Ingest** - Read source, discuss key takeaways, write summary page, update index, update relevant entity/concept pages, append entry to log
- **Query** - Search for relevant pages, read them, synthesize answer with citations
- **Lint** - Periodically health-check wiki for contradictions, stale claims, orphan pages, missing cross-references
## Indexing and Logging
- **index.md** - Content-oriented catalog of everything in the wiki, organized by category
- **log.md** - Chronological append-only record of what happened and when
## Benefits
- Knowledge is compiled once and kept current, not re-derived on every query
- Cross-references are already there
- Contradictions have already been flagged
- Synthesis reflects everything read
- Maintenance burden is near zero (LLMs don't get bored)
## Tools
- **qmd** - Query Markup Documents: on-device search engine combining BM25, vector semantic search, and LLM reranking
- **Obsidian** - IDE for browsing and editing wiki
- **Marp** - Markdown-based slide decks
- **Dataview** - Run queries over page frontmatter