discourse-ai/app/serializers
Roman Rizzi 1f1c94e5c6
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 13:43:34 -03:00
..
ai_chat_channel_serializer.rb FIX: Serialize channel title for DMs (#90) 2023-06-16 14:37:16 -03:00
ai_tool_serializer.rb DEV: AI bot migration to the Llm pattern. (#343) 2024-01-04 10:44:07 -03:00
localized_ai_persona_serializer.rb FEATURE: AI Bot RAG support. (#537) 2024-04-01 13:43:34 -03:00
reviewable_ai_chat_message_serializer.rb FIX: 500 error when reviewable has a missing message (#397) 2024-01-03 11:49:47 -03:00
reviewable_ai_post_serializer.rb DEV: DiscourseAI -> DiscourseAi rename to have consistent folders and files (#9) 2023-03-14 16:03:50 -03:00