Hello, everyone. Welcome to my talk at React Day Berlin. I'm Shabal Amba. I work as a developer evangelist at Couchbase, which is a NoSQL database platform empowering developers, including a lot of AI capabilities that are being taken with support for vector search.
So today's session is going to be around decoding vector search and embeddings for React developers. Now imagine that you are like Joey from Friends and sitting on a really nice looking couch. Of course, all of us love couch and having a good chair, right? So of course, if you're a software developer, you would probably love your work chair or if you're just enjoying looking at a movie and enjoying rocking behind with a really nice chair. So of course, all of us love that. And if you use it too much, sometimes you might see that your chair just breaks. So of course, the next step would be that you might want to look up for that particular type of chair that you really love. So you might have a search query on an e-commerce platform where you search for I'm looking for an old chair, which is very comfortable. It has kind of a brown color because you can't really remember the exact brand of that particular chair that you're looking for, because it's so old.
And of course, what would happen if you were to give such a descriptive description of the chair when you move ahead and try to search with this right type kind of description on a different kind of e-commerce platforms? Let's see what actually happens. So do you think Joey will be able to actually find that same chair that he's actually looking for? Well, according to a lot of surveys, 88% of the users won't be able to actually find what they're actually looking for, and they don't return to a website after such kind of a bad experience where they don't look or where they are not able to find what they're looking for. And 61% of the users say that they are not able to actually find what they're looking for within five seconds. And if that happens, they will actually go to the next site for finding out the results.
So of course, if I put in that same description inside of an e-commerce platform, then what would happen? Then if you go ahead and search for that particular type of chair, we probably won't be able to find the same thing that we're looking for. We find a bunch of other random chairs that do not match the description that we are trying to search for. So what does that mean about search experiences? We saw that we didn't find any brown chairs, no earthy brown chairs, no manual recliners or automatic recliners. But at least these were chairs, but they still didn't meet our description that we wanted to find. So that is why the traditional search is actually broken.
So what we're going to be talking about today, we're going to be talking about what is a vector, what are embeddings, what are vector search, and then how does it actually apply for us React or Next.js developers? So we saw that, of course, the traditional search, which is typically based on the full text search, where whatever user query is being sent, we try to match the exact search query and we try to find results in our database that match the exact word to word or text by letter or letter by letter based on the search query that you have sent. So if you have a very vague description like I'm looking for a really nice looking brown chair that is reclining, if that same text is not existing in your database, then you'll not be able to actually find results for that. So let's find how we can overcome that particular issue. So first, let's understand that what exactly is a vector. So again, a warning that if you are a React developer or a JavaScript developer, this will involve a lot of numbers. Well, a vector is a list of numbers that can represent words, phrases, images, and a lot more. And over here, each number in this particular list will basically have some information about the meaning of that particular text that you are showing to it. And an embedding or a vector embedding basically turns these words or sentences into these low dimensional lists of numbers. And these embeddings are very compact and they help making tasks like searching and organizing these texts very easy.
Comments