Discourse AI - AI 트리아지

AI 트리아지는 게시물의 분류 과정을 자동화하여 포럼 게시물의 관리와 모더레이션을 강화하도록 설계되었습니다.

이 기능을 사용하려면 discourse-automationdiscourse-ai 플러그인 모두를 설치해야 합니다.

사용 사례

  1. 자동 게시물 카테고리 분류: AI 트리아지는 게시물의 내용에 따라 주제를 자동으로 분류할 수 있습니다. 이는 수동 분류에 시간이 많이 소요되는 대규모 포럼에서 특히 유용합니다. 규칙을 특정 주제 하위 집합(첫 번째 주제만 또는 특정 카테고리에 게시된 주제)에 적용할 수 있습니다.

  2. 게시물 태그 지정: AI 트리아지는 게시물에 지정된 태그를 할당할 수 있습니다. 이 기능은 게시물의 조직화를 돕고 주제 검색 및 검색 효율성을 높입니다.

  3. 자동 응답: AI 트리아지는 사전 정의된 응답을 사용하여 게시물에 대한 답변을 생성할 수 있습니다. 이는 자주 묻는 질문이나 일반적인 문의에 대응하거나 스팸을 스팸 카테고리로 이동하는 등 다양한 용도로 유용합니다.

  4. 주제 숨김: AI 트리아지는 특정 기준에 따라 주제를 숨길 수 있습니다. 이는 스팸이나 부적절한 콘텐츠를 관리하는 데 사용할 수 있습니다.

  5. NSFW/독성/스팸 감지

작동 방식

AI 트리아지는 AI 모델을 사용하여 게시물 내용을 분석합니다. 이 분석을 기반으로 모델이 특정 텍스트를 반환하면 지정된 작업을 수행합니다. 이러한 작업에는 게시물을 지정된 카테고리로 이동, 태그 추가, 사전 정의된 응답으로 답변, 주제 숨김 등이 포함됩니다.





설정

:spiral_notepad: 시스템 프롬프트 필드는 에이전트(Agents)를 선호하도록 변경되어 더 이상 사용되지 않습니다. 이 변경 사항 이전에 AI 자동화를 사용하셨다면, 관련 시스템 프롬프트가 포함된 새로운 에이전트가 자동으로 생성됩니다.

AI 트리아지를 설정하려면 다음 매개변수를 지정해야 합니다:

  • 에이전트(Agent): 트리아지에 사용할 에이전트입니다. 아래 작업을 트리거할 수 있는 단일 단어 응답하도록 설정했는지 확인하십시오.
  • 텍스트 검색: LLM 응답에 다음 텍스트가 나타나면 아래 작업을 적용합니다.
  • 최대 게시물 토큰 수: LLM 트리아지를 사용하여 스캔할 최대 토큰 수입니다.
  • 중단 시퀀스(Stop Sequences): 모델이 이 값 중 하나에 도달하면 토큰 생성을 중단하도록 지시합니다.
  • 최대 출력 토큰 수: 지정된 경우, 모델이 생성할 수 있는 최대 토큰 수의 상한선을 설정합니다.
  • 개인 메시지 포함: 개인 메시지도 스캔하고 트리아지합니다.
  • 카테고리: 지정된 텍스트가 발견되면 게시물이 이동될 카테고리입니다.
  • 태그: 지정된 텍스트가 발견되면 게시물에 추가될 태그입니다.
  • 주제 숨김: 이 옵션이 활성화되어 있으면 지정된 텍스트가 발견될 때 주제가 숨겨집니다.
  • 게시물 플래그: 활성화되면 해당 주제가 모더레이터, 스태프, 관리자가 조치를 취할 수 있도록 검토 대기열에 플래그가 지정됩니다.
  • 플래그 유형: 적용할 플래그 유형입니다. 옵션은 다음과 같습니다:
    • 게시물을 검토 대기열에 추가 — 검토 대기열에만 전송
    • 게시물을 검토 대기열에 추가하고 숨기기 — 검토 대기열에 전송하고 게시물 숨김
    • 게시물을 검토 대기열에 추가하고 삭제 — 검토 대기열에 전송하고 게시물 소프트 삭제
    • 게시물을 검토 대기열에 추가, 게시물 삭제 및 사용자 무음 처리 — 검토 대기열에 전송, 게시물 소프트 삭제, 사용자 무음 처리
    • 스팸으로 플래그 지정 및 게시물 숨기기 — 스팸으로 플래그 지정 및 숨김
    • 스팸으로 플래그 지정, 게시물 숨기기 및 사용자 무음 처리 — 스팸으로 플래그 지정, 숨김, 사용자 무음 처리
  • 응답 사용자: 사전 정의된 응답에서 언급될 사용자입니다.
  • 응답: 지정된 텍스트가 발견될 때 게시될 사전 정의된 응답입니다.
  • 응답 에이전트(Reply Agent): 응답에 사용할 AI 에이전트입니다. 기본 LLM을 가져야 하며, 사전 정의된 응답보다 우선순위가 높습니다. Discourse AI - AI 트리아지 에이전트 사용과 달리 조건부로 응답합니다.
  • 위스퍼로 응답(Reply as Whisper): AI의 응답이 위스퍼로 표시될지 여부입니다.
  • 저자에게 PM으로 알림: 게시물이 대기열에 등록되고 삭제될 때 게시물 저자에게 개인 메시지를 보냅니다.
  • PM 발신자: PM을 보낼 사용자 (기본값: 시스템).
  • PM 내용: 저자에게 보낼 선택적 사용자 정의 메시지입니다.

주의사항

  • LLM 호출은 비용이 들 수 있습니다. 분류기를 적용할 때 비용을 모니터링하고 항상 작은 하위 집합에서만 실행하도록 주의하십시오.
  • 우리가 테스트하고 (고객을 위해 프로덕션에서 실행한) 특정 사용 사례는 사용자의 첫 번째 주제 분류입니다.
  • AI 봇을 사용하여 에이전트의 시스템 프롬프트 작성을 돕는 것을 권장합니다.
37개의 좋아요

Being one one of the lucky ones to see this in action this is one feature for large sites that you should really understand and consider using.

As it works using an LLM based AI it does not always reach the correct conclusion but it gets so much right in the cases I have seen it used for a few days doing some of the work of a moderator that it definitely was a significant benefit.

Some of the early discussions with this are in the Lounge category on the OpenAI site. While access to that category can be had by anyone, the TL3 requirements must be meet and with OpenAI being a large site it does take quite a bit of effort to get to TL3 on the site.

For those with access here is the link

https://community.openai.com/t/lost-users-first-empirical-data/403082/95


Basically what the logic is doing to help the moderators for a specific problem is that we are seeing about 5% of the post from new users that think the forum is where they post questions to ChatGPT, clearly they are lost or perhaps a search result is providing an invalid link. The AI identifies such post, replies with prewritten text and changes the category and tags as needed, e.g.


For the case noted, here is what the “Discourse AI Post Classifier - Automation rule” is doing

Automated Post Categorization
The classifier is changing the category to ChatGPT as needed. As most new users will not select a category, the OpenaAI site currently defaults to the category API for new post which is incorrect in this case.

Post Tagging
The classifier is charging the tag(s) to lost-user in this case. The tag name was created by a TL3 user on the forum who was manually changing the tags.

Automated Responses
The classifier is replying with a prewritten post.

Topic Hiding
The topics are being unlisted as they were not of value to developers who use the site.

Reply User
System is being used as the creator of the reply.

Note: I would provide the Configuration for this but lack the access. Maybe @Sam can add the details, AFAIK it can be made public as nothing is confidential in the configuration. As it is for a specific site would not expect to find it in the public repository. If you understand this technology then it is not hard to guess the correct values, or close to them. The System Prompt did take some work and perhaps @sam can share some of the lessons learned, the knowledge of how to craft the prompt was of great value during the development phase.

System Prompt

Note: This is a version posted in the OpenAI Lounge (ref) pretty sure the final version is different but one example saves a lot of guessing.

You are bot that is triaging all first interactions a user has on the OpenAI developer forum.

Please only ever respond with “ok” or “bad”

Posts are on topic and ok if:

They relate to OpenAI APIs / Community / Plugin development / Documentation / Prompting
They are about developing or improving methods for prompting large language models
They relate to AI in a general way
They involve complex discussions or logical problems related to AI
Posts are bad if:

A user appears to be having a random conversation with ChatGPT
A user is off topic discussing an unrelated field
A user is prompting a large language model to generate text without a clear purpose
You have extreme difficulty understanding what they are about
Relates to an OpenAI topic BUT is clearly a conversation with a bot
A user is attempting to train or test the AI model through their post
A user is giving instructions or asking for responses in a non-discussion format
A user is posting content that is not conducive to meaningful discussion or learning
A user is posting hypothetical or speculative content without clear relation to OpenAI’s scope
A user is posting the entire post in a language that is not English
Please classify the following content surrounded by [[[]]]:

[[[
%%POST%%
]]]

FYI

If you are a moderator on a site using this and you want/need to see a list of unlisted post, remember that you can not use search. However you can navigate to such a list using the category then selecting the tags. Or you could also hand craft the url, e.g. https://community.openai.com/tags/c/chatgpt/19/lost-user


Yes it even works for languages other than English

However it does not work with images :wink:, it will not convert an image to text then run the check, e.g.

Here is a recent false positive or at least I think so.


For the details on false/true negative/positive - Classification: True vs. False and Positive vs. Negative

17개의 좋아요

A possible feature.

At least for moderators reviewing a post, convert the text to the language of the moderator when they view the topic. This is not implying just for a flag but for any viewing of the post.


At times when reviewing the actions of the Discourse AI Post Classifier there is a need to convert the text of the post to my language (English) to check if the AI took a correct action. Currently it is easier for me to paste the text into Google Translate.

4개의 좋아요

Worth noting and related to this side quest.

@keegan is working on integrating AI helper into our popup menu. So in future in cases where there is a bunch of text in an unknown language you will be able to just highlight the text and hit translate.

We support that in the composer today, but once merged you will be able to highlight text in any Discourse post and get a quick LLM based translation.

6개의 좋아요

This … changes the game for me. Where can I send thank you cards.

5개의 좋아요

What is an example of how to do this by referencing the existing tags your forum has today? e.g. the post is analyzed by the LLM and the most likely/relevant tags are added to the post.

3개의 좋아요

I love this question, can you expand on it please… how would you like to see this work?

  • Would you apply “auto tagging” if the topic already has tags?
  • Would you apply it on all first posts or just on first posts by particular groups? (eg: tl0 / tl1)
  • Is this something you would prefer to run by hand on a subset of topics?

We are going to need to make some adjustments here… at the moment the classifier is binary, but the changes are reasonably easy as long as we know what the goal is?

3개의 좋아요
  • Apply to all new topics in a category
  • You could certainly have the option to vary by trust level. Like everything (and in this case, every community), it depends. In the case of my community, I’d likely keep it turned on for everyone but tl4 (or just everyone, if that configuration isn’t an option)
  • I’d prefer it ran on all new topics in specified categories

The goal here, of course, is to never have to work on tagging topics on our own and to let AI do it entirely based on the initial topic being created and it looking at the existing tags we have now.

It could probably be improved even more if you had the ability to add descriptions to tags in Discourse, and to let it use those descriptions for additional context to add the right tags :slight_smile:

6개의 좋아요

First off let me state that I am fully behind this ability and making it better. The following is just some facts of how it currently works (10/16/2023). Daily as a category moderator on OpenAI I review all of the new post, not all of the replies, and do see all of the AI false positives and negatives.

As one who uses this feature, Discourse AI Post Classifier - Automation rule, be aware

  • it is not 100% accurate
  • currently takes manual action to undo if the AI did a false positive. Depending upon the change may need a category moderator or higher; specifically listing an unlisted topic.
  • may miss some topics, false negative
  • as many users who will receive the automated reply by the AI do not understand how to flag the AI reply if it is a false positive, they will have to be identified and changed manually. So will need the help of real users to catch these
  • understand how to craft the prompt to get it to work as needed
  • could potentially need fine tuning and/or agents to get close to a desired satisfaction level which could get expensive
  • no way to track false positives and negatives for use with understanding how to change the prompt and/or possible fine tuning and/or agents

false positive - The AI should not have made a change and did, which is incorrect.
false negative - The AI should have made a change and did not, which is incorrect.
true positive - The AI made a change, which is correct.
true negative - The AI did not make a change, which is correct.

4개의 좋아요

A good opening move here is trying out a prompt in creative mode:

Something like…

You are a Discourse auto tagger, you suggest a list of tags for topic.

The tags are:

tag1: description
tag2: description

Suggest up to 3 tags for the following topic:

TOPIC

Try this on a few of your topics, how well doe it do?

8개의 좋아요

Works great! Thanks

3개의 좋아요

Recent update (11/01/2023)

The user id for the bot is now gpt-4-triage, at least on the OpenAI forum.

This was done so that users can silence the bot as needed.

image

Example of the bot responding.

2개의 좋아요

Note, this is configurable you can have the automatic reply come from any user you wish

5개의 좋아요

So, following up after giving this a whirl.

It seems like this is in the early stages, and I’m excited to see where it goes, but @jordan-violet’s take is 100% what I’m looking to accomplish. I did try the test prompt that @sam suggested and it appeared smart enough to apply the correct tags in theory. However, it appears that the current script limits applicable tags to 7, and we have considerably more than that.

Short of it? Would be great if it would semantically apply existing tags to a new topic. In terms of forum management (even here on meta, I’ve noticed!), the consistent application of tags to better order a community and its content continues to be an uphill battle, and it’s pure chaos at scale. For those of us who rely on tags, this would be a boon, even if it’s 75% accurate.

I’ll keep my eyes on this one as it develops!

2개의 좋아요

This is great! Do you have any suggestions for debugging this? I just configured an automation that wasn’t triggered when expected. I don’t see any relevant logs.

1개의 좋아요

Hmmm what ended up happening here, can you open a dedicated topic?

IIRC, I didn’t set this option at first. When I did, it started working.

3개의 좋아요

Quick question. Are there plans to display an audit log for those automations (maybe similarly to the webhook pattern that you already have)?

It would help ease the “what did you do” scary feeling that I’m getting after an automation is enabled :sweat_smile:

Ai log already stores all llm interactions. You can use that today via a data explorer query

2개의 좋아요

While this is true, it is rather tricky to link the log entries of llm_triage type to a post/topic that it affects, or to the action that was taken (or not) as a result.

Having an overview of these actions would be great :slight_smile:

5개의 좋아요