Current location: Homepage > ai > Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep173

Generative AI Full Course – Gemini Pro, OpenAI, Llama, Langchain, Pinecone, Vector Databases & More - Ep173

2025-07-11 11:29:50 [web3] Source: ByteGenius
findout there you will find out yourembeddings and chris langan ctmuall right and it is usingthe sql3 server in back end right thisis fine now purs the DB to the disk if Iwant to purist I'm just going to callI'm just going to call this Vector db.pures right now here if you will lookinto that so here I'm going to call thischroma right Pur DV this is my directorynow here is what here is my embeddingokay now if I'm going to run it so hereI'm getting my Vector DB right so fromthe dis itself I'm able to get thisVector DB so here actually we have thedat see if I will run it now if I willshow you this Vector DB this one sothere you will find out this is whatthis is my database means I'm able topersist okay I'm able to purs this dataI'm able to purs this data in my localdisk and by using this particular objectwe can access that now let me show youhow you can do that okay just wait sohere I'm writing uh the next thing whichyou want to do so here I'm writing thismake retriever so just a second here I'mgoing to write it down this makeretriever now you want to make aretriever basically and for that whatI'm going to do so here I'm going tocall this one more method uh which is uhwhich this function is having the methodname is what as retriever right so thereis what this will what this will myretriever now what I can do guys justwait I can give you this entire code soyou all can run inside your system soI'm passing or I'm giving you this onthe like codes share. so you can get theentire code from from there itself sojust a second I passing it over here I'mgiving you insidemy uh I'm giving you this inside the Codshare. just just copy from there andhere the last method which you need tocall this is going to be a as retrieverso just a second now we just need tocover few of the few thing and then I'mgoing to wrap up it so here guys you cansee we have a retriever we after callingthis particular method we are able toclick we are able to create a retrievernow what I will do here just just focusright just focus so here I'm going torun this particular method by using thisRetriever get relevant document right sohere I'm going to run this uh thisparticular method the method name iswhat the method name is get relevantdocument and here I am going to pass onequestion the question is that how muchmoney did Microsoft raise right how muchmoney did Microsoft raise so this is thequestion based on article if you lookinto the article if you will try to readthe news right so there you will findout somewhere related to the Microsoftand related to the different differentstartups so here I want to herebasically I have created a retrievalright which is there uh we have afunction actually this method Vector DBdo as retrieval so this is what this ismy retrieval now here I'm going to callthis get relevant document so what itwill do so it will uh search inside theentire DB and based on that it willgenerate an answer so let's see what Iwill be getting over here so yes if I'mrunning it and now inside the docksright now let me show you inside thedocks that what I have so here you cansee I'm getting a document right I I'mgetting a answer here I have created aretrieval and whatever question I'masking right so it is matching it ischecking and here I'm getting answer howthis thing is happening let me explainyou so what I can do I can open my uhBlackboard and there itself I canexplain you about it so so just a seconduh what is happening see what I'm goingto dohere so let's say we have a data rightjust a second guys yeah so we have adata and the data actually what I'mgoing to do tell me so this data I'mgoing to be uh this data actuallywhatever data is there I'm going toconvert intoembeddings I'mbeding by using what tell me so by usingthis opening API so here I can mentionthe open a API now let's say we havethisopen AI API got it now this open by thisthis basically this embedding whateverembedding I'm going to generate I'm ableto keep inside my inside my tell me guysinside my chroma DB right from here tochroma DB let me create one more boxover here so here actually what I'mgoing to do I'm going to keep inside mychroma database got it right now this isfine this is perfect okay and thischroma DB actually it is available inthe local dis space it is available inmy local disk space now it is using thisSQL light server it is using the SQLlight server inbackend right and here it is storing thedata in the form of binaryfile got it now here whatever data whichwe are going to store inside my chromaDB now I want to retrieve it means Iwant to make a request from this D rightso what I want to do guys I want to makea request from here so what I will dofor that uh so actually see I want tomake a request so the request will workin which way so let's say we havecreated a retriever right let let mecreate a retriever over here so let'ssay we have created a retriever now justa second here is what here is what hereis my retriever now let me write it downtheretriever over here this is what is myretriever now I want to retrieve thedata so here let's see this is whatchroma DV is having a database so thisis what this is mydatabaseright okay great great greatso this one this one and this one rightso this is the database where we aregoing to store the embedding now what Iwill do I'm going to retrieve the dataso with that I have created object ofthe retriever now I make a query so fromhere

(Editor: rust)

Recommended articles
Hot reading