-
Notifications
You must be signed in to change notification settings - Fork 78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(forum-auto-response): Implement forum auto response #7766
Open
Jonaspng
wants to merge
27
commits into
Coursemology:master
Choose a base branch
from
Jonaspng:jonas/forum-auto-reponse
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e207722
to
961d3be
Compare
- pgvector for psql to support vector storage and operations - neigbor for code easier db migrations including vectors - langchainrb and ruby-openai for LLM services - pdf-reader for reading text from pdff
- openai api key is not complete
de6b2b5
to
d67f021
Compare
60afe6e
to
aa0ee8a
Compare
- initialise LLM models that will be used in code - LANGCHAIN_OPENAI model is used for normal RAG operations - RAGAS (Retrieval Augmented Generation Assessment) model is used for evaluation of RAG
- add course_material_text_chunks which belongs to course_materials - add course_material_text_chunkings which belongs to course_materials and trackable_jobs - add workflow_state column to course_materials table.
- add text_chunk model to represent segments of material after chunking, including content and associated embeddings - add text_chunking model to represent trackable text_chunking jobs
- trackable job that tracks text chunking of course material
- add create_text_chunks that create text chunks from material - add destory_text_chunks that destroy materials's text chunks - modify update so that if the file contents was updated (i.e new file upload) it will destroy current text chunks related to previous material - modify destroy to ensure that material cannot be deleted while material is still undergoing text chunk job
- only course owner or manager will be allowed to manage text chunks
- add workflow state to material model - material has_many text_chunks and has_one text_chunking
- add chunking service that handles the chunking of text and file - add llm service that handles services provided by llm which are text embedding and getting image caption
- update material view to include workflow state - update folder and subfolder permission view to include canManageKnowledgeBase
- create_text_chunks handle creation of text_chunks - destroy text_chunks handle deletion of text_chunks
- switch that create or destroy course material text chunks
Integrate new backend API changes by updating the UI components and related files: - Updated `store.ts` to handle new state management for the backend changes - Modified `operations.ts` to incorporate new API calls - Adjusted types in `types.ts` to reflect backend schema changes - Updated React components to work with the updated state and API logic
- add course_material_text_chunk_references table - update course_material_text_chunks table
- update psql image to allow for pgvector
aa0ee8a
to
99cede1
Compare
99cede1
to
e39d846
Compare
- create course_forum_rag_auto_answerings table to keep track of auto answering jobs - add is_ai_generated, original_text and scores columns to course_discussion_posts
- rag_workflow_service handles response generation - response_evaluation_service evaluates quality of generated response using faithfulness and answer_relevance scores
- auto_answering controller logic is located in auto_answering_concern - reply will only be automatically generated for first post in forum topic - non course manager/owner will not be able to see drafted post - identity of automated response will be the course creator - identity of manually requested AI response will be the manger/owner that clicks the publish/mark as answer and publish button
- add generate reply button allows for manual request of draft AI generated responses - add mark as answer and publish button that marks and publish draft AI generated responses - add publish button that publish draft AI generated responses - only course manager and course owner can see draft AI generated responses and generate reply button
e39d846
to
d4c1a7b
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Feature: Forum Auto Response
Overview
Implemented forum auto-response functionality with the following key features:
Changes
Setup Note
In order for the text chunking ability to work you need to have 2 things:
Limitations
TODO