New AI Persona Editor for Discourse

We are thrilled to announce the release of a brand new feature in Discourse: the AI Persona Editor. This feature, as part of our AI offerings, allows you to customize and enhance the interaction experience on your Discourse platform by tuning the way users interact with Language Learning Models (LLMs) such as Claude or Open AI GPT models via the AI Bot feature.

What is the AI Persona Editor?

The Persona Editor is an administrative interface that allows you to manage and customize AI personas.

You can access this new admin UI at /admin/plugins/discourse-ai/ai_personas. Please note that currently, only admins have access to the editing interface.

Key Features

Each persona has the following attributes:

  • Name: Unique name for each persona.
  • Description: Detailed explanation of what the persona does, displayed in persona drop down.
  • Commands: List of tasks the persona can perform. (such as search, read topics etc:)
  • System Prompt: The persona’s default interaction prompt. This sets the tone for how it works.
  • Allowed Group IDs: Groups that can interact with the persona.
  • Enabled: Whether the persona is active or not.
  • System: Whether the persona is a system entity or not.
  • Priority: Determines the order in which personas are listed.

For system personas, you can only change the “enabled”, “priority” and “Allowed group ids” attributes. The “system prompt”, “commands”, “name”, and “description” of a system persona cannot be changed. Priority personas are sorted at the top of the list, with everything else sorted alphabetically.

Keep in mind that you can see all the stock system prompts in this interface which you can use as templates for your own customizations.

Customizing Personas

With the Persona Editor, you can customize the list of personas that end users have access to. For instance, you may want to set it up so only staff have access to the SQL Helper and Setting Explorer personas. This allows you to tailor the personas to the specific needs and roles within your community.

Out-of-the-Box Personas

We already have a wide variety of pre-configured personas. You can view the full list of personas here.

Enhanced Use Cases

Here are a few ways you can use personas:

  1. Search Google in Japanese: Create a persona that translates user queries into Japanese and searches the Japanese web, providing a unique way to access and explore content from a different perspective.

  2. Content Moderation: Paste your Code of Conduct into the system prompt and ask the AI if the content meets the standards or not. This can be a powerful tool for maintaining a respectful and inclusive community environment.

  3. Documentation Helper: Create a persona that prioritizes searching your docs categories over anything else, providing quick and easy access to important information.

  4. Custom SQL Helper: Paste in schema for your database, tell it what dialect of SQL you use and you can get a SQL helper that is tuned for your own bespoke DB.

Future Ideas

We’re always looking to improve and expand the capabilities of the Persona Editor. Here are a few ideas we’re considering for future enhancements:

  • Remote API Access: Allow a persona to have access to remote APIs of your choosing. This could open up a wide range of possibilities for integrating external services and data sources.
  • Custom Content: Allow a persona to have access to custom content that you upload and we embed. This could be a great way to provide unique, personalized content for your users.

For more information about Discourse AI and the new AI Persona Editor, check out these resources:

We hope you enjoy this new feature and find it useful. We look forward to seeing the creative ways you will use the Persona Editor on your Discourse platform!

33 Likes

Hello,

Regarding the" Enabled Commands" features, our staff quite like it. Is there any documentation that explains what these commands do exactly? We’re a bit confused, for example, as it seems AI can search both the forum and the internet. We can only guess that for example: Dall-E is calling Dall-E , Summarize is ask ai to work, but Tags? Time ? Anyone can point out the right direction for me ? thanks

6 Likes

In addition, can we change the bot username and icon to make it more customized? At moment is is called GPTx_bot etc. I know we can change the user name and profile pic from the Admin panel , If I change the default name from gptx_bot to different names, will it cause any issues?
thanks

4 Likes

Will work on adding documentation over the next week or two. I want to add support for command params, so this will be a good opportunity to add a description string there.

Tags, just allows the bot to look up the list of tags
Time allows the bot to look up current time at any time zone

Attaching a persona to a user is certainly something I want us to get to, for sure.

You can safely change the username of the bot and upload a custom avatar, we use the user_id as a key there, so those changes will be stable.

7 Likes

4 posts were split to a new topic: AI Persona list not scrollable

Custom persona is an exciting development! I jumped right in to make one but I don’t seem to have anything under the “Enabled Commands” menu, so my bot can’t really do anything other than chitchat. This is on a self-hosted instance - everything up to date as of a few minutes ago. Just want to make sure I’m not missing something obvious.

2 Likes

thanks so much for raising, we temporarily regressed here, I just added a test so we will not regress again, fix will be merged probably on monday, weekend here :slight_smile:

6 Likes

Any updates here by chance? Our use case would be integrating a bunch of manuals and operating tips documents and allowing those be referenced alongside all the forum-generated content from our members.

3 Likes

Still thinking about the exact implementation, there are many moving parts

Nothing concrete yet.

6 Likes

Is this done by prompting or will this be a future setting?

1 Like

Already supported, create a new persona, add the search tool, you can specify the filter to apply

2 Likes

Oops, overlooked! Can these personas use multiple tools in one answer? I am trying to get it to search & read at least the first result, however no matter how I prompt it likes to search and bases the answer on this, instead of reading posts from the results, leading to responses that are pretty illogical in the context (documentation assistant).

1 Like

It can certainly run multiple tools, but some models like gpt 3.5 are super hard to convince

Maybe try haiku

2 Likes

I was using Haiku since start, getting better results now after some more prompting. Something like “if you used the SEARCH tool, you must at least perform one READ action” did the job.

2 Likes

The image in the first post appears to be broken.

2 Likes

I noticed the personas always search for order:latest which does not really give the search results I expect it to get, changing this with prompting did not really work. Is there another way to tweak this?

1 Like

You should be able to prompt engineer your way out of this:

order is one of the params the search tool gets … it does not even default to latest.

You can force an ordering by wacking in a base query on your tool and prompting it asking it never to supply order: discourse-ai/lib/ai_bot/tools/search.rb at e8d110b444df8ab540232d050ed8c3744a5f38e6 ¡ discourse/discourse-ai ¡ GitHub

3 Likes

I was actually just referring to that part of the code and am playing around with the prompting.

In my experience, when dealing with longer context/chains on “cheaper” models combined with negatives in the prompting can also backfire, but it seems Haiku handles this pretty well at the first tries it seems (avoiding usage of “do not” and using terms like “never” or “avoid” helps here btw).

Thanks for the insights.

BTW, small bug (or not?): when u use a persona with a user set-up, the DM participants are: ai-model-bot, me and new-bot-user, strangely this caused the new-bot-user to respond with “Hey ai-model-bot”, instead of “Hey Marc” :smile: is ai-model-bot there for a reason?

1 Like

Hmm this is a odd certainly something that we can fix. I wonder if the model is just confused cause we ship the user name in the prompt with the original question.

Opus seems to get this right…

1 Like

I’ve had enough conversations to say it was a confusion and I think it only affects the lower-end models. But some of my personas look “Human” so it was definitely funny to see a third participant in a DM.

Is there an easy way to style the share convo page btw? I notice it ignores theme/component styling.

1 Like