Why are vector databases so FAST?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
when I started looking into Vector databases the problem I had is that nobody wants to tell you how they work internally like if you go to YouTube for example which is the place where I get a lot of information uh most videos talk about Vector databases as being really important being really fast being critical for building AI applications but nobody wanted to explain how Vector databases work internally so if you are a nerd if you like to sort of like pull the curtain and take a look at what's happening behind the scenes with this video I want to show you just a quick explanation for five years old of how you can have a vector database do what they do best which is storing and retrieving massive amount of vector in a very short amount of time so if you are building with AI if you've seen what we you know how to build a rack system or to store any one of these embeddings that we generate using uh large models you understand already uh what the challenge is right so by the end of this video I want couple things number one I want you to have a better idea a better understanding of how Vector databases work number two I want to show you one particular example of how you can start using a vector database right now and all of the code that I'm going to show you here is going to be uh in Python and by the way I really really hope you like my shirt I'm not recording today with one of those boring black t-shirts so something different uh if you don't like it just let me know I'm going to go back to my t-shirts because because I just want to make you happy all right so a couple of recommendations first uh I'm going to start talking about F which is the Facebook AI similarity search idea or or let me call it Library okay because it's a library so I'm going to talk about F here I'm going to show you how you can use bi on your project I'm going to talk about three different algorithms so you understand the progress and here is an article that I found on the pine cone website that is amazing to understand everything that's going on here is called introduction to Facebook AI similarity search that's spice uh so this is great read uh by the way pine cone is the database the vector database that I'm going to show you how to use today it's probably the most popular one at least is one of the first that came out as soon as this AI Revolution started is the one that I've been using throughout most of my my videos here so I'm going to show you how to use it uh they have uh the ability to generate these databases serverless so you don't have to keep a server around uh super cool so we're going to get there uh the second thing uh or the second recommendation is the F Library paper and you can search for it just search for f paper and again this paper here um it's written by fair or Facebook it's just the AI department at Facebook and it covers all of the technical aspects of Fes okay so that will be the second recommendation for you to read so let's get into the code here and let's start uh sort of like going line by line and trying to understand what what I'm going to be doing here so first of all I'm going to start with a a data set just a CSV file of sentences these are random sentences fact a little girl is smiling and running outside just sentences random sentences and I have a thousand of them okay now I want you to imagine that these sentences are for example summary of Books Okay so instead of just the title of the book just imagine that this is the summary of a book okay and we want we work for a library and we want to give people the ability to search our library thousands of books in this case 1,000 books not just by keyword search let's say somebody wants to learn about soccer okay I don't want just to return as a search result any books that mention the word soccer I want to go beyond that and I want to give people the ability to search for more obscure ideas that might be contained in the book or in the book summary but not necessarily using the same keywords okay so that's what semantic search is about that's when you have your mobile phone and you go to your photo library and you type pictures of the ocean and some ocean pictures will come up like you did not t those pictures but there is an algorithm that generated information about pictures and now you're able to search over that information so that's the exercise that we're going to try to solve here and I'm going to do that starting with these 1,000 sentences so how do I extract that information how do I get these sentences and turn them into something that later on I can search on top of that something to generate good results well uh here in AI right now we call that embeddings and specifically for this example what I want to do is use open AI embeddings API guy to generate those embeddings and I have a separate video actually I have like a couple of separate videos that focused on embeddings and that's again an entire different discussion but suffice to say if you don't know what I'm talking about an embedding is just a vector of numbers that represent coordinates in a multi-dimensional space just like latitude latitude and longitude represents coordinates in a two the space and two Dimensions right well these embeddings think of them as coordinates in a world that has multiple Dimensions actually here for the open AI API the embeddings that we're going to get back have uh 1,536 Dimensions that it's just it blows it will blow your mind if you try to think about that but uh but that's what they are uh the main idea of this coding is that similar Concepts will be located very close in this multi-dimension space so if you have a sentence or a book summary of soccer that book summary will be located close to a book about soccer balls a book about players a book about sports right they're going to be close together because they represent similar Concepts and obviously uh Concepts ideas sentences that are not related they're going to be far apart okay so the code here I'm going to start by loading the sentences CSV file in memory I'm using the pandas Library very very simple code just one line of code loads that into memory and then I'm displaying here the sentences with the head function just to make sure that I did a good job loading them so after that I'm going to be generating embeddings for those sentences now I keep in mind the code here that I'm showing you here you're going to find a link to that code uh in the description below of this video when you open that code you will already have the embeddings because I generated for you you don't have to regenerate all of the embeddings it takes I don't know maybe five minutes to generate the embeddings for all all thousand sentences maybe a little bit less than that and obviously you're going to have to pay money because generating embeddings with the open AI API is not free but you don't have to do that because I already did that for you so there must be a file that's called uh let me see what the name is it's called embedded sentences and that file will contain the 1,000 sentences plus the embeddings if you wanted to run this code using a different library to generate the embeddings then yes you can start with the sentences one you don't have to use the open AI embeddings API for that all right so let's get back to the code I have a a quick function here and this function is just going to use the open a API to take a sentence and generate an embedding so that's going to communicate with open AI I'm going to give it a string the the sentence the girl is beautiful and then I'm going to get back my Vector which again has 1536 Dimensions so this cell here checks for the existence of the embedded sent CSV file so if it already exist I'm not going to do anything with it I'm I'm just going to load it so I have already the embedded the embeddings if it doesn't exist however I'm going to be generating the embedding so you can see here in the case the file exists I'm going to load it in memory and then I'm going to term just because this is a CSP file when I read the CSP file in memory I want to make sure that the column representing the embeddings is a nonp array so that is what I'm going to be doing here just applying an evil um just passing NP arrays so that's converting that column into nonp array if the file doesn't exist okay then I'm just going to be calling the get embedding function for every one of the sentences and adding that result as part of the embedding coln okay so that is what's going to happen in this cell all right so all of this is preparation okay we haven't gotten into the vector store part yet all right so here when I get here I'm going to be adding a new column so I'm going to be using this ID column later on I'm going to be adding that column and it's just a consecutive number okay so up to this point I have the sentence in my data data frame I have the sentence the original sentence so I'm going to have a thousand of them and look at this these are the embeddings okay so they're going to come in an embedding column let me add a new uh thing here by the way I think I have to rerun all of this if I want to do something with this uh let me see all right so I'm going to do the following data set. I lock so I'm going to just get the first one that embedding just so you see what's inside you can see it's an array of numbers those are the coordinates again in this fictitious multi-dimensional space and those coordinates are positioning that sentence in that space okay that's it if I look at the length of this of this array want to see how many coordinates there are inside this array we have 1536 uh values here this a lwn array and that is as determined by the open a API if you're using a different algorithm you might get or different API to generate embeddings you might get different coordinates in the the video that I posted I think last week I generated embeddings for images I built it like a network from scratch and those embeddings had 128 coordinates so it's just quite smaller than this all right so all good uh actually I created this sale but I I was already doing it here as you can see I'm just uh creating a variable here that contains the 1536 Dimensions because we're going to use that later all right so so far we just generated the embeddings we're just ready to start doing stuff now what do we do with those embeddings well we have a thousand of those embeddings because we have 1,000 rows so what can we do or how can we find in that array let's say the customer comes and they want to buy a book about soccer and we want to find everything in that array in our list of embeddings that is similar to soccer that request coming from the customer so what we can do is well we can generate the embedding for the query that the customer wants to answer which is books about soccer we can generate an embedding for that and then compare that embedding remember there are coordinates with every every other embedding that we generated we have a data set right now with 1,000 of them so we could compare the embedding generated for the users query with every other embedding in our list and grab the ones that are the most similar meaning they're close to each other okay so this is like looking on a map and finding anything that's very close to the location of the embedding that we are going to generate from the US query everything around that area that is similar to what the user is looking for okay that is the idea and that's it if you can build that and it's very easy actually to build you can just compare these two embeddings by using a concept that's called cosine similarity so if we go here to our browser so we can find the cosine similarity formula there is a medium page I'm not going to open that let me open here Wikipedia so by implement the COS sign similarity formula by the way you don't have to do it manually there are libraries that that already do that for you you can compare two vectors and the closer they are the smaller the or the larger the cosine similarity will be the more similar they will be and that's it there is a problem though and that is where Vector databases come in well imagine if I have a th books imagine having to go and take the input uh embedding from the customer query and comparing that to everyone or computer in the similarity from the query with every one of the embeddings that we have stored in that database we will have to do in the worst case 1,000 comparisons that will be very very slow not for 1,000 embeddings but if we're talking about a large Library we might be talking about tens of thousands of books or if you're talking about documents for your rack system your rack application that you're building we might be talking about millions of embeddings so you don't want every time you want to search something you don't want to start from scratch right you don't want to have to compare one thing against everything else in your database you need a faster method of doing that and that is something that Vector databases provide right so a vector store will give us that ability to search really really fast that is what we're going to see right now how it works so in order to get there first I'm going to just use the F Library here all right so to install files by the way there is a requirements.txt file and that file here U you see that line four is Pi's CPU I'm installing that on my Mac Pi also works on the GPU so if you have an Nvidia computer you can install the GPU version of this I have not tried that on my M3 Mac my work the GPU one I have not tried it so I cannot cannot speak for that so anyway I'm going to use buice and this is the way or this is what I'm going to be using so first of all I'm going to grab the list of embeddings from my data set the column of my data frame and I'm just going to generate an array with all of those embeddings and by the way if I execute this let me just make sure uh that we are on the same page how many embeddings do I have well I this is an MP array so I can do shape and we can see that we have 1,000 embeddings and each embedding is 1536 so that makes sense that is what I generated by just doing this here so here is the query this is sort of like the template that we want to search I love soccer that's what it says so I want to return from my list of sentences anything that is related to I Love Soccer not anything but I want to return maybe the top four documents that are related to I love soccer so the first thing obviously is I'm going to generate an embedding for that and I'm using the same function that I defined before so I'm saying hey just give me the embedding for I love soccer query so I'm just going to make sure when I print this out uh I should get 1536 yes so that's an embedding and this thing here is just going to be an array obviously here you have it so the entire list of coordinates is in xq here which represent the embedding of my query all right so first I'm going to be using the index flat L2 uh algorithm as a vector store so imagine a vector store this is going to be in memory here obviously but a vector store that is going to be using this algorithm so this this is what's cool about this algorithm it says flat because I'm storing my vectors the 1536 uh sized vectors just like that and he says L2 because that's the algorithm is the ukian distance or L2 that is the algorithm that is using to search for that Vector here's what's interesting when you're using an index flat L2 there's nothing funcy going on behind the sces this is just a list of all of the vectors and when we give it when we search that list is going to go one by one finding anything that's close to the the query that we're passing so no nothing fancy here all right so I'm going to create that index with that those Dimensions so we specify here that we want 1536 dimensions and I create that index and I'm going to call E trained you're going to see in a few seconds why this this matters but when you're using a flat L2 index well it is trained you don't have to do anything else because again all of the content is just going to go inside and that's it it doesn't matter where the content is so this is going to be not slow but as we add more embeddings this is going to get slower and slower and slower because it's just like looking on top of an array all right so I'm going to add all of my embeddings so let me execute this cell here I'm going to add all of the embeddings to this index and then I'm just going to print how many items are inside my index so I have a thousand items awesome and now I'm going to perform a search okay remember this search because this is a flat L2 this search is just going one by one comparing the distance and then returning the ones that are the most similar so I'm going to do my search and this expand Dimensions here this is just so I can get the query the embedding and turn it into an array with one item and the 1536 dimensions on the other one that's nothing fancy it's just I'm going to call it Plumbing that I need to do in order to get this working so I'm going to pass my query this is what my query is and I'm going to say I want k equals 4 meaning give me the top top four documents that are related here so if I execute this when I execute that you get these four documents look at this oh by the way when I what I get back from that search so I get something here that I'm not going to use but I get the indices of the documents that I did I did I spell that right uh yes I think this is indices so I'm going to get the indices of the documents that are a match for my query my query was I love soccer what I'm getting back is a man is punching a soccer ball a soccer player is sitting on the field and is blah blah blah an opponent is tackling a soccer player great so these are the top four sentences from my list of embeddings that are the most similar to the query that I passed so using this technique so far I can find that I can do that semantic search which is great the downside again is that this is a flat L2 so it's not going to scale great the more documents we have the slower this is going to get so we need something better okay and that is where the IVF flat comes in again the flat part indicates that we're still storing the full vectors but now we're going to use a very cool technique to make that surch faster so we don't have to to go and make a comparison for every single position of our list of embeddings so this here is a borono diagram I don't know how familiar you are with them but this is the main characteristics of them the dots the black center centers here or centroids any point within that cell for example this cell right here any point within that cell is closer to the centroid that's in the middle of that tail now this is a diagram that I drew by hand so this might not be accurate don't read too much into it this is just a comic diagram that we drew but just believe me the real life borono diagram any point within this cell here the closest centroid is the one that belongs to that point okay this is supery in a bunch of different applications just just to give you one idea imagine a city where uh those centroids represent the location of a the fire department truck or an ambulance so if anything happens within that City we immediately know which post is the closest like what is the fire truck should where the fire truck should be coming from because this if it happens right here right in this point well this is the location that's the closest to that point if it happens right here well this is the location that's the closest right and we can create in a borono diagram we can create as many centroids as we want so the idea and the reason I'm explaining this to you is because this now this new algorithm that we're going to see right now this new index way of organizing an index is going to use the same idea to Cluster related embeddings in a way where at the time of searching we don't need to search or compare every single embedding in our list we can just go to one of these celles and do a comparison right there all of this is going to happen internally by the way so that is what the IVF part comes in okay so here is how it works first I'm just going to create 20 centroids so that is how many of these black dots I want for my index and obviously the more you create in order for them to make sense you need to have more data like in in this case here I have a thousand sentences so it wouldn't make sense to just create a 100 centroids like you know smaller number is going to be better it's just going to be a trade-off So within every one of these sales right I'm going to be organizing the data using just a flat L2 so I'm still going to be using a clean distance to find Sim similarities and it's going to be flat so that is what the quantizer comes in So within a cell I'm going to be using a quantizer here which is the index that we just discussed for the creation of the overall index I'm going to be using this new format which is the index ibf flat right so I pass my quantizer I pass the how many dimensions I want and I pass the number of centroids which is the number of black dots here now if I execute is train now it says false this is an index that needs to be trained like why it does it need to be trained well how are we going to organize the information here we don't know so we need to add data and train it with some embedding so it knows the index understands how to organize all of that information okay so how to put all of the data around those centroids okay so that is what we're going to do right now I'm going to train my index with my list of anded and now when I execute this this is just super fast when I execute that now it says that the index is been is already trained so now I can add my embeddings and just compute how many do I have is a th000 something here obviously you don't need all of the embeddings to train your index but why not in this case you can train your index with half of your embeddings if you have too many uh just with some of them something that's representative of everything that you're going to see that's good enough as you keep adding embeddings to your index they are going to be positioned correctly so all of that's going to work let me just do a search Now search works exactly like before I pass the query or the embedding of the query and I pass how many items do I want to get back and this is going to give me the IND the indices of all of those matches notice something though when I execute this query you are going to see that I'm returning sentences that look related but they are not the same as the ones that I returned before when I didn't have anything fancy so the ones that I returned before a man is punching a soccer ball a soccer player is sitting on the field let me see now an opponent is tackling a soccer player I think that one was up there the crowd is watching a football game that is different by the way notice this a crowd is watching a football game there are no words there that match my query which is I love soccer no words but still it recognizes that football and soccer are kind of the same thing unless you are from the United States which is soccer is soccer and football is football for the rest of the world they are the same thing a football player is running past unofficial you see here that I'm getting different results why well because the way now the index is organized the centroids here give us a trade-off where we get much faster search but the information might not be as accurate as if we go just with a flat array or flat index so we need to keep these two in mind do you want faster more accurate or or faster right and depending on on what we need we're going to organize this index one more thing by default when we do this search what is going to happen internally is that we are going to reach return similarity or similar documents from one of these sales but we can change that for example we can say hey find the position the cell where you're going to be looking at but not only that cell but get sales that are neighbors of this one here so we can extend that and we can do that using a property that I'm going to have it here somewhere it's called n probe so in this case I'm saying don't get your results only from the sale that matches the query get your results from five neighbor sales as well okay so by doing that I can execute my sale and now you can see that the results are a little bit closer maybe the same probably not the same a group of men is playing soccer on the beach let me see group of boys is playing soccer on the seashore but they're not the same but they're closer to the original one and the bigger I get or the larger that number is the closer it will become to the optimal results if you will right because I'm extending the search again this is a trade-off by doing this my search is going to get a little bit slower but the results are going to be a little bit better okay so that's sort of like the trade-off so let's see the final one all right the final optimization that we can add to this algorithm these are just three there are multiple algorithms but I just wanted to explain this this top three so the next one is IVF but now it's not going to be flat we're going to use product quantizer so this is what that means okay so far we've been talking about uh we modify the index but we stored the 1536 dimensions of our Vector just like they are just we store all of all of that data how about optimizing that as well so how about creating sort of like an intermediate representation where we can actually search much faster instead of storing 1536 elements we're going to store something else and that is what this algorithm uh comes in so this is what's going to happen at a very high level and this picture here is a modified picture from the article that I show you I try to made it a little bit more clear but we're going to get our original vector and again think of this Vector as the 1536 elements we're going to slice those vectors so every component every coordinate is just going to have a group of that coordinate the first coordinate and a group of the second coordinate right so that's what this line out represents notice how they are split right they're not part of a vector anymore I have groups of sliced vectors and I'm going to Cluster those groups just like we did for the index using a borono diagram I can cluster them and then I can grab the centroid of that group and I can create a new Vector but now every position is just going to use the centroid it's not going to use the actual value it's just going to point to the centroid of where that value or where that value belongs by doing this we're quantizing our vectors to a much more manageable scale and it's way faster to search so again I don't have here any uh didn't want to build any way to just do the comparison because I had to just create millions of embeddings in order to make this a little bit slower but the more optimizations we add again the less accurate our search is going to be but the faster is going to be so we can in fact search millions and millions of vectors like really really quick by doing all of these modifications so let's see the code here um so for the code I'm going to be using the index ibf PQ it's not flat anymore now it has the P PQ which is product quantizer that's the index that I'm going to be creating I pass the quantizer that we create before the embedding dimensions the number of centroids going to keep the same number of centroids the 20 the code size and the bits per centroid so these are the two parameters here that we're going to be using to decide how much we're going to quantize this and there is a Formula here I don't remember actually the formula but in the paper they explain what the formula is which is what you need to keep in mind in order to give them this size and they depend on how many items you have so that will depend on how much you can actually compress this these vectors here here's my index again if I execute this the index is not trained we also need to train it obviously so here I'm training the index I'm adding all of the data and I'm going to execute this and here we are with a thousand elements added to this index and now I'm just going to keep the probe in five meaning return any matches from your sale and five other sales around that Cale and just going to do a search and again everything else is going to work the same all right so this is how or this is an idea or you can get the idea here of how these databases work internally this is an algorithm that they use internally to make all of these operations extremely fast okay so let's use one of those or one of these Vector store databases uh which is pine cone like I mentioned before pine cone is I think from my point of view probably the most popular of these Vector store databases to been around forever right since I started doing this AI stuff I'm hearing about Pine ConEd very very simple to use here I'm going to use pine cone directly just to just to store the data and just to do a search that's it it's going to be quick but pine cone also integrates with L chain so if you're using L chain obviously they have a way to integrate with pine cone to use pine cone you need an API key which in my case here I have it as an environment variable so you can go to pinec cone. uh let me see if I have it open here I most yes so right here uh this is my Pine con account you can create an account for free and you can get an API key right here and with that API key you add it to an environment variable which is pine cone API key and that's it that API key is the one that you're going to just create your pine cone database okay so here I'm creating my database here in code you don't have to do anything anything else in the website that's what's great about it you don't have to just mess with it in the website just in your code you can just Define your database right here here is something cool that is now available for everyone which is great Pine code you can use it serverless what does that mean well you don't have to spend any time dealing with servers or configuring stuff you can just from your code immediately on the Fly say I want to create a new pinec con Vector store database here is my data and that's it and it will immediately give you a serverless database that you can start using delete it when you're done whatever right so in my case here I'm just creating One serverless spec it's going to be hosted on AWS which is really cool and then the region is going to be us Eastern one I live in Florida so this is the closest that I have pine cone made this for a us available in a bunch of regions you also have us West one you can find where else they have this available uh but in my case just very simple again it's just this is the specification I don't have to go to AWS I don't have to configure anything all of this is going to work transparently for me so after I have that I need an index and again we just talked a bunch about indexes so I need to create an index here and I'm calling it underfitted that's the name of this channel random sentences because just those are random sentences but I'm going to create my index if my index does not already exist the reason I ask this is so I don't try to recreate the index again and again right I can just call hey database create index is very simple uh I'm just going to pass the name of the index how many dimensions do we need we had to do the same thing with when we were using pies you always have to specify how many dimensions 1536 in this case what is the metric that you are going to use for this index I'm using here cosine similarity let me see what else is supported here so if I go inside here can I change it well maybe maybe I can try to create an index here okay so you can use ukian distance okay which is the L2 that we saw for pies you can use the dot product or you can use cosign similarity my recommendation is for you unless you know better my recommendation is is to stick to cosign similarity there is actually a recommendation when you're working on an AI application for you to use the same metric that the model that is going to be using your code or that you're going to be using in your code is using so in the case of open AI that will be cosine similarity so you should stick to it all right so let me get back to my code so I'm specifying cosine similarity and now I'm passing the spec the serverless spec that I just created by executing this line here oh by just the time. Sleep uh pine cone recommends that just to take a second for the system to sort of like ass simulate the create index just wait for a second here before you do something else that's going to give it a time to catch up so when you execute this and I'm going to execute it myself I have to execute this and then this and then this when you execute this if you don't have an index then you're going to be creating that index for the first time so it's just going to take a few seconds to to finish uh this here is just now grabbing my index it already exist so I can do describe index stats and when I execute that you get okay so Dimensions 1536 Nam space Vector count a th000 the reason I have a th vectors is because I already uploaded the information so I'm not uploading it here I already have all of the information up there total Vector count 1,000 this code I'm not going to spend too much time on it but this these two cells are going to upload the data for you so when you execute this notebook this condition asks whether or not you've uploaded all of your data if it's zero that means there is no data it's going to upload the data and in order to upload the data to Pine Cone something super cool is that you don't need to upload embedding by embedding I have a thousand here imagining having 1 million embeddings and you have to sort of like insert one of each of those embed ings you don't do that instead you can upsert batches so you can just grab a bunch of embeddings at the same time and just send them that is what I'm doing here that is why I have these iterator and Vector uh functions that I created here just to format my data set in the format that pine cone expects and pass the information that way by the way what is that format well if I go here to Pine Cone I'm G to go back to my database notice that I'm storing an ID and I'm storing The Meta data as well so I'm passing all of that information here I'm passing the ID that we created at the beginning I'm passing obviously the vector that's the embedding and I'm also passing like The Meta data in this format which is the sentence and the value of that sentence that's why you get here the metad data contained sentence so why is that important because whenever you do a search and you find the similar vectors you want the ability to just read that meta data you want the ability to say okay what was the original sentence not the vector the vector is just numbers coordinates I actually want the real deal in the case of the library you could store here the name of the book so the sentence could be for example the book summary but you could store here the name of the book the author the location within the library whatever information you want to store here that could be part of your metad data so at the time of doing a search you're going to get back anything that you need all right so after uploading the data I describe the index stats again and then I do a query again it's just very simple I'm just saying hey just use that index and query my Vector this xq you might remember that from before that's just the embedding of I love soccer give me four items back and please include the meta data when it comes back right and then I can just go through the matches and I can just display the sentence coming from the matches so if I run this boom I get all of that this is not in memory now this is actually going to AWS somewhere in the world I don't know where us east region and it's actually returning data from a thousand embeddings and again it's a thousand embeddings not a big deal but this is darn fast that you can do similarity search that fast is just mind-blowing let me just create a new one and then we're going to wrap it up okay so my second query uh is going to be I don't know I like animals that eat too much I don't know I'm just going to create something like this uh we're going to need to just generate the embedding co-pilot is helping me out here that will be the embedding and now we just need to do a query uh so let's do response equals let's see if copilot wants to help me yes we're going to be searching the query the pine con index we're going to be passing the query we won let's say three and yes we won The Meta data and now we want to display the results okay so I'm going to execute this boom it's just that fast okay so it's just it's just incredibly fast searching and the results are the animal with big eyes is voraciously eating look at that that is a beautiful example I'm getting Goosebumps here okay so that's a beautiful example of how these things work I'm saying I like animals that eat too much and eating too much is precisely being voraciously some kins are hungry yeah that's related someone is cleaning an animal less important I wonder what would happen if I say five here like he going to start returning a lemore is eating quickly eh a cat is eating corn on the cup well maybe maybe I'm going to give it so that's it so if you are building an AI application and you really need to store all of this in now you know what to do my recommendation is usually pine cone but hopefully hopefully by now uh there is one more line I'm going to tell you what it does right now but hopefully by now at least you have a better idea of what's Happening behind the scenes why are these Vector stores so darn fast and this because the algorithms that they're using are very clever and organize the information in a very clever way so they can actually return matches really really quick the last line that I have here is just how to delete an index so I'm going to execute it right now and my index should be boom done so all of the information that I created on the Fly is now gone if I go to Pine Cone now and I refresh I hope that that index is not there anymore and as you can see boom gone so hopefully you enjoyed this video uh give me a like down there somewhere so I can keep producing content like this and I'll see see you in the next one bye
Info
Channel: Underfitted
Views: 10,347
Rating: undefined out of 5
Keywords: Machine learning, artificial intelligence, data science, software engineering, mlops, software, development, ML, AI
Id: cpLi-82koFM
Channel Id: undefined
Length: 44min 59sec (2699 seconds)
Published: Fri Jun 07 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.