Assumed Knowledge: Vectors
Target Audience: General developers
Reading Time: 3 minutes
What is vector search?
Vector search is the process of finding the most similar vectors to a reference vector. If you are unfamiliar with vectors, we recommend reading about them here.
In the example above, we can search which is the closer vector to the word cat: as you can see from the image, it is the word dog, rather than pizza.
We could have a more complex problem by trying to search, in a different embedding made of images, the closest image to our reference dog image.
Vector similarity is possible because similar data is located in similar spatial regions. In the image above, you can see that cat and dog, being very similar in contextual meaning, are placed close to each other.
There are many ways we can search for the closest vectors in space. The most common algorithms that are used are called nearest neighbor algorithms. You can read more about them here.
However, when embeddings become too big to manage and require to be checked thousands of times per second, like big tech recommendation systems, we need to use tricks that allow us to optimize our data and speed up the searches.
Why is vector search important?
If you can find similar vectors based on the data - this means, you can provide different ways of linking data in ways individuals may have never considered. Linguistically - you can now link sentences based on semantics as opposed to relying on co-occurrences of words (used in a traditional word search).
Similarly, for image search, you can use reverse image search and personalized image search -- allowing for better recommendations for searches. If you are interested in vector search applications, you can read about them here.
Updated 3 months ago