Menu

1 / 5

Vector Databases: How AI Search Finds Meaning Instead of Keywords

DEV Community: backend·Abdeldjalil Chougui·about 4 hours ago
#NDGiNWEH
#devtobackend#devto#dev#vector#search
Long article (1076 words) — no AI summary yet.
Reading 0:00
15s threshold

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…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.