How I built an AI Teacher with Vector Databases and ChatGPT

  Рет қаралды 68,863

Gaurav Sen

Gaurav Sen

Күн бұрын

Пікірлер
@akshaychavan5511
@akshaychavan5511 Ай бұрын
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 Ай бұрын
Cheers!
@naveenthota6429
@naveenthota6429 26 күн бұрын
One of the best videos I saw in recent times. Great details. Thank you and God bless you.
@gkcs
@gkcs 26 күн бұрын
Thank you!
@Condinginsight
@Condinginsight Ай бұрын
wa..o... superb!! keep your smart work like that, waiting for your next video.
@sarojpatra8306
@sarojpatra8306 Ай бұрын
Very nicely explained. Just right amount of information.
@gkcs
@gkcs Ай бұрын
Thank you!
@manuelblinkert3200
@manuelblinkert3200 4 күн бұрын
Very good conceptual video about a RAG pipeline. well done.
@gkcs
@gkcs 4 күн бұрын
Thank you!
@IamSinghJaskaran
@IamSinghJaskaran 29 күн бұрын
Great video! I’ve been looking for something like this. I’m currently working on the concept of vector embeddings and building a project around it, but I’ve been struggling to come up with a clear use case for myself or visualize a real-life application-until now. This really helped!
@gkcs
@gkcs 29 күн бұрын
That's awesome, good luck with your project!
@pritampaul8167
@pritampaul8167 27 күн бұрын
A very insightful video! Thanks Gaurav
@shivprakashy
@shivprakashy Ай бұрын
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 Ай бұрын
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!
@elangoy
@elangoy Ай бұрын
Keep UP the GOOD WORK , your videos are very good and of good quality
@gkcs
@gkcs Ай бұрын
Thank you!
@Rahulsapkota
@Rahulsapkota 2 күн бұрын
Really insightful loved it. I heard lot of rag everywhere now I have a good idea on this thanks
@Rahulsapkota
@Rahulsapkota 2 күн бұрын
Can we get a video of what is agents how to get started on that just a brief video like this would be really helpful
@surajsrinivas7517
@surajsrinivas7517 Ай бұрын
Very cool and concise video. Was not aware of this and thanks for sharing.
@gkcs
@gkcs Ай бұрын
Glad it was helpful!
@ramanathTV
@ramanathTV 8 күн бұрын
Extremely well explained , Loved it ❤
@gkcs
@gkcs 7 күн бұрын
Thank you!
@VijayR-h2y
@VijayR-h2y 15 күн бұрын
Thanks, nicely explained. Looking fwd to more such AI system designs.
@gkcs
@gkcs 15 күн бұрын
Thanks, more are coming!
@alixaprodev
@alixaprodev Ай бұрын
I had this challenge previously. Thank you os much for this.
@gkcs
@gkcs Ай бұрын
Cheers!
@SuperGojeto
@SuperGojeto Ай бұрын
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 Ай бұрын
Go for it! The generation is also possible if you have your own transformers.
@towardsthenorth2022
@towardsthenorth2022 17 күн бұрын
Great work Gaurav !
@gkcs
@gkcs 17 күн бұрын
Thank you!
@harinijaan3779
@harinijaan3779 Ай бұрын
Great video. Your humour "depending on your salary you can set up the instance you want ...xD"
@gkcs
@gkcs Ай бұрын
😁
@pusarlaaishwarya5035
@pusarlaaishwarya5035 Ай бұрын
Bro thankyou for this concept😊😊😊
@sumitbasu5146
@sumitbasu5146 Ай бұрын
Thank you Gaurav 😁
@gkcs
@gkcs Ай бұрын
Thank you!
@ANANDKUMAR-ji4mv
@ANANDKUMAR-ji4mv Ай бұрын
Thanks Gaurav
@gkcs
@gkcs Ай бұрын
Cheers 😁
@Guru-mf3ew
@Guru-mf3ew Ай бұрын
I really really like your videos
@gkcs
@gkcs Ай бұрын
Thank you!
@MitaliNeerPatel
@MitaliNeerPatel Ай бұрын
helpful, thank you.
@gkcs
@gkcs Ай бұрын
Thank you :D
@thebibhuty
@thebibhuty 16 күн бұрын
Comment unrelated to the video: Gaurav one request: Coming from someone who have completed >50% of interview ready system design course. I loved your system design but deep knowledge comes beyond 1 hour of the System Design interview for a specific topic. Ex: - you teach us how to design uber in 1 hour for a system design interview and that works till we get a job. - now as a curious engineer I want to do deep dive into Uber's say hexagonal mapping thing. What enhancement I am requesting is when you design a system design topic please divide into 2 parts: 1. for interview(you're already doing) 2. beyond interview(for extreme deep dives like research papers, blogs etc. related to point 1) I know you have a dedicated research paper discussion section, I am yet to go there but it would be great if we can extend it to the system design topics which you have already taught, it'll help us getting a holistic view. Regards From your longtime student
@gkcs
@gkcs 16 күн бұрын
Thank you for the suggestion, I will think about how to make this a reality :) Until then, you can use this page to filter through great deep diving resources: interviewready.io/resources/
@siddhantota2857
@siddhantota2857 Ай бұрын
Ammmaazing boi... thanks
@gkcs
@gkcs Ай бұрын
Cheers :D
@indianatlarge
@indianatlarge 3 күн бұрын
awesome vid.. i am your fan..
@thecoder7570
@thecoder7570 Ай бұрын
Awesome 👍
@gkcs
@gkcs Ай бұрын
Thank you!
@vam8775
@vam8775 21 күн бұрын
I got this video after commenting on a post
@DevyaniArya08
@DevyaniArya08 Ай бұрын
a muchhh needed video, thankss a lottt sirrr😭😭😭😭😭😭😭😭😭😭😭😭
@gkcs
@gkcs Ай бұрын
Cheers!
@rameshpraveen2488
@rameshpraveen2488 Ай бұрын
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 Ай бұрын
That's right 😁
@gkcs
@gkcs Ай бұрын
Thank you for watching! Resource links: Neon DB - fyi.neon.tech/gs1 AWS Transcribe: aws.amazon.com/pm/transcribe
@sachinawati6332
@sachinawati6332 Ай бұрын
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
@saranrajiyyanar3339
@saranrajiyyanar3339 27 күн бұрын
Please share your GitHub repo link, How to join you class?
@Codersky01
@Codersky01 Ай бұрын
Waao very useful
@Md_sadiq_Md
@Md_sadiq_Md Ай бұрын
4:18 uff the humour
@gkcs
@gkcs Ай бұрын
:p
@sounishnath513
@sounishnath513 Ай бұрын
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
@jahliveabi
@jahliveabi 28 күн бұрын
It would be good to give more context on when to implement a vector db. Your explanation is brilliant and I will learn from it. Asking question to OpenAI already has multiple implementations of vector db right? So how does it benefit a certain use case?
@shubhamjagtap108
@shubhamjagtap108 Ай бұрын
Thanks
@shubhamrajput2667
@shubhamrajput2667 Ай бұрын
Hi Gaurav, did you consider elasticsearch as well? I mean just for benchmarks
@gkcs
@gkcs Ай бұрын
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.
@PrajwalMSP
@PrajwalMSP 28 күн бұрын
Did you use Langchain?
@akexop7404
@akexop7404 Ай бұрын
Can we utilised not diamond ai tool which provides free apis for different ai models, so does it works the same?
@sourabhkhandelwal689
@sourabhkhandelwal689 Ай бұрын
Great video, Gaurav. Also, from where do I get that cool tshirt?
@gkcs
@gkcs Ай бұрын
Thanks! I got it as a gift, so I am not sure where. I think it's from a creator shop in Instagram though.
@logeshkumar8333
@logeshkumar8333 Ай бұрын
Sorry, May i kindly know what steps are involved in augmentation (a in rag)
@RaymaxOfficial
@RaymaxOfficial Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@gkcs thankyou sir !! 🫡
@maddymadanraj
@maddymadanraj Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@gkcs thanks 👍
@TotalTechnologyZonne
@TotalTechnologyZonne Ай бұрын
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 Ай бұрын
That's right. We got the embeddings with OpenAI: platform.openai.com/docs/api-reference/embeddings
@TheGsinghg
@TheGsinghg Ай бұрын
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.
@epistemophilia-3
@epistemophilia-3 Ай бұрын
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 Ай бұрын
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.
@phanikumar278
@phanikumar278 25 күн бұрын
Nice video , i always treat you like peer having discussion in room , you are good techie . One question though, how will you protect the privacy or content of the file that you sent to chatgpt ? will they use that for training or is it very locale to you when you store it ( I assume it will be for your user account )
@gkcs
@gkcs 25 күн бұрын
I think they'll end up using it for training. I have to read their TnC page to be sure. It is local to my account (I am paying for their API access, so it shouldn't be shared anywhere else). Thanks for the comment 😁
@gkcs
@gkcs 25 күн бұрын
@@Parul-u6e Thanks for letting me know :)
@ash1794
@ash1794 Ай бұрын
Another way for transcripts is to use youtube as well. It generates transcripts whenever a file is uploaded.
@gkcs
@gkcs Ай бұрын
That's a great idea, thank you!
@satyabatigoswami1735
@satyabatigoswami1735 Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@gkcs thanks a lot for the reply 😇
@mohitisimmortal
@mohitisimmortal Ай бұрын
bro, how to make embeddings in vector database, like use openai embeddings api for that or neon did that?
@gkcs
@gkcs Ай бұрын
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
@shivambaghel9668
@shivambaghel9668 Ай бұрын
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 Ай бұрын
Yes that's right.
@princezuko7073
@princezuko7073 16 күн бұрын
So which is which? I mean what is the vector database here? Llama3? And ollama is the llm model to which we will give the augmented query with context that we will find from the llama3?
@bulliethepirate
@bulliethepirate 6 күн бұрын
Thank you for this fantastic video. Very clear and I like the diagrams. One completely unrelated piece of advice: incorporate exercises that target your shoulders and neck. Not for getting bigger, but to improve your posture and enhance your overall well-being.
@gkcs
@gkcs 6 күн бұрын
Thank you! Agreed, I'll work on it :D
@Polaar_b
@Polaar_b 29 күн бұрын
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!!
@devrelsquad
@devrelsquad Ай бұрын
🎉🎉 Amazing
@gkcs
@gkcs Ай бұрын
Cheers!
@peeyushagrawal21
@peeyushagrawal21 Ай бұрын
great application :) can you please share the source code so that the extensions can be made out of it.
@sarvesharora9503
@sarvesharora9503 17 күн бұрын
I guess I didn't understand the problem well. Can't Gpt goes through all of your files (it has already too much data which it's trained on why can't go through some more) ?
@W_G-yb6ng
@W_G-yb6ng 29 күн бұрын
Are you using any Guardrails?
@icepreyas
@icepreyas 15 сағат бұрын
@gkcs would the outcome of this be the same as creating a custom GPT in OpenAI using your transcript files and calling that GPT via the API?
@BloggerVikash
@BloggerVikash Ай бұрын
I am using digital ocean droplet to host Postgres, can i use Neon? how do you rate Neon??
@gkcs
@gkcs Ай бұрын
I found Neon fast and good.
@BloggerVikash
@BloggerVikash Ай бұрын
@ 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
@1292033
@1292033 Ай бұрын
would you be able to open source the entire solution? Like a git repo?
@simkeyur7
@simkeyur7 26 күн бұрын
Depending on your salary got me 🤣🤣🤣
@dhruvwills
@dhruvwills Ай бұрын
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 Ай бұрын
Too have the same doubt
@dhruvwills
@dhruvwills Ай бұрын
@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 Ай бұрын
@@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 Ай бұрын
​@@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 Ай бұрын
@dhruvwills perfect Dhruv. I'll give it a try. Thank you
@bahubalichanduwad
@bahubalichanduwad Ай бұрын
Are you suggesting we pass all the matching files for getting queries answered? Would it not be very expensive?
@The_Daily_chess
@The_Daily_chess 2 күн бұрын
Hey can anyone tell me about approx cost of this project or a working prototype?
@navin346
@navin346 3 күн бұрын
What does load balancing mean?
@navin346
@navin346 3 күн бұрын
Brilliant video btw. Just get a hang on the stuff that am looking for 🤝
@gkcs
@gkcs 3 күн бұрын
Hahaha!
@m1cannas
@m1cannas 16 күн бұрын
❤ super
@harshawardhankamble4967
@harshawardhankamble4967 Ай бұрын
Woke up to this
@gkcs
@gkcs Ай бұрын
Good morning!
@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
@wasitechlearning
@wasitechlearning 13 күн бұрын
May I get your AI Teacher demo? How it actually looks like.
@shubhamsonarikar8877
@shubhamsonarikar8877 Ай бұрын
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 Ай бұрын
Adobe takes time too and so does Vimeo. I found AWS easier since it's an API and runs async.
@puneetarora1714
@puneetarora1714 Ай бұрын
like marvel, the post credits 🤣🤣🤣
@gkcs
@gkcs Ай бұрын
:D
@Hercules159
@Hercules159 Ай бұрын
pg vector = PostgreSQL ?
@gkcs
@gkcs Ай бұрын
@@Hercules159 Yes it's a vector database extension with the Postgres DB.
@Hercules159
@Hercules159 Ай бұрын
@gkcs thx a lot
@gauthamvijayan
@gauthamvijayan Ай бұрын
💖
@SreeRamakrishnaNagulakonda
@SreeRamakrishnaNagulakonda 11 күн бұрын
This an use case and real implementation of an AI agent correct? @gkcs
@shankarnarayanan1732
@shankarnarayanan1732 Ай бұрын
Osm
@gkcs
@gkcs Ай бұрын
Thank you!
@RR-zg5rd
@RR-zg5rd Ай бұрын
hahaha ! that laugh for 100$ was epic
@gkcs
@gkcs Ай бұрын
Bootstrapped budget constraints :P
@mdmishfaqahmed2138
@mdmishfaqahmed2138 Ай бұрын
PG-vector 💀
@hypergaming3682
@hypergaming3682 4 күн бұрын
Why this '💀' though
@codeblood87
@codeblood87 Ай бұрын
Waooo
@gkcs
@gkcs Ай бұрын
Thank you!
@raghavenderkuppireddy7158
@raghavenderkuppireddy7158 Ай бұрын
Awesome 👌
@gkcs
@gkcs Ай бұрын
Thanks!
Google Dremel: 1 TRILLION FILE READS in 10 seconds
16:06
Gaurav Sen
Рет қаралды 72 М.
Vector Databases simply explained! (Embeddings & Indexes)
4:23
AssemblyAI
Рет қаралды 373 М.
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН
I'VE MADE A CUTE FLYING LOLLIPOP FOR MY KID #SHORTS
0:48
A Plus School
Рет қаралды 20 МЛН
Coding Was HARD Until I Learned These 5 Things...
8:34
Elsa Scola
Рет қаралды 843 М.
The First Free AI Agent Builder is Here and it's Powerful
9:31
Skill Leap AI
Рет қаралды 82 М.
System Design of ChatGPT | Mock interview @gkcs
26:16
sudoCODE
Рет қаралды 14 М.
OpenAI Embeddings and Vector Databases Crash Course
18:41
Adrian Twarog
Рет қаралды 520 М.
AI Trends for 2025
7:32
IBM Technology
Рет қаралды 181 М.
What is Langchain and vector databases
21:48
Chai aur Code
Рет қаралды 46 М.
Apache Kafka in 15 minutes
15:33
Gaurav Sen
Рет қаралды 61 М.
What is Agentic AI? Important For GEN AI In 2025
22:36
Krish Naik
Рет қаралды 74 М.
Война Семей - ВСЕ СЕРИИ, 1 сезон (серии 1-20)
7:40:31
Семейные Сериалы
Рет қаралды 1,6 МЛН