Improved AI content labelling in the composer for post content

AI-generated summary

martin announced an update to the Discourse composer that allows forum members to label AI-generated content within posts. This feature aims to increase trust by clearly distinguishing between human and AI-created material, extending beyond the previous AI indicator used only for quotes in the AI plugin. The update supports labelling for code, quotes, and details blocks.

Users can label content in three ways: using a new composer submenu that inserts a placeholder with the indicator applied; adding the ai attribute to details blocks (e.g., [details="Summary" ai]); or prefixing quote blocks with [!AI]. Code blocks can also be labelled by adding the ai attribute after the language specifier (e.g., javascript ai).

In response, per1234 asked whether this feature is part of Discourse core or a separate component, requesting a link to the GitHub PR or commit to help track when their own forum would receive the update. southpaw provided the relevant pull request link, confirming the implementation details for those wishing to track the feature’s rollout.

We are living in a world now where forum members may have the need to share content in their posts that is partially or wholly AI generated content.

We already had an AI indicator that the AI plugin used for quotes, but it’s time we expanded this capability and put this labelling in the hands of regular members, it’s an important distinction to make to increase trust between people in online communities.

Code, quotes, and details blocks can be labelled as AI content. There are a few different ways you can now label AI content in posts. The easiest way is to use this new composer submenu that will insert a placeholder with the AI indicator already applied:

Details

Simply add an ai attribute, which works with and without the details summary:

[details="Summary here" ai]
This is AI content in a details block
[/details]
Summary hereAI

This is AI content in a details block

Quotes

This one is a little odd, but still simple. Add [!AI] to the start of the quote block:

> [!AI]
> This is a quote made by AI

This is a quote made by AI

Code

Similar to details, you can add an ai attribute, with or without the language specified:

```javascript ai
console.log("This code is made by AI");
```
console.log("This code is made by AI");

Feedback is welcome in this topic!

5 Likes

Nice feature!

I would like to add this to the Discourse-based forum I manage. Can you provide information about that possibility? Is this part of the Discourse core, or implemented as a separate component?

If it is in the core, it would be great if you would provide a link to the GitHub PR or commit where it was implemented. That would allow me to more easily identify when my forum is updated to the Discourse version that has the feature.

Hi @per1234,

Here’s the PR:

3 Likes