Search for "how do I cancel my subscription" in a help center that only matches keywords, and you might miss the article titled "Ending your plan". The words are different, the meaning is the same. Classic full-text search matches words. AI search matches meaning. The piece that makes this work at scale is the vector database.
From text to vectors
The starting point is an embedding model . You give it a piece of text (or an image, or audio) and it returns a list of numbers, a vector, often with a few hundred to a few thousand dimensions. The model is trained so that inputs with similar meaning get vectors that are close to each other.
"Ending your plan" and "cancel my subscription" end up near each other.
"Ending your plan" and "chocolate cake recipe" end up far apart.
Once everything is a vector, "find documents about this question" becomes a geometry problem: find the stored vectors closest to the question's vector.
Measuring "close"
There are three common ways to measure distance between…