This enables use cases like semantic search and Retrieval-Augmented Generation (RAG) as mentioned in the article.
Semantic search is: I search for "royal" and I get results that mention "king" or "queen" because they are semantically similar.
RAG is: I make a query asking, "tell me about the English royal family", semantically similar information is fetched using semantic search and provided as context to an LLM to generate an answer.
"Semantic search" simply means that I want to match the meaning of my query to the meaning of some other value (as opposed to something like string matching, or even TF-IDF representation).
For example: do you want better documentation search? Previously you had to use some other text search engine that likely used an older technique to do query matching and requires you to learn how to configure their software. Now? You can just take each section of your documentation, pass it to an embedding model, and store a link along with the embedding in the vector db.
Want to avoid duplicate code in your code base? You can just pass every function defined into an LLM, store a pointer to the code and an embedding, then when ever a new function is added you can look up similar function, even if those function have entirely different names.
Maybe you want to build out a recommendation engine for similar users of your app based on there profile: Pass the the profiles into an LLM for embedding, then query each user profile agains the db the find all the similar users. Most vectordbs allow arbitrary metadata to be included, so if you wanted to restrict this to similar users in a similar area you could easily code that up.
All of these projects, which formerly would have been pretty major efforts that might not have worked so well, into likely very good retrieval that can be prototyped in a few days once you have the db setup.
I was playing around with making my own UI for interfacing with chatgpt. I saved the chat transcripts in a normal postgres DB, along with the open AI embeddings for each message in a vector db, with a pointer to the message id in postgres in the vector DB metadata.
Then as you chatted, i had chatgpt continuously creating a summary of the current conversation you were having in the background and doing a search in the vector db for previous messages about whatever we're talking about, and it would inject that into the chat context invisibly. So you can do something like say: "Hey do you remember when we talked about baseball" and it would find a previous conversation where you talked about so and so hitting a home run into the context and the bot would have access to that, even though you never mentioned the word "baseball" in the previous conversation -- home run is semantically similar enough that it finds it.
If you're using openai embeddings as your vectors, it's _extremely_ impressive how well it finds similar topics, even when the actual words used are completely different.
I recommend starting at https://www.pinecone.io/learn/vector-database/