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:

  1. Searches your knowledge base for content relevant to the user's question
  2. Pulls the most relevant pieces of information
  3. Uses AI (Anthropic Claude) to generate a natural response based on that information
  4. If no relevant content is found, it escalates to human staff instead of guessing
Info: DuffyBot will never make up information. If the answer is not in your knowledge base, it will tell the user it does not know and get a human involved.

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

  1. Go to Knowledge Base > Channels in the dashboard
  2. You will see a list of text channels in your server
  3. Toggle on the channels you want to index
  4. 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.
Tip: Indexed channels are automatically monitored. Any new messages posted in an indexed channel will be added to the KB in real time.

Website Scraping

If you have an external website with support content (help center, FAQ page, documentation), DuffyBot can scrape it.

  1. Go to Knowledge Base > Website in the dashboard
  2. Enter your website URL (e.g., https://help.example.com)
  3. 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.

Warning: Website scraping works best on text-heavy pages. It cannot extract content from images, PDFs, or JavaScript-rendered single-page apps.

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.

  1. Go to Knowledge Base > GitHub in the dashboard
  2. Enter the repository URL (e.g., https://github.com/your-org/your-repo)
  3. 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.

  1. Go to Knowledge Base > Manual in the dashboard
  2. Click "Add Entry"
  3. Write your content and save
Tip: Manual entries are great for filling in gaps. If the AI keeps getting a specific question wrong, add a manual entry with the correct answer.

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