Enabling automatic titles for chat threads

:bookmark: This guide explains how to set up and use automatic titles for chat threads using AI-powered Large Language Models (LLMs).

:person_raising_hand: Required user level: Administrator

Chat threads in Discourse typically require manual title input. This feature uses AI to automatically generate titles for Chat Threads based on the context of the posts within the thread. This makes threads more discoverable and reduces the burden on thread authors.

Summary

  • Automatically generate chat thread titles using AI
  • Configure delay time for title generation
  • Available for all Discourse-hosted customers and self-hosted users with the Discourse AI plugin

Prerequisites

You must configure at least one Large Language Model (LLM), for example:

  • OpenAI
  • Anthropic
  • Azure OpenAI
  • AWS Bedrock with Anthropic access
  • HuggingFace Endpoints
  • Self-hosted open-source LLM

Enabling automatic titles

  1. Go to Admin โ†’ Plugins
  2. Search for โ€œdiscourse-aiโ€ and ensure itโ€™s enabled
  3. Enable the setting composer_ai_helper_enabled to activate AI helper in composer
  4. Enable the setting ai_helper_automatic_chat_thread_title to activate automatic titles for chat threads

How it works

When a new chat thread is created, the AI will analyze the context of the posts within the thread and generate an appropriate title. The generated title will appear after a specified delay.

Customizing the delay

You can adjust the time it takes for the AI to generate the thread title:

  1. Go to Admin โ†’ Settings
  2. Search for ai_helper_automatic_chat_thread_title_delay
  3. Set the desired delay time (default is 5 minutes)

Availability

  • Discourse-hosted customers: Available on all plans
  • Self-hosted users: Can be installed by following the plugin installation guide=

FAQs

Q: Why is there a delay before the titles appear on the threads?
A: The delay serves two purposes:

  1. It allows time for the LLM to process the thread context and generate an appropriate title
  2. Itโ€™s configurable via the ai_helper_automatic_chat_thread_title_delay setting to suit your preferences

Additional resources

Last edited by @hugh 2024-08-06T03:25:45Z

Check documentPerform check on document:
3 Likes

Out of curiosity, is there any plan to implement this same feature into AI Bot (PMs)? It is a bit cringey that the title usually sets itself to something random and unrelated to the initial message (perhaps because it is too short and not enough context/time is given to let it generate a sensible title).

1 Like

This should not happen (even though I have seen it at times); if it does, we need to look at the AI log to figure out what was wrong with the prompt. The titles are based on content in the PM.

1 Like