Discourse AI - AI Helper

:bookmark: This guide explains how to set up and use the AI Helper feature of the Discourse AI plugin, including its capabilities and configuration options.

:person_raising_hand: Required user level: Administrator

The AI Helper is a component of the Discourse AI plugin that assists users in various aspects of community interaction, such as creating topics, writing posts, and reading content. It’s designed to enhance user productivity and improve the overall quality of contributions.

Summary

This guide covers:

  • An overview of AI Helper features
  • Visual demonstrations of AI Helper in action
  • How to enable and configure AI Helper
  • Available settings and their functions
  • Technical details and frequently asked questions

AI Helper features

Within the composer

AI Helper offers several features when creating new topics or replies:

  • Generating topic titles, tags, and categories based on the content
  • Proofreading text - including grammar and spelling checks.
  • Translating selected text to the forum’s default language
  • Creating Markdown tables from selected text
  • Custom prompts for various text transformations
  • Viewing and managing AI-suggested changes

Here’s a demonstration of AI Helper features within the composer:

:information_source: Note: In this demonstration, there was already written content in the composer.

The keyboard shortcut CTRLALTP can be used to proofread text and provide grammar and spelling assistance.

While reading topics and posts

When browsing the forum, AI Helper can:

  • Translate selected text to the user’s interface language
  • Explain the meaning of selected text within the context of the topic

Here’s an example of AI Helper’s “Explain” feature while reading a topic:

Enabling AI Helper

:discourse: Hosted by us? Currently, this module is available for Enterprise customers. Please contact us to have it added to your site.

:information_source: Self-hosted users can install the Discourse AI plugin anytime by following the plugin installation guide.

Prerequisites

To use AI Helper, you must configure at least one Large Language Model (LLM) provider. Options include:

Configuration steps

  1. Navigate to AdminSettingsDiscourse AI
  2. Ensure the discourse ai enabled setting is checked
  3. Filter settings by ai helper
  4. Enable the AI Helper feature by checking composer ai helper enabled
  5. Select your preferred LLM in the ai_helper_model setting
  6. Use ai helper allowed groups to restrict Composer AI Helper usage
  7. Use post ai helper allowed groups to limit Post AI Helper feature access

Customizing AI Helper features

You can selectively enable or disable specific AI Helper features using the ai_helper_enabled_features setting. Available options include:

  • suggestions: Controls suggestion buttons for titles, categories, and tags
  • context_menu: Manages the menu for custom prompts, translation, and proofreading
  • image_caption: Toggles the “Caption with AI” button for uploaded images

Technical details

  • AI Helper requires a minimum of 10 words in the composer to function
  • The “Explain” feature uses the topic title, post content, and selected text as context for the LLM
  • Custom prompts can be used for various purposes, such as changing tone or translating to specific languages

Frequently asked questions

Q: Why don’t I see the AI Helper icon in the composer?
A: Ensure you’ve entered at least 10 words of content in the composer.

Q: How accurate are AI Helper’s translations?
A: While generally reliable, translations may be less accurate for uncommon languages.

Q: Can I control AI Helper usage to manage costs?
A: Yes, you can limit AI Helper access to specific user groups to help control costs associated with third-party LLM providers.

Additional resources

Last edited by @sam 2024-09-06T02:02:38Z

Last checked by @hugh 2024-08-06T02:33:06Z

Check documentPerform check on document:
4 Likes

Sorry I can’t give this topic a like at present. :slightly_frowning_face: Don’t take that to mean I don’t like what the AI is doing, I think that part is great.

The video started from a Draft and most users will start from New Topic so it was a bit confusing for me when I tried this on the OpenAI forum where this is active thinking it should work.

When I started with New Topic I had to enter the title, select a category, skipped adding tags and add two lines in the post before the magic AI options appeared.

image

Then after adding more text the AI buttons appeared.

image


I do find the post quite useful and you did a nice job, just needs some clarification for users not use to this technology.

Side note:

In the early days of the Discourse AI there was the ability to have the AI generate a new title for the topic based on the existing text. I used this often as a category moderator when they titles ran long, think wrapped around when viewing in a list. Then the way to do this vanished; I may have missed how it was supposed to be done but now it is back with this.

As a category moderator one can not edit a post and the AI option is next to the title for changing.

Was looking for that in the announcement, might be worth a mention. :wink:


The following post contains some screenshots.

1 Like

Hey @EricGT so the video I put in a note that says that the content is already there. It was trying to make the demo video as short and succinct as possible.

I have the following documented for that reason!

1 Like

Little update on this one…

You can now select/deselect AI helper features using the setting ai_helper_enabled_features: :partying_face:

3 Likes

 ai_helper_model: We couldn't get a response from this model. Check your settings first.

What could be the problem? I’ve identified the Open AI key.

Is your OpenAI API key working? Can you issue a request for that same model from your PC?

2 Likes

It seems like it’s showing as unused in the OpenAI dashboard. But could it be because the configuration wasn’t completed? How can I verify this on my local machine?

What features are available, and what does each one do?

1 Like

The AI helper in the composer encompasses three main features including suggestions, context_menu, and image_caption

The setting allows us to have granular control of the AI helper by being able to enable/disable those main features.

  1. suggestions refers to the the suggestion buttons that appear in the composer next to the title/category/tags. Clicking the suggestion button can suggest topic titles, category, tags, etc.
  2. context_menu refers the the menu that appears when you select a portion of text in the composer, i.e. the menu that pops up with the custom prompt/translate/proofread/etc
  3. image_caption refers to the “Caption with AI” button that appears when you hover over an uploaded image in the composer preview. This allows you to generate a caption based on the contents of the image.
1 Like

Instead of a setting for which features are enabled, how about a setting for each, for which groups each is enabled for (if any)?

And actually, also… could the context menu items be separated? Ideally the same suggestion — list of groups for each.

I think eventually we would like to move to a system to provide more granular control of features within AI Helper and in other AI features, something in the radar for the future

1 Like

I think “translate to English” is outdated.

Now it’s translate to user’s interface language

Now it’s translate to forum’s default language

3 Likes

Is there any way do add additional prompt or instructions to the translation prompt?

In our case we want to offer translations EN->DE and add the instruction to use the informal you (Du) instead of the formal (Sie) you by default.

first, your AI stuff rocks!

second, if we post PDF or word or powerpoint files to our forum, will it also read those and chunk them up into vectors for RAG?

1 Like

Sadly we do not have PDF support yet, it is something we are thinking about. We do support TXT files in our Persona and Tool RAG implementation. So as long as you are able to convert the source material to text files you can consume it in a persona.

2 Likes

yes, that is what we did, we converted attachments to text and associated those with each topic.

1 Like

We have seen this feedback a few times and are considering expanding extension support in the future through our AI bot persona and Tool RAG implementation

as a work around for now, we just convert the powerpoint or word or PDf file to text and attach it to the same topic it belongs with.

1 Like