1.6 KiB
1.6 KiB
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
- Raw Sources - Immutable collection of source documents (articles, papers, images, data files)
- The Wiki - LLM-generated markdown files (summaries, entity pages, concept pages, comparisons, overview, synthesis)
- 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