2023-02-17 09:33:47 -05:00
en :
2023-08-21 13:46:34 -04:00
admin_js :
admin :
site_settings :
categories :
discourse_ai : "Discourse AI"
2023-02-17 09:33:47 -05:00
js :
2023-10-02 17:55:30 -04:00
discourse_automation :
2023-12-18 20:04:15 -05:00
ai_models :
gpt_4_turbo : GPT 4 Turbo
gpt_4 : GPT 4
gpt_3_5_turbo : GPT 3.5 Turbo
claude_2 : Claude 2
gemini_pro : Gemini Pro
2024-04-17 01:37:19 -04:00
gemini_1_5_pro : Gemini 1.5 Pro
2024-03-05 14:04:37 -05:00
claude_3_opus : Claude 3 Opus
claude_3_sonnet : Claude 3 Sonnet
2024-04-11 08:50:46 -04:00
claude_3_haiku : Claude 3 Haiku
mixtral_8x7b_instruct_v0_1 : Mixtral 8x7B Instruct V0.1
mistral_7b_instruct_v0_2 : Mistral 7B Instruct V0.2
2024-04-12 00:46:58 -04:00
command_r : Cohere Command R
command_r_plus : Cohere Command R+
2023-10-02 17:55:30 -04:00
scriptables :
2023-12-18 20:04:15 -05:00
llm_report :
fields :
sender :
label : "Sender"
description : "The user that will send the report"
receivers :
label : "Receivers"
2023-12-21 19:46:23 -05:00
description : "The users that will receive the report (emails will be sent direct emails, usernames will be sent a PM)"
topic_id :
label : "Topic ID"
description : "The topic id to post the report to"
2023-12-18 20:04:15 -05:00
title :
label : "Title"
description : "The title of the report"
days :
label : "Days"
description : "The timespan of the report"
offset :
label : "Offset"
description : "When testing you may want to run the report historically, use offset to start the report in an earlier date"
instructions :
label : "Instructions"
description : "The instructions provided to the large language model"
sample_size :
label : "Sample Size"
description : "The number of posts to sample for the report"
tokens_per_post :
label : "Tokens per post"
description : "The number of llm tokens to use per post"
model :
label : "Model"
description : "LLM to use for report generation"
categories :
label : "Categories"
2024-01-18 10:38:29 -05:00
description : "Filter topics only to these categories"
2023-12-18 20:04:15 -05:00
tags :
label : "Tags"
description : "Filter topics only to these tags"
2024-01-29 23:55:05 -05:00
exclude_tags :
label : "Exclude Tags"
description : "Exclude topics with these tags"
exclude_categories :
label : "Exclude Categories"
description : "Exclude topics with these categories"
2023-12-18 20:04:15 -05:00
allow_secure_categories :
label : "Allow secure categories"
description : "Allow the report to be generated for topics in secure categories"
2024-03-15 17:05:03 -04:00
suppress_notifications :
label : "Suppress Notifications"
description : "Suppress notifications the report may generate by transforming to content. This will remap mentions and internal links."
2023-12-18 20:04:15 -05:00
debug_mode :
label : "Debug Mode"
description : "Enable debug mode to see the raw input and output of the LLM"
priority_group :
label : "Priority Group"
2024-01-15 02:51:14 -05:00
description : "Prioritize content from this group in the report"
2024-01-30 17:58:25 -05:00
temperature :
label : "Temperature"
description : "Temperature to use for the LLM, increase to increase randomness (0 to use model default)"
top_p :
label : "Top P"
description : "Top P to use for the LLM, increase to increase randomness (0 to use model default)"
2023-12-18 20:04:15 -05:00
2023-10-02 17:55:30 -04:00
llm_triage :
fields :
system_prompt :
label : "System Prompt"
description : "The prompt that will be used to triage, be sure for it to reply with a single word you can use to trigger the action"
search_for_text :
label : "Search for text"
description : "If the following text appears in the llm reply, apply this actions"
category :
label : "Category"
description : "Category to apply to the topic"
tags :
label : "Tags"
description : "Tags to apply to the topic"
canned_reply :
label : "Reply"
description : "Raw text of canned reply to post on the topic"
canned_reply_user :
label : "Reply User"
description : "Username of the user to post the canned reply"
hide_topic :
label : "Hide topic"
description : "Make topic non visible to the public if triggered"
2024-02-28 20:33:28 -05:00
flag_post :
label : "Send to review"
description : "Puts the post into the review queue if triggered, for moderators to triage"
2023-10-02 17:55:30 -04:00
model :
label : "Model"
description : "Either gpt-4 or gpt-3-5-turbo or claude-2"
2023-03-15 16:02:20 -04:00
discourse_ai :
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
title : "AI"
2023-04-04 10:24:09 -04:00
modals :
select_option : "Select an option..."
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
ai_persona :
2024-03-21 00:29:56 -04:00
back : Back
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
name : Name
2024-03-21 00:29:56 -04:00
edit : Edit
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
description : Description
2024-02-15 00:37:59 -05:00
no_llm_selected : "No language model selected"
max_context_posts : "Max Context Posts"
max_context_posts_help : "The maximum number of posts to use as context for the AI when responding to a user. (empty for default)"
FEATURE: Add vision support to AI personas (Claude 3) (#546)
This commit adds the ability to enable vision for AI personas, allowing them to understand images that are posted in the conversation.
For personas with vision enabled, any images the user has posted will be resized to be within the configured max_pixels limit, base64 encoded and included in the prompt sent to the AI provider.
The persona editor allows enabling/disabling vision and has a dropdown to select the max supported image size (low, medium, high). Vision is disabled by default.
This initial vision support has been tested and implemented with Anthropic's claude-3 models which accept images in a special format as part of the prompt.
Other integrations will need to be updated to support images.
Several specs were added to test the new functionality at the persona, prompt building and API layers.
- Gemini is omitted, pending API support for Gemini 1.5. Current Gemini bot is not performing well, adding images is unlikely to make it perform any better.
- Open AI is omitted, vision support on GPT-4 it limited in that the API has no tool support when images are enabled so we would need to full back to a different prompting technique, something that would add lots of complexity
---------
Co-authored-by: Martin Brennan <martin@discourse.org>
2024-03-26 23:30:11 -04:00
vision_enabled : Vision Enabled
vision_enabled_help : If enabled, the AI will attempt to understand images users post in the topic, depends on the model being used supporting vision. Anthropic Claude 3 models support vision.
vision_max_pixels : Supported image size
vision_max_pixel_sizes :
low : Low Quality - cheapest (256x256)
medium : Medium Quality (512x512)
high : High Quality - slowest (1024x1024)
2024-02-15 00:37:59 -05:00
mentionable : Mentionable
mentionable_help : If enabled, users in allowed groups can mention this user in posts and messages, the AI will respond as this persona.
user : User
2024-05-01 01:39:13 -04:00
role : Role
role_options :
bot : Bot
message_responder : Message Responder
2024-02-15 00:37:59 -05:00
create_user : Create User
create_user_help : You can optionally attach a user to this persona. If you do, the AI will use this user to respond to requests.
default_llm : Default Language Model
default_llm_help : The default language model to use for this persona. Required if you wish to mention persona on public posts.
FEATURE: Add Question Consolidator for robust Upload support in Personas (#596)
This commit introduces a new feature for AI Personas called the "Question Consolidator LLM". The purpose of the Question Consolidator is to consolidate a user's latest question into a self-contained, context-rich question before querying the vector database for relevant fragments. This helps improve the quality and relevance of the retrieved fragments.
Previous to this change we used the last 10 interactions, this is not ideal cause the RAG would "lock on" to an answer.
EG:
- User: how many cars are there in europe
- Model: detailed answer about cars in europe including the term car and vehicle many times
- User: Nice, what about trains are there in the US
In the above example "trains" and "US" becomes very low signal given there are pages and pages talking about cars and europe. This mean retrieval is sub optimal.
Instead, we pass the history to the "question consolidator", it would simply consolidate the question to "How many trains are there in the United States", which would make it fare easier for the vector db to find relevant content.
The llm used for question consolidator can often be less powerful than the model you are talking to, we recommend using lighter weight and fast models cause the task is very simple. This is configurable from the persona ui.
This PR also removes support for {uploads} placeholder, this is too complicated to get right and we want freedom to shift RAG implementation.
Key changes:
1. Added a new `question_consolidator_llm` column to the `ai_personas` table to store the LLM model used for question consolidation.
2. Implemented the `QuestionConsolidator` module which handles the logic for consolidating the user's latest question. It extracts the relevant user and model messages from the conversation history, truncates them if needed to fit within the token limit, and generates a consolidated question prompt.
3. Updated the `Persona` class to use the Question Consolidator LLM (if configured) when crafting the RAG fragments prompt. It passes the conversation context to the consolidator to generate a self-contained question.
4. Added UI elements in the AI Persona editor to allow selecting the Question Consolidator LLM. Also made some UI tweaks to conditionally show/hide certain options based on persona configuration.
5. Wrote unit tests for the QuestionConsolidator module and updated existing persona tests to cover the new functionality.
This feature enables AI Personas to better understand the context and intent behind a user's question by consolidating the conversation history into a single, focused question. This can lead to more relevant and accurate responses from the AI assistant.
2024-04-29 23:49:21 -04:00
question_consolidator_llm : Language Model for Question Consolidator
question_consolidator_llm_help : The language model to use for the question consolidator, you may choose a less powerful model to save costs.
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
system_prompt : System Prompt
FEATURE: Add Question Consolidator for robust Upload support in Personas (#596)
This commit introduces a new feature for AI Personas called the "Question Consolidator LLM". The purpose of the Question Consolidator is to consolidate a user's latest question into a self-contained, context-rich question before querying the vector database for relevant fragments. This helps improve the quality and relevance of the retrieved fragments.
Previous to this change we used the last 10 interactions, this is not ideal cause the RAG would "lock on" to an answer.
EG:
- User: how many cars are there in europe
- Model: detailed answer about cars in europe including the term car and vehicle many times
- User: Nice, what about trains are there in the US
In the above example "trains" and "US" becomes very low signal given there are pages and pages talking about cars and europe. This mean retrieval is sub optimal.
Instead, we pass the history to the "question consolidator", it would simply consolidate the question to "How many trains are there in the United States", which would make it fare easier for the vector db to find relevant content.
The llm used for question consolidator can often be less powerful than the model you are talking to, we recommend using lighter weight and fast models cause the task is very simple. This is configurable from the persona ui.
This PR also removes support for {uploads} placeholder, this is too complicated to get right and we want freedom to shift RAG implementation.
Key changes:
1. Added a new `question_consolidator_llm` column to the `ai_personas` table to store the LLM model used for question consolidation.
2. Implemented the `QuestionConsolidator` module which handles the logic for consolidating the user's latest question. It extracts the relevant user and model messages from the conversation history, truncates them if needed to fit within the token limit, and generates a consolidated question prompt.
3. Updated the `Persona` class to use the Question Consolidator LLM (if configured) when crafting the RAG fragments prompt. It passes the conversation context to the consolidator to generate a self-contained question.
4. Added UI elements in the AI Persona editor to allow selecting the Question Consolidator LLM. Also made some UI tweaks to conditionally show/hide certain options based on persona configuration.
5. Wrote unit tests for the QuestionConsolidator module and updated existing persona tests to cover the new functionality.
This feature enables AI Personas to better understand the context and intent behind a user's question by consolidating the conversation history into a single, focused question. This can lead to more relevant and accurate responses from the AI assistant.
2024-04-29 23:49:21 -04:00
show_indexing_options : "Show Upload Options"
hide_indexing_options : "Hide Upload Options"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
save : Save
saved : AI Persona Saved
2024-03-21 00:29:56 -04:00
enabled : "Enabled?"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
commands : Enabled Commands
allowed_groups : Allowed Groups
confirm_delete : Are you sure you want to delete this persona?
2024-03-21 00:29:56 -04:00
new : "New Persona"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
title : "AI Personas"
2024-03-21 00:29:56 -04:00
short_title : "Personas"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
delete : Delete
2024-02-02 15:09:34 -05:00
temperature : Temperature
temperature_help : Temperature to use for the LLM, increase to increase creativity (leave empty to use model default, generally a value from 0.0 to 2.0)
top_p : Top P
top_p_help : Top P to use for the LLM, increase to increase randomness (leave empty to use model default, generally a value from 0.0 to 1.0)
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
priority : Priority
priority_help : Priority personas are displayed to users at the top of the persona list. If multiple personas have priority, they will be sorted alphabetically.
2023-12-07 16:42:56 -05:00
command_options : "Command Options"
2024-04-15 09:22:06 -04:00
rag_chunk_tokens : "Upload Chunk Tokens"
2024-04-12 09:32:46 -04:00
rag_chunk_tokens_help : "The number of tokens to use for each chunk in the RAG model. Increase to increase the amount of context the AI can use. (changing will re-index all uploads)"
2024-04-15 09:22:06 -04:00
rag_chunk_overlap_tokens : "Upload Chunk Overlap Tokens"
2024-04-12 09:32:46 -04:00
rag_chunk_overlap_tokens_help : "The number of tokens to overlap between chunks in the RAG model. (changing will re-index all uploads)"
2024-04-15 09:22:06 -04:00
rag_conversation_chunks : "Search Conversation Chunks"
2024-04-12 09:32:46 -04:00
rag_conversation_chunks_help : "The number of chunks to use for the RAG model searches. Increase to increase the amount of context the AI can use."
2024-03-21 00:29:56 -04:00
what_are_personas : "What are AI Personas?"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
no_persona_selected : |
AI Personas are a powerful feature that allows you to customize the behavior of the AI engine in your Discourse forum. They act as a 'system message' that guides the AI's responses and interactions, helping to create a more personalized and engaging user experience.
2024-03-21 00:29:56 -04:00
#### Why use AI Personas?
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
With AI Personas, you can tailor the AI's behavior to better fit the context and tone of your forum. Whether you want the AI to be more formal for a professional setting, more casual for a community forum, or even embody a specific character for a role-playing game, AI Personas give you the flexibility to do so.
2024-03-21 00:29:56 -04:00
#### Group-Specific Access to AI Personas
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
Moreover, you can set it up so that certain user groups have access to specific personas. This means you can have different AI behaviors for different sections of your forum, further enhancing the diversity and richness of your community's interactions.
2024-04-03 01:06:27 -04:00
FEATURE: AI Bot RAG support. (#537)
This PR lets you associate uploads to an AI persona, which we'll split and generate embeddings from. When building the system prompt to get a bot reply, we'll do a similarity search followed by a re-ranking (if available). This will let us find the most relevant fragments from the body of knowledge you associated with the persona, resulting in better, more informed responses.
For now, we'll only allow plain-text files, but this will change in the future.
Commits:
* FEATURE: RAG embeddings for the AI Bot
This first commit introduces a UI where admins can upload text files, which we'll store, split into fragments,
and generate embeddings of. In a next commit, we'll use those to give the bot additional information during
conversations.
* Basic asymmetric similarity search to provide guidance in system prompt
* Fix tests and lint
* Apply reranker to fragments
* Uploads filter, css adjustments and file validations
* Add placeholder for rag fragments
* Update annotations
2024-04-01 12:43:34 -04:00
uploads :
title : "Uploads"
FEATURE: Add Question Consolidator for robust Upload support in Personas (#596)
This commit introduces a new feature for AI Personas called the "Question Consolidator LLM". The purpose of the Question Consolidator is to consolidate a user's latest question into a self-contained, context-rich question before querying the vector database for relevant fragments. This helps improve the quality and relevance of the retrieved fragments.
Previous to this change we used the last 10 interactions, this is not ideal cause the RAG would "lock on" to an answer.
EG:
- User: how many cars are there in europe
- Model: detailed answer about cars in europe including the term car and vehicle many times
- User: Nice, what about trains are there in the US
In the above example "trains" and "US" becomes very low signal given there are pages and pages talking about cars and europe. This mean retrieval is sub optimal.
Instead, we pass the history to the "question consolidator", it would simply consolidate the question to "How many trains are there in the United States", which would make it fare easier for the vector db to find relevant content.
The llm used for question consolidator can often be less powerful than the model you are talking to, we recommend using lighter weight and fast models cause the task is very simple. This is configurable from the persona ui.
This PR also removes support for {uploads} placeholder, this is too complicated to get right and we want freedom to shift RAG implementation.
Key changes:
1. Added a new `question_consolidator_llm` column to the `ai_personas` table to store the LLM model used for question consolidation.
2. Implemented the `QuestionConsolidator` module which handles the logic for consolidating the user's latest question. It extracts the relevant user and model messages from the conversation history, truncates them if needed to fit within the token limit, and generates a consolidated question prompt.
3. Updated the `Persona` class to use the Question Consolidator LLM (if configured) when crafting the RAG fragments prompt. It passes the conversation context to the consolidator to generate a self-contained question.
4. Added UI elements in the AI Persona editor to allow selecting the Question Consolidator LLM. Also made some UI tweaks to conditionally show/hide certain options based on persona configuration.
5. Wrote unit tests for the QuestionConsolidator module and updated existing persona tests to cover the new functionality.
This feature enables AI Personas to better understand the context and intent behind a user's question by consolidating the conversation history into a single, focused question. This can lead to more relevant and accurate responses from the AI assistant.
2024-04-29 23:49:21 -04:00
description : "Your AI persona will be able to search and reference the content of included files. Uploaded files should be formatted as plaintext (.txt) or markdown (.md)."
FEATURE: AI Bot RAG support. (#537)
This PR lets you associate uploads to an AI persona, which we'll split and generate embeddings from. When building the system prompt to get a bot reply, we'll do a similarity search followed by a re-ranking (if available). This will let us find the most relevant fragments from the body of knowledge you associated with the persona, resulting in better, more informed responses.
For now, we'll only allow plain-text files, but this will change in the future.
Commits:
* FEATURE: RAG embeddings for the AI Bot
This first commit introduces a UI where admins can upload text files, which we'll store, split into fragments,
and generate embeddings of. In a next commit, we'll use those to give the bot additional information during
conversations.
* Basic asymmetric similarity search to provide guidance in system prompt
* Fix tests and lint
* Apply reranker to fragments
* Uploads filter, css adjustments and file validations
* Add placeholder for rag fragments
* Update annotations
2024-04-01 12:43:34 -04:00
button : "Add Files"
filter : "Filter uploads"
2024-04-09 10:03:07 -04:00
indexed : "Indexed"
indexing : "Indexing"
uploaded : "Ready to be indexed"
2024-04-15 09:22:06 -04:00
uploading : "Uploading..."
remove : "Remove upload"
FEATURE: UI to update ai personas on admin page (#290)
Introduces a UI to manage customizable personas (admin only feature)
Part of the change was some extensive internal refactoring:
- AIBot now has a persona set in the constructor, once set it never changes
- Command now takes in bot as a constructor param, so it has the correct persona and is not generating AIBot objects on the fly
- Added a .prettierignore file, due to the way ALE is configured in nvim it is a pre-req for prettier to work
- Adds a bunch of validations on the AIPersona model, system personas (artist/creative etc...) are all seeded. We now ensure
- name uniqueness, and only allow certain properties to be touched for system personas.
- (JS note) the client side design takes advantage of nested routes, the parent route for personas gets all the personas via this.store.findAll("ai-persona") then child routes simply reach into this model to find a particular persona.
- (JS note) data is sideloaded into the ai-persona model the meta property supplied from the controller, resultSetMeta
- This removes ai_bot_enabled_personas and ai_bot_enabled_chat_commands, both should be controlled from the UI on a per persona basis
- Fixes a long standing bug in token accounting ... we were doing to_json.length instead of to_json.to_s.length
- Amended it so {commands} are always inserted at the end unconditionally, no need to add it to the template of the system message as it just confuses things
- Adds a concept of required_commands to stock personas, these are commands that must be configured for this stock persona to show up.
- Refactored tests so we stop requiring inference_stubs, it was very confusing to need it, added to plugin.rb for now which at least is clearer
- Migrates the persona selector to gjs
---------
Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
Co-authored-by: Martin Brennan <martin@discourse.org>
2023-11-21 00:56:43 -05:00
2023-03-30 18:07:22 -04:00
related_topics :
2023-09-12 15:23:24 -04:00
title : "Related Topics"
2023-07-31 17:33:37 -04:00
pill : "Related"
2023-03-15 16:02:20 -04:00
ai_helper :
title : "Suggest changes using AI"
description : "Choose one of the options below, and the AI will suggest you a new version of the text."
selection_hint : "Hint: You can also select a portion of the text before opening the helper to rewrite only that."
2023-09-01 20:10:58 -04:00
suggest : "Suggest with AI"
2023-08-29 14:58:45 -04:00
missing_content : "Please enter some content to generate suggestions."
2023-08-23 13:35:40 -04:00
context_menu :
2023-09-25 14:12:54 -04:00
back : "Back"
2023-08-23 13:35:40 -04:00
trigger : "AI"
undo : "Undo"
loading : "AI is generating"
cancel : "Cancel"
regen : "Try Again"
2023-08-24 20:49:24 -04:00
view_changes : "View Changes"
confirm : "Confirm"
revert : "Revert"
changes : "Changes"
2023-09-25 14:12:54 -04:00
custom_prompt :
title : "Custom Prompt"
placeholder : "Enter a custom prompt..."
submit : "Send Prompt"
2023-10-23 10:41:36 -04:00
post_options_menu :
trigger : "Ask AI"
2023-12-05 15:33:10 -05:00
title : "Ask AI"
2023-10-23 10:41:36 -04:00
loading : "AI is generating"
close : "Close"
2023-11-17 12:25:41 -05:00
copy : "Copy"
copied : "Copied!"
2023-12-12 12:28:39 -05:00
cancel : "Cancel"
2023-12-14 22:30:52 -05:00
fast_edit :
suggest_button : "Suggest Edit"
2023-12-19 14:17:34 -05:00
thumbnail_suggestions :
title : "Suggested Thumbnails"
select : "Select"
selected : "Selected"
2024-02-19 12:56:28 -05:00
image_caption :
button_label : "Caption with AI"
generating : "Generating caption..."
credits : "Captioned by AI"
save_caption : "Save"
2023-03-07 13:39:28 -05:00
reviewables :
model_used : "Model used:"
accuracy : "Accuracy:"
2023-07-26 21:24:44 -04:00
2023-03-31 14:29:56 -04:00
embeddings :
semantic_search : "Topics (Semantic)"
2023-09-05 10:08:23 -04:00
semantic_search_loading : "Searching for more results using AI"
2023-11-23 14:30:17 -05:00
semantic_search_disabled_sort : "AI Search disabled for this sort order, sort by Relevance to enable."
2023-09-05 10:08:23 -04:00
semantic_search_results :
2023-11-17 15:46:59 -05:00
toggle : "Showing %{count} results found using AI"
toggle_hidden : "Hiding %{count} results found using AI"
2023-09-05 10:08:23 -04:00
none : "Sorry, our AI search found no matching topics."
2023-12-27 19:42:13 -05:00
new : "Press 'Search' to begin looking for new results with AI"
2023-11-27 17:25:33 -05:00
ai_generated_result : "Search result found using AI"
2024-03-08 11:02:50 -05:00
quick_search :
suffix : "in all topics and posts with AI"
2023-04-04 10:24:09 -04:00
2023-05-05 14:28:31 -04:00
ai_bot :
2023-08-16 16:29:58 -04:00
pm_warning : "AI chatbot messages are monitored regularly by moderators."
2023-05-16 15:56:30 -04:00
cancel_streaming : "Stop reply"
2023-05-16 13:38:21 -04:00
default_pm_prefix : "[Untitled AI bot PM]"
2023-05-16 15:56:30 -04:00
shortcut_title : "Start a PM with an AI bot"
2023-12-29 03:47:47 -05:00
share : "Share AI conversation"
2023-12-29 10:26:03 -05:00
conversation_shared : "Conversation copied"
2024-04-15 09:22:06 -04:00
debug_ai : "View raw AI request and response"
debug_ai_modal :
title : "View AI interaction"
copy_request : "Copy request"
copy_response : "Copy response"
request_tokens : "Request tokens:"
response_tokens : "Response tokens:"
2023-12-29 03:47:47 -05:00
2024-03-12 01:51:41 -04:00
share_full_topic_modal :
title : "Share Conversation Publicly"
share : "Share and Copy Link"
update : "Update and Copy Link"
delete : "Delete Share"
share_ai_conversation :
name : "Share AI Conversation"
title : "Share this AI conversation publicly"
2023-12-29 03:47:47 -05:00
ai_label : "AI"
ai_title : "Conversation with AI"
share_modal :
2024-03-12 01:51:41 -04:00
title : "Copy AI conversation"
2023-12-29 03:47:47 -05:00
copy : "Copy"
context : "Interactions to share:"
2024-03-12 01:51:41 -04:00
share_tip : Alternatively, you can share the entire conversation.
2023-05-05 14:28:31 -04:00
2023-05-17 14:59:48 -04:00
bot_names :
2024-03-05 14:04:37 -05:00
fake : "Fake Test Bot"
claude-3-opus : "Claude 3 Opus"
claude-3-sonnet : "Claude 3 Sonnet"
2024-04-03 01:06:27 -04:00
claude-3-haiku : "Claude 3 Haiku"
2024-04-10 17:24:17 -04:00
cohere-command-r-plus : "Cohere Command R Plus"
2023-05-17 14:59:48 -04:00
gpt-4 : "GPT-4"
2023-12-10 22:59:57 -05:00
gpt-4-turbo : "GPT-4 Turbo"
2023-05-17 14:59:48 -04:00
gpt-3 :
5-turbo : "GPT-3.5"
2023-07-26 21:24:44 -04:00
claude-2 : "Claude 2"
2024-04-17 01:37:19 -04:00
gemini-1 :
5-pro : "Gemini"
2024-01-04 10:22:43 -05:00
mixtral-8x7B-Instruct-V0 :
"1": "Mixtral-8x7B V0.1"
2023-11-08 08:50:37 -05:00
sentiments :
dashboard :
title : "Sentiment"
2023-03-07 13:39:28 -05:00
review :
types :
2023-03-20 09:09:20 -04:00
reviewable_ai_post :
2023-03-07 13:39:28 -05:00
title : "AI-Flagged post"
2023-03-20 09:09:20 -04:00
reviewable_ai_chat_message :
2023-03-07 13:39:28 -05:00
title : "AI-Flagged chat message"