Discourse AI - AI bot

:bookmark: This guide explains how to enable and configure the AI bot feature of the Discourse AI plugin.

:person_raising_hand: Required user level: Administrator

The AI Bot is a chatbot that allows for direct integration with generative AI powered by OpenAI (ChatGPT), Anthropic (Claude), Stability AI (Stable Diffusion) and others!

AI Bot walkthrough

Features

The AI bot includes a number of useful features:

  • Ability to pick the specific AI Bot persona you want to interact with
  • Flexibility around which Large Language Model (LLM) provider you can use (Anthropic/Open AI)
  • Multiple people can interact with the AI Bot at the same time in the same UI
  • Automatically titles personal messages (PMs) with the AI Bot
  • Replies are generated continuously through streaming and can be stopped at any time
  • Enable the bot for a specific subset of users

Personas

Instead of a “single bot” that tries to do everything but eventually forgets and fails because of LLM limitations, picking the appropriate persona on the start gets you a way better experience.

You can read the full guide to AI personas here.

Depending on the help you need, you have several different “personas” to choose from. These personas are predefined, and users can pick any of the personas before chatting with the AI bot. These personas are designed to best serve the needs of your community and help you get the best answer to your questions:

  • Forum Helper: General purpose AI bot capable of performing various tasks. Can search your current Discourse instance and use that information to build responses
    • i.e - What are the top posts for AI?
  • SQL Helper: AI Bot specialized in helping craft SQL queries on this Discourse Instance (aware of your current DB schema)
    • i.e - Write me a query to find all the AI bot messages by a specific customer/user
  • Artist: AI Bot specialized in generating images. Need a Stable Diffusion API key
    • i.e - Draw me a picture of a cat
  • Settings Explorer: AI Bot specialized in helping explore Discourse site settings. (aware of Discourse source code)
    • i.e - How do I enable Discourse AI on my Discourse site?
  • Researcher: AI Bot with Google access and the ability to browse web pages to research information for you. Need a Google Custom Search API key
    • i.e - How many legs does a dinosaur have?
  • Creative: AI Bot without any external integrations
    • i.e - Come up with 5 ideas to improve community engagement
  • GitHub Helper: AI Bot specializing in researching GitHub repositories
    • i.e - What doe LINK_TO_PR do?

:information_source: You can create custom AI personas for the bot that are tailored to your needs.

Availability

Discourse AI is available on all of our hosted plans, and it comes pre-installed on most plans. If you’re an Enterprise customer you can contact us to have it added to your site on request.

:information_source: Please note that this module also requires a separate subscription to an LLM (see below for more details).

Self-hosted users can install the plugin any time by following the plugin installation guide.

Enabling AI Bot

Prerequisites

In order to use the AI bot, you must provide your own API Keys. This means configuring at least one provider for a Large Language Model (LLM) from the options below:

Configuration

  1. Go to Admin settings-> Plugins → AI → Settings tab and make sure its enabled (discourse ai enabled)
  2. Checkmark ai bot enabled to enable AI Bot
  3. Pick the group of users through ai bot allowed groups to allow specific access to the AI Bot.
  4. Go to the LLMs settings tab and check the Allow AI Bot option for the appropriate LLM that has been previously configured.

Monitoring Chat Discussions

In some cases, you may want to monitor bot discussions so you can improve the performance of your bots.

If you plan to do so, we recommend enabling the ai_bot_enable_chat_warning, this will show a warning to users explaining that conversations are monitored.

Then as an administrator, add a link to your sidebar:

https://discourse.example.com/u/BOT_NAME/messages

BOT_NAME is the username of the bot you wish to monitor.

Technical FAQ

Why am I seeing bot users such as claude_bot, gpt3.5_bot and gpt4_bot being added as admins to my site?

  • These users are necessary for AI Bot to function. They don’t do anything in the background and are only used when interacting with the bot.

Where do I edit personas?

  • Head to discourse.example.com/admin/plugins/discourse-ai/ai-personas where you can control which personas are enabled and who gets access to each one.

Is the AI Bot trained on my community data?

Caveats

  • The AI bot is an area of much experimentation and is changing rapidly
  • The AI bot does not always provide 100% accurate results, so make sure to check any output carefully
  • We recommend enabling the bot for specific user groups to help control costs, as third-party providers charge on a per-usage basis

Last edited by @michebs 2024-09-20T15:40:18Z

Last checked by @hugh 2024-08-06T01:48:26Z

Check documentPerform check on document:
33 Likes