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

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

2025-07-11 11:45:54 [code] Source: ByteGenius
toprovide to mymodel right now actually see this modelis nothing it just donemathematical equations rightmathematicalequations so we are langchain tutorialtalking about thellm model so this llm model this largelanguage model actually they are using aTransformer architecture they are usingTransformer architecture as a basearchitecture which architectureTransformer architecture as a basearchitecture so here in the Transformerarchitecture we have two things one isencoder and the second one is calleddecoder right now just think about thisencoder and decoder here actually whatwe are doing tell me here actually seewe have a attention mechanism we have aneural network right we have anormalization so these all are nothingthis is just a mathematical equationsright ma mathematical operations we aregoing to perform now here the data let'ssay we are passing a textdata right if are passing this text datato my model so my equation actually theywon't adapt this text Data directly lythey won't adapt actually this text Datadirectly right they won't be adapting itactually this text data now uh inbetween actually what I I will do so inbetween I will encode it what I will doguys tell me I will encode this dataright so what I will do I will encodethis particular data now what is themeaning of encode so here in betweenactually I will perform the encoding nowwe have a various ways of encoding thedata encoding is nothing it's just anumerical representation right it's justa numerical representation of the dataright numerical representation of thedata now we have two ways for encodingthe data one is without so here uh theone is without without DL right which issimple frequency based method and thesecond is one with DL right with deeplearning so we talking about withoutdeep learning so there are couple ofmethods for encoding the data right sothe first method which I can write itdown over here that is I think youalready knows know about this particularmethod the first method is a documentMatrix document Matrix right so uh wecreate a document Matrix the second onethe second method that is one that iscalled T tfidf method right so by usingthis TF IDF method also you can do theencoding so document Matrix is therethis is also called like uh bag of wordsright bag of words now here you willfind out the the third one let's say n gisthere and the fourth one let me write itdown here tfid is there andram is theredocument Matrix is there here you willfind out one hot en coding right so thisis also a technique now one moretechnique is the integerencoding integer and coding so this isactually uh like uh this is a withoutdeep learning I converting a data into aso without deep learning I'm going toconverting a data into a numeric uh I Icreating a data into a u uh like I'mshowing the data in a numeric U I'mdoing a numeric I'm showing a numericrepresentation actually right so here wehave a document Matrix DF IDF engram oneencoding and integer encoding now thereare several there are some disadvantageof this particular technique then I willcome to this with DL okay let me writedown the name also like with DLtechnique so here you will find out wordto back right word to back is therewhich is very famous technique thesecond technique uh which has been propproposed by the Facebook site that is afast text now the third one you willfind out that a Elmo right Elmo now hereuh the fourthone what to back is there fast Tex isthere Elmo is there even BT is there byusing the B and and coding we can dothat right so DL based technique nowthere is one more technique that iscalled this one glove Vector so actuallyglove is not DL based it's a metricMatrix factorization based right soMatrix factorization it's a matrixfactorization uhmethod right so this glove Vector now wehave so many technique for encoding dataright now here if we are talking aboutthis uh this particular technique wherewe are just like talking about thefrequency of the data so there areseveral disadvantage of this right sodefinitely we are going to convert ourdata right from uh text to numeric uhtext to numeric value right we are doingit by using this particular method buthere are several disadvantage the firstdisadvantage actually which I can writeit down over here that is what that is auh like by using this technique right soat we we are by using this particularTechnique we are ending up with thesparse Matrix right so we are ending upwith the sparse Matrix what is themeaning of the sparse Matrix so in thesparse Matrix you will find out thereare more number of zero there is lessinformation right so that is called asparse Matrix now the second is whatthis is here actually you won't bepreserve your context right so hereactually you won't be able to preservecontext now you this this embedding thisthis number this a numericrepresentation basically which you aregetting of your data this is meaninglessright this is meaningless so here thisis going to be a meaningless and youwon't be able to preserve any sort of acontext right so if you are going toconvert your data right if you are goingto convert your uh data into a numericvalue by using this particular techniqueI'm not going to I'm not going intodepth actually I I can show you the uhhow to calculate and all but as of nowI'm just giving you the overviewadvantage and disadvantage so by usingthis technique there is these U there isa different different like disadvantageof it there is two major disadvantagewhich I have highlighted one is sparsemetrix and the second one is contextcontextless right so meaningless thereis no there won't be any such meaningactually whatever vector and the numericvalue which you are going to generateright now over here see if we aretalking about our data let's say we aretalking about the text here is a whathere is a text so text is nothingactually here it's a collection ofsentence right sentences now it's acollection of the phrases don't worry Iwill show you each and everythingpractically by using the python and herein the sentence phrases actually youthis is the collection of

(Editor: news)

Recommended articles
Hot reading