How I built an AI Teacher with Vector Databases and ChatGPT

แชร์
ฝัง
  • เผยแพร่เมื่อ 3 ธ.ค. 2024

ความคิดเห็น • 109

  • @gkcs
    @gkcs  4 วันที่ผ่านมา +8

    Thank you for watching!
    Resource links:
    Neon DB - fyi.neon.tech/gs1
    AWS Transcribe: aws.amazon.com/pm/transcribe

    • @sachinawati6332
      @sachinawati6332 11 ชั่วโมงที่ผ่านมา

      create a AI teacher using swarm agents, like it should personal ai teacher for all subjects with proper accuracy and according to my knowledge modify the content my level of understanding format type

  • @akshaychavan5511
    @akshaychavan5511 2 วันที่ผ่านมา +3

    Just what I was looking for!!
    Building a project with similar specification. This video helped me understand the system design aspect of it.

    • @gkcs
      @gkcs  2 วันที่ผ่านมา

      Cheers!

  • @Condinginsight
    @Condinginsight 2 วันที่ผ่านมา +2

    wa..o... superb!! keep your smart work like that, waiting for your next video.

  • @sarojpatra8306
    @sarojpatra8306 วันที่ผ่านมา +1

    Very nicely explained. Just right amount of information.

    • @gkcs
      @gkcs  วันที่ผ่านมา

      Thank you!

  • @elangoy
    @elangoy วันที่ผ่านมา +1

    Keep UP the GOOD WORK , your videos are very good and of good quality

    • @gkcs
      @gkcs  วันที่ผ่านมา

      Thank you!

  • @surajsrinivas7517
    @surajsrinivas7517 2 วันที่ผ่านมา +1

    Very cool and concise video. Was not aware of this and thanks for sharing.

    • @gkcs
      @gkcs  2 วันที่ผ่านมา

      Glad it was helpful!

  • @MrBox4soumendu
    @MrBox4soumendu 3 วันที่ผ่านมา +1

    Thank you very much Sir. I was planning for a small project as I am jobless now and this will be perfect fit foe the same if I can use it properly. In case I get into any design issues, I will consult here. Thanks again. Have a great time learning and teaching. All the best.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      All the best!

  • @pusarlaaishwarya5035
    @pusarlaaishwarya5035 4 วันที่ผ่านมา +1

    Bro thankyou for this concept😊😊😊

  • @harinijaan3779
    @harinijaan3779 2 วันที่ผ่านมา +1

    Great video. Your humour "depending on your salary you can set up the instance you want ...xD"

    • @gkcs
      @gkcs  2 วันที่ผ่านมา

      😁

  • @alixaprodev
    @alixaprodev 3 วันที่ผ่านมา +1

    I had this challenge previously. Thank you os much for this.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Cheers!

  • @shivprakashy
    @shivprakashy 3 วันที่ผ่านมา +2

    Very informative. Thanks for this.
    Throttled my network to read the tech bits on your website.
    Couldn’t find a Community menu, I think that will engage users. More users on website may lead to more conversion.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา +1

      Hahaha, that's a nice way to read the tech bits 😁
      I am looking to add a community section in 2025. Thanks for the feedback!

  • @DevyaniArya08
    @DevyaniArya08 16 ชั่วโมงที่ผ่านมา

    a muchhh needed video, thankss a lottt sirrr😭😭😭😭😭😭😭😭😭😭😭😭

    • @gkcs
      @gkcs  13 ชั่วโมงที่ผ่านมา +1

      Cheers!

  • @SuperGojeto
    @SuperGojeto 3 วันที่ผ่านมา +1

    Amazing! I want to do a personal project based on nearly this concept but I want everything to be locally handled including the chatgpt answer generation part. Although it's not related to text but majorly images. Great video anyways.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Go for it!
      The generation is also possible if you have your own transformers.

  • @sounishnath513
    @sounishnath513 2 วันที่ผ่านมา +2

    I have one query, for caching what are you essentially caching? Is it only the semantic query relevance if multiple users asks similar query?
    Would appreciate if you throw some light off

  • @sourabhkhandelwal689
    @sourabhkhandelwal689 3 วันที่ผ่านมา +2

    Great video, Gaurav. Also, from where do I get that cool tshirt?

    • @gkcs
      @gkcs  วันที่ผ่านมา +1

      Thanks!
      I got it as a gift, so I am not sure where. I think it's from a creator shop in Instagram though.

  • @shubhamrajput2667
    @shubhamrajput2667 2 วันที่ผ่านมา +2

    Hi Gaurav, did you consider elasticsearch as well? I mean just for benchmarks

    • @gkcs
      @gkcs  2 วันที่ผ่านมา

      I have used ElasticSearch (OpenSearch) earlier: it's very expensive and not as good as a vector DB like PGVector.
      The problem with text search is that it relies too much on written words instead of the context between them. Maybe I could have used the OpenSearch better, but my experience with Neon (PGVector) is better.

  • @RaymaxOfficial
    @RaymaxOfficial 3 วันที่ผ่านมา +1

    Hey Gaurav, excellent explanation as always. I have a couple of questions I wanted to ask:
    1. How do you create a vector database? Does Neon DB assist in this process? Do we simply pass the transcript to Neon DB, and it returns the vector file for that transcript?
    2. Is this what our request to ChatGPT looks like? -> "What is load balancing?" and here are some vector databases for context: transcript-vector.txt.
    3. So, does ChatGPT receive the query from the user and the vector database for the transcript provided by Neon DB?
    4. I also don't understand how Neon DB selects which transcript vector to send to ChatGPT.
    Thank you for the video.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา +1

      Thanks Raymax!
      1. Creating a database a one click operation in Neon. No we have to first get an embedding for the transcript using a model. There is LlamaIndex, etc... for this.
      2. User prompt: What is chat gpt. System Prompt: You are a system design teacher who answers in 2-3 sentences.
      Something like the above.
      3. ChatGPT talks to our server, the InterviewReady server. Our server finds files most relevant to a query from NeonDB and uses them to add context to the query.
      4. It's a vector embedding search. There are various search algorithms for this, like K-nearest and HSNW.

    • @RaymaxOfficial
      @RaymaxOfficial 3 วันที่ผ่านมา

      @@gkcs thankyou sir !! 🫡

  • @sumitbasu5146
    @sumitbasu5146 4 วันที่ผ่านมา +1

    Thank you Gaurav 😁

    • @gkcs
      @gkcs  4 วันที่ผ่านมา

      Thank you!

  • @maddymadanraj
    @maddymadanraj 3 วันที่ผ่านมา +2

    hey gaurav
    can we also store images in vector database?
    example can i store youtube thumbnails ? and while prompting gpt can use those as reference and provide me a better outcome
    love your content 🙌🏽

    • @gkcs
      @gkcs  3 วันที่ผ่านมา +1

      Thanks!
      You can store the files. The images can be converted to vectors, yes. But OpenAI is not suitable for this type of embedding, by my limited understanding.
      A multimodal system will do better.

    • @maddymadanraj
      @maddymadanraj 3 วันที่ผ่านมา

      @@gkcs thanks 👍

  • @satyabatigoswami1735
    @satyabatigoswami1735 2 วันที่ผ่านมา +1

    Great ecplanation and thanks a lot for this concept!!!I have one doubt. Will the data in neon db be static? How are you storing the data in the db for a particular transcript?

    • @gkcs
      @gkcs  2 วันที่ผ่านมา +1

      Thanks! Yes the data is static for a transcript. I can update the vector embeddings by clearing the data and replacing all the vectors again.

    • @satyabatigoswami1735
      @satyabatigoswami1735 2 วันที่ผ่านมา

      @@gkcs thanks a lot for the reply 😇

  • @Polaar_b
    @Polaar_b 4 นาทีที่ผ่านมา

    1. Is Neon db hosted in your vpc?
    2. How do you maintain files/ embedding in vector db (say- For another RAG project where users wants to chat with their documents then how do we query vector db where multiple users have their own documents)?
    3. Do you think running llm instance locally (eg. ollama) is better option!!

  • @siddhantota2857
    @siddhantota2857 4 วันที่ผ่านมา +1

    Ammmaazing boi... thanks

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Cheers :D

  • @TotalTechnologyZonne
    @TotalTechnologyZonne 3 วันที่ผ่านมา +8

    Small doubt ,At the beginning, you mentioned using ChatGPT to store transcripts in the vector database. I believe you meant to say that you used a text embedding model from OpenAI to generate and store vector embeddings.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา +4

      That's right. We got the embeddings with OpenAI:
      platform.openai.com/docs/api-reference/embeddings

    • @TheGsinghg
      @TheGsinghg 3 วันที่ผ่านมา +2

      No. He stores the transcripts. He uses the "Retrieval" part, i.e. getting similar video files using Neon and tells the GPT model via API to consider files with index [i,j,k ...] to be used for augmentation for answer generation. I intentionally broke down the RAG across the sentence so that you know it is not something fancy.

  • @Guru-mf3ew
    @Guru-mf3ew 3 วันที่ผ่านมา +1

    I really really like your videos

    • @gkcs
      @gkcs  3 วันที่ผ่านมา +1

      Thank you!

  • @logeshkumar8333
    @logeshkumar8333 2 วันที่ผ่านมา +1

    Sorry, May i kindly know what steps are involved in augmentation (a in rag)

  • @MitaliNeerPatel
    @MitaliNeerPatel 3 วันที่ผ่านมา +1

    helpful, thank you.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Thank you :D

  • @rameshpraveen2488
    @rameshpraveen2488 2 วันที่ผ่านมา +1

    Hi, so am I correct in understanding that after feeding ChatGPT all your transcript files, the queries with no context didn’t yield good response; then with context pointing to a specific file yielded better response; and with context to multiple related files it yielded even better response?

    • @gkcs
      @gkcs  2 วันที่ผ่านมา

      That's right 😁

  • @peeyushagrawal21
    @peeyushagrawal21 2 วันที่ผ่านมา +1

    great application :)
    can you please share the source code so that the extensions can be made out of it.

  • @ANANDKUMAR-ji4mv
    @ANANDKUMAR-ji4mv 4 วันที่ผ่านมา +1

    Thanks Gaurav

    • @gkcs
      @gkcs  4 วันที่ผ่านมา

      Cheers 😁

  • @akexop7404
    @akexop7404 3 วันที่ผ่านมา +1

    Can we utilised not diamond ai tool which provides free apis for different ai models, so does it works the same?

  • @thecoder7570
    @thecoder7570 3 วันที่ผ่านมา +1

    Awesome 👍

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Thank you!

  • @BloggerVikash
    @BloggerVikash 3 วันที่ผ่านมา +3

    I am using digital ocean droplet to host Postgres,
    can i use Neon?
    how do you rate Neon??

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      I found Neon fast and good.

    • @BloggerVikash
      @BloggerVikash 3 วันที่ผ่านมา

      @ i want overall rating sir
      Like
      Can we trust for production ready app, which may cater lakh around user?

    • @PrabhakarKumar97
      @PrabhakarKumar97 วันที่ผ่านมา

      @@BloggerVikash Read the fine manual

    • @BloggerVikash
      @BloggerVikash วันที่ผ่านมา

      @@PrabhakarKumar97 yes i have gone through
      Currently avoiding neon
      Because of the region.
      Indian region is not available

  • @Md_sadiq_Md
    @Md_sadiq_Md 4 วันที่ผ่านมา +8

    4:18 uff the humour

    • @gkcs
      @gkcs  4 วันที่ผ่านมา +1

      :p

  • @ash1794
    @ash1794 17 ชั่วโมงที่ผ่านมา

    Another way for transcripts is to use youtube as well. It generates transcripts whenever a file is uploaded.

    • @gkcs
      @gkcs  17 ชั่วโมงที่ผ่านมา

      That's a great idea, thank you!

  • @bahubalichanduwad
    @bahubalichanduwad 11 ชั่วโมงที่ผ่านมา

    Are you suggesting we pass all the matching files for getting queries answered? Would it not be very expensive?

  • @epistemophilia-3
    @epistemophilia-3 3 วันที่ผ่านมา +1

    When a question is asked, it needs to be sent to Neon DB, where similar context transcripts are retrieved from the database. These transcripts are then sent to OpenAI, and the response is returned and displayed to the user. I want to know if this process happens instantly, or if I am comprehending it incorrectly.

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      It doesn't happen instantly, it takes about 6 seconds for OpenAI to respond.
      We are working on showing a loader while this happens, so the UX is good.

  • @shubhamsonarikar8877
    @shubhamsonarikar8877 3 วันที่ผ่านมา +1

    While working with AWS transcribtion for audio queries its very slow and time consuming is their any way to increase performance for this process specially using audio .mp3 file from s3 bucket

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Adobe takes time too and so does Vimeo. I found AWS easier since it's an API and runs async.

  • @Codersky01
    @Codersky01 3 วันที่ผ่านมา +1

    Waao very useful

  • @dhruvwills
    @dhruvwills 2 วันที่ผ่านมา +1

    So basically,
    You are storing raw files using openai files api,
    and storing vector embedding in neon vector db,
    when a user makes a prompt you fetch the similar vectors from the neondb and inject in prompt sent to openai text generation api.
    what if user deletes the file, we sure can delete it from openai files, but how do we delete the vector embedding of a particular file ?

    • @deesiInGermany
      @deesiInGermany 2 วันที่ผ่านมา

      Too have the same doubt

    • @dhruvwills
      @dhruvwills 2 วันที่ผ่านมา

      @deesiInGermany i found that we have to attach metadata with the vector and when the file is deleted, we have to search embedding that have same name in metadata.
      I also wondered that if we cannot use uploaded files directly in the prompt like "refer file {file1}", than whats the point of storing it on openai server. We should store it on our server only for better flexibility in future.

    • @deesiInGermany
      @deesiInGermany 2 วันที่ผ่านมา

      @@dhruvwills thanks Dhruv for your reply.
      I am starting my AI journey with a project. Just confused here if we are storing our files in Vector DB and then will only share the part of the context with the question to gpt, then what's a point of storing files in ChatGpt. Also storing theses files will consume tokens means extra cost

    • @dhruvwills
      @dhruvwills 2 วันที่ผ่านมา

      ​@@deesiInGermany the primary objective of files in gpt is to finetune model, but if you do it then it will generalize for each user.
      Thats is why we are providing the content in context, so in this case storing files on openai is just acting as a database, this is not necessary, you can store files on your own server and generate embedding using openai api, then store that embeddings in neondb.
      Here is how it would work,
      You would use openai api to send the text which was stored on the file and openai will return embedding which you will store on neon vector db.
      Earlier there used to be answers and query api in openai but that is now deprecated. They suggest to use embedding now.
      So basically, attach embedding in context, and you are good to go.

    • @deesiInGermany
      @deesiInGermany 2 วันที่ผ่านมา +1

      @dhruvwills perfect Dhruv. I'll give it a try. Thank you

  • @1292033
    @1292033 14 ชั่วโมงที่ผ่านมา

    would you be able to open source the entire solution? Like a git repo?

  • @mohitisimmortal
    @mohitisimmortal 3 วันที่ผ่านมา +1

    bro, how to make embeddings in vector database, like use openai embeddings api for that or neon did that?

    • @gkcs
      @gkcs  3 วันที่ผ่านมา +1

      You can use openAI embeddings, yes.
      You can also use other open source embedding algorithms. We used OpenAI because it's something we have heard of :p

  • @shubhamjagtap108
    @shubhamjagtap108 2 วันที่ผ่านมา +1

    Thanks

  • @devrelsquad
    @devrelsquad 4 วันที่ผ่านมา

    🎉🎉 Amazing

    • @gkcs
      @gkcs  4 วันที่ผ่านมา

      Cheers!

  • @dhruvmehta4181
    @dhruvmehta4181 วันที่ผ่านมา

    How do you check whether your system is not used other than asking questions related to your videos only as Amazon also got this wrong in its first try where it written python code for the user

  • @shivambaghel9668
    @shivambaghel9668 3 วันที่ผ่านมา +1

    people like me who do not have money or do not want to spend money on chatgpt ,can user ollama to run a LLM model on a local instance and run llama3, or mistral for RAG

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Yes that's right.

  • @puneetarora1714
    @puneetarora1714 2 วันที่ผ่านมา +1

    like marvel, the post credits 🤣🤣🤣

    • @gkcs
      @gkcs  2 วันที่ผ่านมา

      :D

  • @mdmishfaqahmed2138
    @mdmishfaqahmed2138 3 วันที่ผ่านมา +3

    PG-vector 💀

  • @harshawardhankamble4967
    @harshawardhankamble4967 4 วันที่ผ่านมา +3

    Woke up to this

    • @gkcs
      @gkcs  4 วันที่ผ่านมา

      Good morning!

  • @gauthamvijayan
    @gauthamvijayan 3 วันที่ผ่านมา

    💖

  • @Hercules159
    @Hercules159 3 วันที่ผ่านมา

    pg vector = PostgreSQL ?

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      @@Hercules159 Yes it's a vector database extension with the Postgres DB.

    • @Hercules159
      @Hercules159 3 วันที่ผ่านมา

      @gkcs thx a lot

  • @shankarnarayanan1732
    @shankarnarayanan1732 3 วันที่ผ่านมา

    Osm

    • @gkcs
      @gkcs  3 วันที่ผ่านมา

      Thank you!

  • @RR-zg5rd
    @RR-zg5rd วันที่ผ่านมา

    hahaha ! that laugh for 100$ was epic

    • @gkcs
      @gkcs  วันที่ผ่านมา

      Bootstrapped budget constraints :P

  • @codeblood87
    @codeblood87 14 ชั่วโมงที่ผ่านมา

    Waooo

    • @gkcs
      @gkcs  13 ชั่วโมงที่ผ่านมา

      Thank you!

  • @raghavenderkuppireddy7158
    @raghavenderkuppireddy7158 2 วันที่ผ่านมา

    Awesome 👌

    • @gkcs
      @gkcs  2 วันที่ผ่านมา

      Thanks!