Promptwatch Logo

Vector Search

Vector search finds content by comparing embedding vectors, returning items closest in meaning to a query. It is the semantic half of AI search retrieval.
Updated October 15, 2026
AI

Definition

Vector search is a retrieval method that represents queries and content as numeric vectors, called embeddings, and returns the items whose vectors are closest to the query's vector. Because embeddings place texts with similar meaning near each other, vector search can match 'automotive servicing' to a page about 'car maintenance' even when they share no words. It is the semantic half of most modern retrieval pipelines, including those behind RAG systems and AI answer engines.

The mechanics have three parts. First, an embedding model converts every chunk of content into a vector, typically with hundreds to a few thousand dimensions; Google's current Gemini embedding models default to 3,072. Second, the vectors are stored in an index. Third, at query time the query is embedded with the same model and the index returns the nearest neighbors by a distance measure such as cosine similarity, dot product or Euclidean distance.

Comparing a query against every stored vector is too slow at scale, so production systems use approximate nearest neighbor (ANN) indexes that trade a little accuracy for large speed gains. The most widely used is HNSW (Hierarchical Navigable Small World), described by Yu. A. Malkov and D. A. Yashunin in 2016: a layered graph in which a search starts at a sparse top layer and descends toward close neighbors, giving roughly logarithmic search time (Malkov and Yashunin). Another common family, IVF, partitions vectors into clusters and searches only the closest clusters.

Vector search ships in dedicated vector databases and in general-purpose systems. The Postgres extension pgvector, at version 0.8.7 as of October 1, 2026, supports both HNSW and IVFFlat indexes and has offered HNSW since version 0.5.0 in August 2023. Elasticsearch provides a kNN retriever, and MongoDB Atlas offers vector search with built-in reranking.

Vector search has known weaknesses. Embeddings blur exact identifiers, so a query for a specific error code or part number may return pages about similar codes. Pure vector stores have also been criticized for weak filtering: Perplexity wrote in 2025 that it saw 'vector databases that couldn't adequately support even simple boolean filters'. That is why many production systems, Perplexity's among them, run vector and keyword retrieval side by side as hybrid search and finish with reranking.

Vector search and semantic search are often used as synonyms. A useful distinction: vector search is the mechanism (nearest-neighbor lookup over embeddings), while semantic search is the broader goal of matching meaning and intent, which search engines pursued with other techniques long before vector databases existed.

For GEO, vector search rewards passages whose meaning is explicit. A passage that says plainly what a product is, who it is for and what problem it solves sits close to the many ways people phrase that need. A passage full of slogans, or one whose meaning depends on earlier paragraphs, produces a vague embedding that sits near nothing in particular. Because each chunk is embedded separately, every section should name its subject and make its point on its own.

Examples of Vector Search

  • An employee asks an internal assistant about 'time off for a family emergency' and vector search returns the bereavement and carer's leave policy, which never uses the word 'emergency'.
  • A furniture retailer's search returns 'compact two-seat sofa' listings for the query 'small couch for a studio apartment' because both phrases embed close together.
  • A team stores 10 million document chunks in Postgres with pgvector and an HNSW index, retrieving the 20 nearest chunks for each question without scanning the whole table.
  • A vector-only support search keeps returning articles about error E-205 for queries about E-204, until the team adds BM25 keyword matching alongside it.

Terms related to Vector Search

Embeddings

Embeddings are numeric vectors that represent the meaning of text, images or other data, so AI systems can compare content by meaning. They power vector search.

AI

Semantic Search

Semantic search returns results that match the meaning and intent of a query, not just its words, using language models, embeddings and entity understanding.

SEO

Hybrid Search

Hybrid search runs keyword and vector retrieval together and merges the results, so a system matches exact terms and meaning at once. AI search engines use it.

AI

Reranking

Reranking is the second retrieval stage, where a precise model rescores candidate passages so only the most relevant few reach the LLM that writes the answer.

AI

BM25

BM25 is a keyword ranking function that scores documents by term frequency, term rarity and length. It remains the lexical half of most hybrid AI retrieval.

AI

RAG (Retrieval-Augmented Generation)

RAG is how AI answer engines like ChatGPT search, Perplexity and AI Mode fetch web pages at question time and cite them, deciding which brands appear.

AI

Retrieval-Augmented Generation (RAG)

Retrieval-augmented generation is a technique that pairs a language model with a retriever, so each answer is written from documents fetched for that query.

AI

Sub-Document Retrieval

Sub-document retrieval is when AI search systems index and rank passages within pages rather than whole pages, making the passage the unit that gets cited.

GEO

Natural Language Processing (NLP)

Natural language processing (NLP) is the field of AI that lets computers analyze, understand and generate human language, from search queries to AI answers.

AI

Frequently Asked Questions about Vector Search

Learn about AI visibility monitoring and how Promptwatch helps your brand succeed in AI search.

Keyword search matches the words in the query against words in documents, scored with formulas such as BM25. Vector search converts both into embeddings and finds documents that are close in meaning, even with no shared words. Keyword search is better for exact identifiers; vector search is better for paraphrased, conversational questions. Most production systems combine the two.

Be the brand AI recommends

Monitor your brand's visibility across ChatGPT, Claude, Perplexity, and Gemini. Get actionable insights and create content that gets cited by AI search engines.

Promptwatch Dashboard