-
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(knowledge-base): implement course material knowledge base #7690
Draft
Jonaspng
wants to merge
18
commits into
Coursemology:master
Choose a base branch
from
Jonaspng:jonas/course-material-knowledge-base
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.
Draft
feat(knowledge-base): implement course material knowledge base #7690
Jonaspng
wants to merge
18
commits into
Coursemology:master
from
Jonaspng:jonas/course-material-knowledge-base
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
- 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
- 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
cysjonathan
changed the title
Jonas/course material knowledge base
feat(knowledge-base): implement course material knowledge base
Dec 10, 2024
Jonaspng
force-pushed
the
jonas/course-material-knowledge-base
branch
from
January 5, 2025 14:42
d6e8da5
to
3035b4d
Compare
- 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
Jonaspng
force-pushed
the
jonas/course-material-knowledge-base
branch
from
January 5, 2025 14:56
3035b4d
to
c9985ff
Compare
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
Jonaspng
force-pushed
the
jonas/course-material-knowledge-base
branch
2 times, most recently
from
January 11, 2025 13:28
fba8f7f
to
8895a12
Compare
- update psql image to allow for pgvector
Jonaspng
force-pushed
the
jonas/course-material-knowledge-base
branch
from
January 11, 2025 14:08
8895a12
to
c62a9a1
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.
This PR lays the ground work for Retreival Augmented Generation (RAG) in Coursemology by introducing a knowledge base for course material (currently only supports pdf and txt file).
Setup Note
In order for the text chunking ability to work you need to have 2 things:
Todos: