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 smart chatbot can answer all questions about your Discourse community and more. The AI Bot has the power to search through your current Discourse instance and beyond with persona support to answer any type of questions you might have.

Features

  • Ability to pick the specific AI Bot persona you want to interact with
  • Flexibility to select the Large Language Model (LLM) provider
  • Multiple people can interact with the AI Bot at the same time within the same message
  • AI-generated titles for private messages (PMs) with the AI Bot
  • Replies are generated continuously through streaming and can be stopped
  • Enable the bot for a specific subset of users or groups
  • Quick access to AI bot via :robot: icon
  • View interactions for debugging purposes
  • Copy and share AI bot conversations

Personas

:information_source: An AI bot that tries to do everything will eventually fail due to forgetting context and LLM limitations. That’s why we have implemented personas to help you get a better experience by delivering the best possible answers.

Full guide to AI personas available here. You can create custom AI personas for the bot that are tailored to your needs.

Depending on the help you need, there are several pre-defined default personas to choose from

  • 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. Needs 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?

Enabling AI Bot

Prerequisites

You must configure at least one Large Language Model (LLM) from a provider.

To get started you can configure them through the Discourse AI - Large Language Model (LLM) settings page.

Optionally, configure the following to get extra features:

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. Checkmark ai bot add to header to enable quick access via the :robot: icon at the top right
  4. We recommend picking the group of users through ai bot allowed groups to allow specific access to the AI Bot.
  5. Go to the LLMs settings tab and check the Allow AI Bot option for the appropriate LLM that has been previously configured.

Monitoring 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, gpt4_bot etc 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 @Saif 2024-11-04T18:25:17Z

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

Check documentPerform check on document:
36 Likes