GenAI RAG and Bonus - #61
Merged
Merged
Conversation
…l model, in order to avoid usage limits
alexander-wudy
suggested changes
Jun 19, 2026
alexander-wudy
left a comment
Collaborator
There was a problem hiding this comment.
Topic 1
-A vector similarity check is ran (using a local model) between each data item in the database and the prompt itself, in order to determine which data items are relevant to the user’s prompt.
"using a local model". Where exactly in the code is this model running? And how is it running, i.e. via an additional container or do we have to install something locally?
Topic 2
Is it possible that you can add some tests to your code, also as a whole? It would also be alright to do it in an addtional issue, but as of right now your code is not tested anywhere iirc, right?
Collaborator
Author
|
This file contains hidden or 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
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.
The GenAI chatbot now incorporates the notes, calendar events, and checklists data of the user in its responses. I also implemented the optional GenAI bonus feature (RAG architecture with vector database). Below is the application flow:
-The user sends a prompt to the chat endpoint.
-The data of the user from the notes, calendar, and checklist services are fetched using the “get all” endpoints of the respective services.
-The data is uploaded to the Weaviate vector database (which runs locally as a separate docker container). Each data item gets vectorized.
-A vector similarity check is ran (using a local model) between each data item in the database and the prompt itself, in order to determine which data items are relevant to the user’s prompt.
-The relevant data items get included in the prompt to establish context, then the prompt is routed to the LLM, and the chat endpoint sends the LLM response as usual.
Other changes:
-For the GenAI service to be able to retrieve data from other services, there should be a network between them. That’s why “internal-net” was added to the docker compose
-I hardcoded some actual data to the stub endpoints in the notes, calendar, checklist services, to be able to test this feature