Case Study: Self-Writing Community Wiki via Telegram Bot
Case Study: Self-Writing Community Wiki via Telegram Bot
TL;DR: A Telegram bot reads all community messages, extracts knowledge using LLM, and builds a self-maintaining wiki. Members can query “who knows about X?” and get answers with clickable links to experts. Zero manual maintenance.
The Problem
Two Russian-speaking communities (“Meshok” and “Research Mastermind”) faced severe information overload:
- Mastermind sessions with valuable presentations
- “Useful calls” discussing strategies
- Hundreds of daily messages with GitHub links, tool recommendations, implementation stories
- Finding experts impossible — thousands of messages to search through
“How do you not drown in this flood of information?”
The Solution
A Telegram bot that implements the LLM Wiki Pattern:
Chat messages → LLM processing → Structured wiki → Queryable knowledgeKey insight: “A wiki reference book for the community that writes itself.”
How It Works
The Bot (“ZK Steward” Agent)
Lives 24/7 in the chat and:
- Reads every message
- Processes through LLM (Gemini)
- Extracts useful content:
- Who talked about what topic
- What tools were recommended
- What experiences were described
- Organizes into structured wiki:
- Participant profiles
- Projects
- Tools
- Extracted knowledge
Multi-Source Ingestion
The bot doesn’t just read chat — it also watches YouTube recordings:
- Downloads audio via
yt-dlp - Transcribes via GigaAM (Russian-optimized speech model)
- Segments by speakers using
pyannote - Adds to the same knowledge base
Two sources, one unified wiki.
User Experience
User: @bot Who has experience with free traffic strategies?
Bot: Several members have discussed this:• @AlexK implemented SEO automation for his SaaS — got 2x traffic in 3 months• @MariaP shared her content repurposing workflow on last week's mastermind• @DimitriV recommended using Perplexity for competitor research
[Names are clickable Telegram links — message them directly]Technical Architecture
| Component | Purpose |
|---|---|
| aiogram | Telegram bot framework |
| Gemini | LLM for knowledge extraction and Q&A |
| GigaAM | Russian speech-to-text model |
| pyannote | Speaker diarization (who said what) |
| yt-dlp + FFmpeg | YouTube audio download |
| Markdown files | Wiki storage (Zettelkasten format) |
| VPS | Hosting |
Workflow
┌─────────────────────────────────────────────────┐│ INGESTION ││ ┌─────────────┐ ┌─────────────┐ ││ │ Chat msgs │ │ YouTube │ ││ │ (real-time) │ │ recordings │ ││ └──────┬──────┘ └──────┬──────┘ ││ │ │ ││ ▼ ▼ ││ ┌─────────────────────────────────┐ ││ │ Message logs (accumulate) │ ││ └──────────────┬──────────────────┘ ││ │ Every few hours ││ ▼ ││ ┌─────────────────────────────────┐ ││ │ LLM batch processing (Gemini) │ ││ └──────────────┬──────────────────┘ ││ │ ││ ▼ ││ ┌─────────────────────────────────┐ ││ │ Wiki files (Markdown/Zettel) │ ││ └─────────────────────────────────┘ │└─────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────┐│ QUERY ││ ┌─────────────┐ ││ │ User asks │ ││ │ question │ ││ └──────┬──────┘ ││ │ ││ ▼ ││ ┌─────────────────────────────────┐ ││ │ Gather context from wiki │ ││ └──────────────┬──────────────────┘ ││ │ ││ ▼ ││ ┌─────────────────────────────────┐ ││ │ LLM generates answer │ ││ │ (with profile links) │ ││ └─────────────────────────────────┘ │└─────────────────────────────────────────────────┘Key Implementation Details
Anti-Recursion Pattern
Problem: Bot writes messages to chat. If it indexed its own responses:
- Respond → index → process as new knowledge → update wiki → respond to changes → infinite loop
Solution: Mark every bot message with a signature that the indexer skips.
This is a critical pattern for any self-referential system.
Access Control
- Each community has its own separate wiki
- “Mastermind” members → Mastermind wiki only
- “Meshok” members → Both wikis
- Proper data segregation
Zettelkasten Structure
Uses glossary/zettelkasten methodology:
- Each knowledge unit is a connected note
- Notes link to related notes
- Emerges into a networked knowledge graph
Why This Works
| Traditional Community | This Approach |
|---|---|
| Knowledge lost in chat scroll | Knowledge permanently captured |
| Finding experts = manual search | Finding experts = ask the bot |
| New members start from zero | New members query accumulated wisdom |
| Valuable discussions forgotten | Discussions become wiki entries |
| Maintenance = human effort | Maintenance = zero |
Business Applications
This pattern applies to:
- Company Slack/Teams — Internal knowledge base that writes itself
- Customer communities — Searchable support knowledge
- Professional networks — Expert finder
- Research groups — Literature and discussion synthesis
Lessons Learned
- Batch processing works — Don’t process every message immediately; accumulate and batch
- Anti-recursion is critical — Mark bot outputs to prevent loops
- Multiple sources are powerful — Chat + video creates richer knowledge
- Clickable links = action — Connecting knowledge to people enables follow-up
- Separate bases for access control — One bot, multiple isolated wikis
Connection to LLM Wiki Pattern
This is the glossary/llm-wiki-pattern in production:
- Raw sources = chat messages + YouTube
- Wiki = Zettelkasten markdown files
- Schema = bot’s extraction logic
- Operations = ingest (continuous), query (on-demand)
The creator explicitly credits Andrej Karpathy’s LLM Knowledge Base as inspiration.
Key Takeaways
- Community knowledge can be automatically captured and structured
- Multi-source ingestion (chat + video) creates comprehensive knowledge
- Anti-recursion is a critical implementation detail
- The wiki writes itself — zero manual maintenance
- People links make knowledge actionable
Related
- glossary/llm-wiki-pattern — The underlying pattern
- glossary/zettelkasten — The note structure methodology
- automation/knowledge-management — Broader context
- glossary/ai-agent — The bot as an agent
Sources
- Community post describing the implementation — Telegram channel