Knowledge Base
The knowledge base (KB) is the foundation of DuffyBot's AI responses. It is the collection of content the AI searches through when answering support tickets. The better your knowledge base, the better the bot's answers.
How It Works
When a user sends a message in a ticket, DuffyBot:
- Searches your knowledge base for content relevant to the user's question
- Pulls the most relevant pieces of information
- Uses AI (Anthropic Claude) to generate a natural response based on that information
- If no relevant content is found, it escalates to human staff instead of guessing
Knowledge Base Sources
Discord Channels
The easiest way to build a knowledge base is to index existing Discord channels that already contain helpful information. Good candidates include:
- FAQ channels
- Announcement channels (product updates, patch notes)
- Guide or tutorial channels
- Rules channels
- Any channel where staff have posted helpful information
Adding channels from the dashboard
- Go to Knowledge Base > Channels in the dashboard
- You will see a list of text channels in your server
- Toggle on the channels you want to index
- DuffyBot will immediately start scraping all existing messages from those channels
Adding channels from Discord
You can also index a channel directly from Discord using the slash command:
/indexRun this command inside the channel you want to index. DuffyBot will scrape all messages./unindexRun this in an indexed channel to remove it from the knowledge base and delete its entries.Website Scraping
If you have an external website with support content (help center, FAQ page, documentation), DuffyBot can scrape it.
- Go to Knowledge Base > Website in the dashboard
- Enter your website URL (e.g.,
https://help.example.com) - Click "Scrape" to start. DuffyBot will crawl the pages and extract text content
The scraper follows links within the same domain, so it will automatically discover sub-pages. You can rescrape at any time to pick up new content.
GitHub Repositories
If your project lives on GitHub, DuffyBot can import content directly from your repositories. This is useful for pulling in README files, documentation, wikis, and other text-based content.
- Go to Knowledge Base > GitHub in the dashboard
- Enter the repository URL (e.g.,
https://github.com/your-org/your-repo) - DuffyBot will fetch and index the repository content
This is ideal for developer-facing communities where documentation already lives in GitHub.
Manual Entries
You can also write knowledge base entries by hand. This is useful for content that does not exist anywhere else, or for adding specific answers you want the AI to know.
- Go to Knowledge Base > Manual in the dashboard
- Click "Add Entry"
- Write your content and save
Best Practices
Write clear, specific content
The AI works best when your knowledge base has clear, direct answers. For example:
- Good: "To reset your password, go to Settings, then Account, then click Reset Password."
- Bad: "Check the settings" (too vague for the AI to give a useful response)
Cover common questions
Look at your most frequently asked support questions and make sure each one has a clear answer in your knowledge base. The top 20 questions likely make up 80% of your tickets.
Keep it up to date
If your product changes, update the knowledge base. Outdated information leads to wrong answers, which frustrates users more than no answer at all.
Use FAQs for exact matches
For questions that have a single, definitive answer, consider creating FAQs in the dashboard (FAQs section). FAQs are matched before the AI is called, which means instant responses at zero AI cost.
Managing Your Knowledge Base
From the dashboard, you can:
- View all indexed channels and their entry counts
- Toggle channels on/off without losing data
- Rescrape channels to pick up new messages
- View and manage website-scraped pages
- View and manage GitHub repository imports
- Create, edit, and delete manual entries
- See when each source was last updated
From Discord, staff can use:
/kb listShows all indexed channels, entry counts, and last scrape times./kb scrape #channelManually triggers a rescrape of an indexed channel.Content Limits
There is no hard limit on how much content you can add to the knowledge base. However, keep in mind:
- Quality matters more than quantity. 50 well-written FAQ entries will outperform 5,000 random messages
- The AI only looks at the most relevant pieces of content for each question, not the entire KB
- Very short messages (under a few words) are generally not useful as KB entries