upstash / degree-guru

AI chatbot for expert answers on university degrees
https://degreeguru.vercel.app/
119 stars 32 forks source link

Suggestions for this repo #9

Open osseonews opened 3 months ago

osseonews commented 3 months ago

This repo is amazing and thank you for it. My suggestions are:

  1. Somehow merge or refactor this repo with Vercel's own https://github.com/vercel/ai-chatbot, as they have some features and improvements in the UI. Also, they are already using Vercel KV (which is upstash), but they are missing the Upstash vector database for RAG. Combining to KV for login and saving chat with the Vector for RAG would be very powerful

  2. Instead of just providing code for scraping, I think it would be better to just store the data that can be vectorized in a Redis KV from Upstash. That will allow editing of the content and updating a vector. I don't scraping is the best thing, especially if you can't edit the content after before creating the vector entries.

CahidArda commented 3 months ago

Thanks for checking out our project!

I think adding Upstash Vector to vercel's chatbot is a good idea. I will look into how we can do that.

I agree that being able to manage vectors our bot has access to is important. Redis could be useful for this purpose, but I feel like we can use the vector store instead of redis. This is because updating vector contents will require us to embed the new content and insert the vector to the vector store anyways. Updated content can be stored in the vector store as metadata since we will need to insert the new vector anyways.

As for the scraper, I think it is useful in both vector store and redis case. We will need a way of collecting data somehow. Changing where we store the chunks from Upstash Vector to Upstash Redis will only require us to change the parse_page method. Maybe we can update the crawler so that it is able to do both.