Transform your LLM into a knowledge base maintainer. Instead of just retrieving from raw documents, the LLM incrementally builds and maintains a persistent wiki — a structured, interlinked collection of markdown files.
The wiki is a persistent, compounding artifact. The cross-references are already there. The contradictions have already been flagged. The synthesis already reflects everything you've read. The wiki keeps getting richer with every source you add and every question you ask.
wiki-project/
├── raw/ # Layer 1: Source documents (immutable)
│ ├── articles/
│ ├── papers/
│ └── assets/
├── wiki/ # Layer 2: LLM-maintained knowledge base
│ ├── index.md # Content index
│ ├── overview.md # Synthesis overview
│ ├── entities/ # Entity pages (people, orgs, products)
│ ├── concepts/ # Concept pages (ideas, theories, methods)
│ ├── sources/ # Source summaries
│ └── comparisons/ # Comparison analyses
├── log.md # Chronological activity log
└── WIKI.md # Layer 3: Schema configuration
When to use: User adds a new source document and wants it integrated into the wiki.
Workflow:
1. Read the source document from raw/
2. Discuss key takeaways with user (if interactive mode)
3. Create/update source summary in wiki/sources/
4. Extract and update entity pages in wiki/entities/
5. Extract and update concept pages in wiki/concepts/
6. Update wiki/index.md with new entries
7. Append entry to log.md
Interactive vs Batch Mode:
Configure mode in WIKI.md:
workflow:
default_mode: interactive # or batch
batch_threshold: 3 # Process N sources at once when batch mode
Ingest Checklist:
[[page-name]] syntax)
When to use: User asks a question against the wiki.
Workflow:
1. Read wiki/index.md to locate relevant pages
2. Read relevant wiki pages
3. Synthesize answer with citations
4. (Optional) Write answer back to wiki as new page
Key Insight: Good answers can be filed back into the wiki as new pages. A comparison you asked for, an analysis, a connection you discovered — these are valuable and shouldn't disappear into chat history.
Output Formats:
Write-back Decision:
Ask user: "Should I save this analysis to the wiki?" If yes, file under appropriate directory.
When to use: Periodic health checks, or when user asks to check wiki health.
Workflow:
1. Iterate through all wiki pages
2. Check for issues:
- Contradictions between pages
- Stale claims (newer sources supersede older ones)
- Orphan pages (no inbound links)
- Missing pages (referenced but don't exist)
- Incomplete cross-references
- Data gaps
3. Generate health report
4. Suggest fixes and new sources to seek
Lint Report Format:
# Wiki Health Report - [DATE]
## Issues Found
### Contradictions
- [[entities/org-a]] claims X, but [[sources/report-b]] says Y
### Orphan Pages
- [[concepts/isolated-idea]] has no inbound links
### Missing Pages
- [[entities/referenced-person]] referenced but doesn't exist
### Data Gaps
- No sources on [topic] since [date]
## Recommendations
1. Resolve contradiction in org-a by...
2. Add cross-references to isolated-idea from...
3. Create page for referenced-person using...
4. Search for recent sources on [topic]
---
title: Page Title
type: entity|concept|source|comparison
created: 2026-04-07
updated: 2026-04-07
sources: [source-id-1, source-id-2]
tags: [tag1, tag2]
related: [[related-page-1]], [[related-page-2]]
---
# Wiki Index
## Overview
- [[overview]] - Synthesis of all knowledge
## Entities
- [[entities/person-a]] - Brief description
- [[entities/org-b]] - Brief description
## Concepts
- [[concepts/key-idea]] - Brief description
## Sources
- [[sources/article-1]] (2026-04-01) - Brief description
## Comparisons
- [[comparisons/x-vs-y]] - Brief description
## [2026-04-07 10:30] ingest | Article Title
- Added source: [[sources/article-title]]
- Updated entities: [[entities/person-a]], [[entities/org-b]]
- Created concept: [[concepts/key-idea]]
- Cross-references: 5 added
## [2026-04-07 11:00] query | What is X?
- Created comparison: [[comparisons/x-comparison]]
## [2026-04-07 14:00] lint | Health check
- Issues: 1 contradiction, 2 orphans
- Fixed: 1 orphan (added cross-references)
Parsing Tip: Each entry starts with ## [DATE TIME] operation | Title, making it grep-friendly.
For large wikis (>100 sources), use qmd for search instead of index.md.
# Search wiki pages
qmd search "query text" --path wiki/
# With re-ranking
qmd search "query text" --path wiki/ --rerank
Read references/qmd-integration.md for setup instructions.
Dataview Queries: Use YAML frontmatter for dynamic queries.
TABLE type, created, sources
FROM "wiki/entities"
WHERE contains(tags, "important")
SORT created DESC
Graph View: Visualize wiki connections in Obsidian.
Read references/obsidian-workflow.md for detailed setup.
Generate presentations from wiki content:
---
marp: true
---
# Title Slide
Content from wiki...
---
# Next Slide
More content...
User: "Here's an important report, ingest it"
Agent:
1. Reads source
2. "Key findings: [summary]. Should I emphasize anything specific?"
3. [User guidance]
4. Creates/updates wiki pages
5. Shows summary of changes
User: "Ingest these 5 articles"
Agent:
1. Reads all sources
2. Processes autonomously
3. Reports: "Ingested 5 sources. Created 3 entity pages, updated 7 concept pages."
Configure in WIKI.md:
workflow:
mode: mixed
interactive_keywords: [important, key, critical, flagship]
# Sources with these keywords trigger interactive mode
references/wiki-architecture.md - Detailed architecture explanation
references/page-templates.md - Page structure templates
references/lint-rules.md - Health check rules
references/qmd-integration.md - Search engine setup
references/obsidian-workflow.md - Obsidian setup guide
templates/entity-page.md - Entity page template
templates/concept-page.md - Concept page template
templates/source-summary.md - Source summary template
templates/comparison-table.md - Comparison page template
templates/WIKI.md - Schema configuration example
scripts/wiki-init.py - Initialize a new wiki project
```
python scripts/wiki-init.py /path/to/project
```
```
"Ingest raw/articles/first-article.md"
```
```
"What do we know about [topic]?"
```
```
"Run a lint check on the wiki"
```
Most RAG systems retrieve from raw documents on every query. Nothing accumulates.
LLM Wiki compiles knowledge once and keeps it current. Every source and every query makes the wiki richer.
The human's job: Curate sources, direct analysis, ask good questions.
The LLM's job: Everything else — summarizing, cross-referencing, filing, bookkeeping.
共 2 个版本