TSG Forge Bot
RAG-powered Discord bot for the Halo Infinite Forge community -- documentation Q&A, flowchart generation, and automatic wiki article creation as Git pull requests.
The challenge
The Scripter's Guild is the Halo Infinite Forge community -- players who build custom maps, modes, and experiences using a node-based visual scripting system with hundreds of nodes, events, and connection pins. When a newcomer asks "How do I spawn a player at a checkpoint?" or "Why isn't my On Player Spawned node firing?", someone with expertise needs to answer.
The knowledge base spans two sources: the ForgeWiki (a GitBook wiki with hundreds of markdown pages) and Discord forum history (years of exported threads from help channels). The bot needs to read both, understand the relationship between canonical documentation and community-derived knowledge, and answer questions in real-time.
The bot's inference, embeddings, and knowledge base run on self-hosted infrastructure with no cloud model API. Discord remains the delivery platform and its API is required for operation.
What was built
A Discord bot backed by a Python AI service that implements a full search-and-retrieve pipeline.
The RAG pipeline
Export: Discord forum threads exported via the Discord API, preserving author metadata, timestamps, attachments, and solved-state tags. Four help forums tracked independently.
Indexing: All source files discovered, parsed into chunks, and embedded via a local model for vector search. Incremental updates compare file hashes so unchanged content is skipped on re-index.
Answer generation: When asked a question, the bot searches the knowledge base, reads relevant source sections before making strong claims, and can generate flowcharts to explain complex concepts visually. Answers include inline citations with source links back to the wiki or forum thread.

Visual explanations
The bot generates color-coded flowcharts to explain complex algorithmic concepts -- essential for a community that works with visual node-based scripting.

Automatic wiki articles
Resolved help threads are converted into structured article drafts and opened as Git pull requests for human review.


Source-balanced retrieval
Two knowledge sources shouldn't compete unfairly. The search layer fetches candidates from both the wiki and Discord exports separately, merges and deduplicates. Solved help threads get a small relevance boost; generic reference pages get penalized. A reranking step ensures the most relevant results surface first.
The result
- Self-hosted AI inference for the Halo Infinite Forge and S&Box communities, with no per-query model API fee. Discord remains the delivery platform and its API is required for operation.
- Cited answers from a local knowledge base of hundreds of wiki pages and years of forum history
- Multimodal support -- node graph screenshots analyzed alongside text questions
- Evidence hierarchy reduces overconfident answers by prioritizing canonical documentation over curated community material and individual help posts