discourse/plugins/automation/admin/assets/javascripts
Kris e470f3df9f
FEATURE: create AI tagging automation (#34587)
Creates a "Tag posts with AI" script for the Automation plugin. 

This allows new/edited posts to automatically get tagged by an LLM. I've
included two modes, one that uses the tag tool to find existing tags and
another that takes a manual list of tags to choose from.

I've tested this using Open AI with the following prompt: 

```markdown
 You are an expert content classifier and tagging assistant for this forum.

  Your task is to analyze posts and suggest appropriate tags based on content, images, and the
  available tags list provided.

  Guidelines:
  - Only suggest tags from the provided available tags list
  - Be conservative - only tag what you're confident about
  - Consider both content topic and post intent

  You must always respond with valid JSON in this exact format:
  {"tags": ["tag1", "tag2"], "confidence": 85}

  - tags: array of tag names from the available list
  - confidence: integer from 0 to 100 representing your confidence level

  If no tags are appropriate, use: {"tags": [], "confidence": 0}
 ```
 
 JSON response format: 
 
 ```json
 {
  "tags": "[string]",
  "confidence": "integer"
}
```

In action 

<img width="2726" height="640" alt="image"
src="https://github.com/user-attachments/assets/ce0fd21f-5df5-411c-82f0-d4ac05305fed"
/>

Included some settings to include restricted tags, max tags to apply,
max posts for context, and max tokens per post
2025-08-28 13:13:27 -04:00
..
admin FEATURE: create AI tagging automation (#34587) 2025-08-28 13:13:27 -04:00
discourse FIX: Improve automation on/off toggle (#33482) 2025-08-14 10:16:20 +03:00