Vector search is the retrieval method that compares embedding vectors to find the records most semantically close to a query. Cosine similarity or dot product replaces keyword matching, so the system returns the documents that mean what the query means, not the documents that share its words.

How vector search works.

Each record is embedded once at write time, stored as a vector in a specialized index. At query time, the query is embedded with the same model, then the index returns the top-k nearest vectors by similarity. The index uses approximate-nearest-neighbor algorithms (HNSW is the most common in 2026) so the search returns in milliseconds even over millions of records.

Why vector search matters.

Keyword search fails when the user asks “wine bar with private room” and the venue describes itself as “Weinbar mit Separée.” Vector search returns the match because the meanings are close in embedding space. Every modern semantic-search, recommendation, and retrieval-augmented system runs on this primitive.

Common pitfalls.

  • Stale index. Embeddings depend on the model version. If the embedding model is updated, the index must be rebuilt; otherwise old and new vectors live in different spaces.
  • Top-k too small. Retrieving five results when the workflow needs twenty starves the generator. Tune k against real workflow needs, not against a default.
  • No reranker. Vector search optimizes for similarity, not relevance. A cheap secondary reranker (a smaller LLM or a cross-encoder) often improves precision substantially.
  • No metadata filter. Pure vector search ignores structured constraints. Most production systems combine vector similarity with metadata filters (date, language, tenant) for accurate results.

Frequently asked.

What is vector search?
Vector search is the retrieval method that finds records most semantically similar to a query by comparing their embedding vectors with cosine similarity or dot product, instead of matching keywords. It is the engine behind modern semantic search, RAG, and recommendation systems.
Is vector search the same as semantic search?
Vector search is the underlying primitive; semantic search is the user-facing capability built on top of it. Semantic search also typically involves query rewriting, reranking, and metadata filters around the vector-search step.
What is HNSW?
Hierarchical Navigable Small World is the most common approximate-nearest-neighbor algorithm used by vector databases in 2026. It returns near-exact results in milliseconds over millions of vectors by walking a hierarchy of proximity graphs.
Do we still need keyword search if we have vector search?
Often yes. Production retrieval frequently runs both, fuses the results, then reranks. Vector search excels on intent and synonymy; keyword search excels on exact identifiers, codes, names, and rare terms. Hybrid retrieval beats either alone on most workflows.